security//sandbox

A sandbox is an execution environment that deliberately restricts what code can reach or change. Useful boundaries include filesystem paths, processes, network destinations (network egress, a capability to scope explicitly), devices, credentials, system calls and resource consumption.


A sandbox is an execution environment that deliberately restricts what code can reach or change. Useful boundaries include filesystem paths, processes, network destinations (network egress, a capability to scope explicitly), devices, credentials, system calls and resource consumption.

Isolation is not a decorative container label. A sandbox that mounts production secrets or permits unrestricted outbound traffic may isolate one dimension while leaving the consequential ones open. The design question is always: if the workload becomes adversarial, what remains unreachable? Using access the sandbox already granted is not an escape; a sandbox escape defeats a boundary it really enforced.

Strength comes in grades. A container narrows what a process sees and calls (namespaces, seccomp) but shares the host's kernel, so one kernel flaw opens every container on the machine; a virtual machine or a micro-VM puts a separate kernel and a hypervisor in the way, which is why code from untrusted users, or an AI agent's generated code, is usually run inside one. No grade is total security, only a matching of the wall to how much the code is distrusted.

A good sandbox does not promise that code will behave. It makes misbehavior boring and bounded.