docs/security/secrets.mdx
"Secrets that can't leak" is a real guarantee with a precise shape. This page describes exactly how it works and, just as important, what it does and does not protect against. For the configuration surface like binding secrets, allow lists, and placeholders, see Secrets.
Instead of putting a real credential inside the VM, microsandbox puts a placeholder there. The real value stays in host memory. When the guest sends a request to a host you've allowed, the host-side network stack swaps the placeholder for the real value at the network boundary, on the way out. Anywhere else, the placeholder is just a meaningless string.
So a workload can call an API with a credential it never actually holds.
$MSB_<env_var> by default), never the real value.A placeholder only becomes a real value when every one of these holds. They use the same DNS and SNI machinery the network page describes:
Host or :authority must match the SNI, which closes domain-fronting.If any check fails, the placeholder is left untouched. The request goes out carrying a useless string, or it's blocked, depending on your policy.
evil.com and evil.com receives the placeholder, not the secret.Being candid about the edges matters more than the headline.
Real secret values exist only in the host process, only for the sandbox's lifetime. They are never written to the guest's environment, the guest's disk, or a snapshot. When the sandbox stops, they're gone.