docs/security/filesystem.mdx
A sandbox's storage is private by default. The guest sees its image and nothing of your host unless you choose to share it. This page covers how that privacy is enforced, what changes when you mount or share storage, and the one place the trust chain reaches outside your host, which is image content.
When a sandbox boots from an OCI image, the guest sees exactly two things:
Nothing else of your host disk is visible. There is no implicit passthrough of host paths, environment, or credentials into the guest.
The root filesystem is a layered view:
Writes never modify the cached image and are never visible to another sandbox. Two sandboxes from the same image start identical and diverge privately. Delete a sandbox and its writable layer goes with it.
<Frame> </Frame>When you do share a host directory, it's exposed through virtio-fs, a filesystem passthrough, not by handing the guest your host's raw disk. The broker that serves it runs on the trusted host side and enforces containment:
openat2 with RESOLVE_BENEATH, which atomically blocks .. traversal, symlink escapes out of the shared root, and procfs magic-link tricks. On older kernels and on macOS, the broker falls back to O_NOFOLLOW, which still blocks symlink traversal but is a weaker guard against crafted .. sequences. Prefer a recent Linux kernel for untrusted workloads that get writable bind mounts.Mount only what a workload needs, read-only whenever that's enough. See Volumes for the configuration and the strict, relaxed, and off identity modes.
Sharing is opt-in, and it changes the isolation story:
Rule of thumb: a shared volume is a deliberate hole in sandbox-to-sandbox isolation. Treat anything written there as visible to every sandbox that mounts it.
A snapshot captures a sandbox's writable layer plus a manifest that pins the base image it was built on. Restoring gives a new, independent sandbox its own writable copy. Snapshots don't capture memory, processes, or network state. They are purely a disk-state artifact.
A few things worth knowing:
See Snapshots for the workflow.
This is the one place the trust chain reaches outside your host, so it deserves a clear statement.
When microsandbox pulls or loads an image, it verifies that each layer's content matches the SHA-256 digest declared in the manifest. That catches corruption and accidental mismatch, and lets you pin an exact image by digest for reproducibility.
What it does not do is verify signatures or provenance. There is no cosign, Notary, or attestation check. Digest verification proves the bytes match what the manifest claims, but it does not prove the manifest came from who you think. In practice:
See Images for pulling, caching, and digests.