Skip to content
mentoor

Sandboxing agents

For engineers

Running agents and AI-written code in containers, microVMs and OS sandboxes with default-deny network egress, and the mistakes that break isolation

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

What does an OS-level sandbox in an agent CLI do that a permission prompt does not?

Choose one answer

Check yourself · 2 of 5

What does a Docker container NOT isolate from the host?

Choose one answer

Check yourself · 3 of 5

What is the main security difference between a container and a Firecracker microVM?

Choose one answer

Check yourself · 4 of 5

What does default-deny egress mean for an agent sandbox?

Choose one answer

Check yourself · 5 of 5

Why is mounting /var/run/docker.sock into an agent container dangerous?

Choose one answer

Topics

  1. Built-in sandboxes in agent CLIs4 min read · OS-level sandboxing in coding agents such as Claude Code and Codex CLI (Seatbelt, bubblewrap, Landlock), sandbox modes and how they pair with approvals
  2. Container sandboxes for coding agents4 min read · Dev containers and Docker for agents: non-root users, minimal mounts, dropped capabilities, and the shared kernel a container does not isolate
  3. MicroVMs and hosted sandboxes for untrusted code4 min read · gVisor, Firecracker microVMs and hosted code sandboxes, and when untrusted AI-generated code needs a VM boundary instead of a container
  4. Default-deny network egress for agents4 min read · Proxy allow-lists for package registries and APIs, blocking everything else, and data leaving through DNS or allowed domains
  5. Sandbox escapes and leaky mounts4 min read · Mounted Docker sockets, home directories, SSH keys and .env files, privileged mode and host networking that quietly undo a sandbox

Start here

Helps to know first

110 questions · last verified 2026-12