Lesson 12.05 · Phase 12 · Safety, Security & Guardrails
Sandboxing with containers
A container is only a sandbox if you take things away: the network, the writable filesystem, root, capabilities, your home directory, and your secrets. The default docker run takes none of them away. Write the policy once, generate the command from it, and lint every command that didn't come from the policy.
Learning objectives
- Explain what a container isolates by default, what it doesn't, and where gVisor, Kata and microVMs add a stronger boundary.
- Generate a hardened docker run command from a sandbox policy: no network, read-only root, non-root user, no capabilities, resource limits, one mounted directory.
- Lint any docker run command for the flags that remove isolation (--privileged, the Docker socket, host namespaces, sensitive mounts, secrets in env).
- Probe a running sandbox to check the policy actually holds.
Phase 10 ran model-written code in a subprocess with timeouts, limits and an allow-listed environment, and ended with an honest warning: a process-level guard is not isolation. The code still runs as you, on your filesystem, with your network.
Loading the full lesson…