Sandboxing AI Coding Agents: A Hands-On Comparison of Four Tools

Summary
A hands-on Linux evaluation compares nono, Docker Sandboxes, Microsandbox, and NVIDIA OpenShell, examining their isolation, network controls, credential handling, usability, and limitations as defenses for AI coding agents.
Key points
- The authors evaluated the four tools using documentation and short-term Linux use, typically with GitHub Copilot CLI and OpenCode.
- Their scores ranged from 4 to 4.5 out of 5; they did not attempt sandbox escapes, and describe the evaluation as not a security audit.
- Docker Sandboxes and Microsandbox use microVMs; OpenShell supports multiple isolation backends; nono uses OS-level primitives and shares the host kernel.
- Only nono and OpenShell support scoping injected credentials to both a domain and an endpoint.
- All four tools lack the ability to deny a specific file inside an allowed directory and to customize the allowed syscall list.
- The authors recommend sandboxing to limit the impact of prompt injection or agent mistakes, while warning that writable project files and overly broad network access remain risks.
Article Details
- Defense Focus
- Limit the impact of manipulated or mistaken AI coding agents by running them in properly configured sandboxes, restricting access to files, network destinations, credentials, and system resources.
- Detection Methods
- Review sandbox network proxy logs and blocked-connection events.
- Monitor filesystem access denials and policy decisions; use nono's post-session suggestions to review blocked paths and requests.
- Use audit trails to track policy decisions and changes, network connections, filesystem decisions, commands, and sandbox lifecycle events.
- Review sandboxed-process stdout and stderr alongside lifecycle logs.
- Data Sources
- Network proxy logs and connection records
- Sandbox audit and policy-decision logs, including Docker Sandboxes local JSONL audit files
- Filesystem access and policy-decision events
- Sandboxed-process stdout and stderr
- Sandbox lifecycle events
- OpenShell OCSF-format logs, which can be sent to an OpenTelemetry collector
- Rule Types
- Outbound network allow/deny policies using domains, IP addresses, CIDR ranges, ports, and protocols
- HTTP method, path, and query-parameter filtering where supported
- Per-binary network policies and MCP tool, protocol-version, or method filters where supported
- Filesystem read/write permissions and host-directory mount restrictions
- Credential injection rules scoped to approved domains and, where supported, specific endpoints
- CPU, memory, process-count, disk, and other sandbox resource limits
- Platforms
- Linux
- macOS
- Windows
- WSL2
- KVM on Linux
- Hypervisor.framework on macOS
- Defensive Actions
- Run coding agents in a dedicated sandbox; consider MicroVM isolation when stronger separation is needed.
- Restrict filesystem access to necessary project files and mounts, and avoid granting access to sensitive host paths such as ~/.ssh.
- Keep secrets out of project directories and the sandbox; use credential injection scoped to approved destinations and endpoints.
- Restrict outbound traffic by destination and, where available, HTTP method, path, and query parameters. Handle DNS outside the sandbox and enable DNS exfiltration and rebinding protections where available.
- Set resource limits, and use filesystem snapshots or rollback where supported.
- Review blocked requests and policy-change logs before approving additional access; grant only permissions required for the task.
- Remember that writable project files can still be modified by the agent and may later be used on the host or deployed.
MITRE ATT&CK
T1048.003 · Exfiltration Over Unencrypted Non-C2 ProtocolThe article warns that an attacker could use DNS requests to exfiltrate secrets accessible to an AI coding agent.T1567.001 · Exfiltration to Code RepositoryThe article describes how an attacker could exfiltrate secrets by having an agent push a gist or commit to a repository the attacker can access.
People
Vendors
AnthropicMeanwhile, Anthropic reports that prompt injection attack success rate (ASR) against Fable 5, Opus 5 and Sonnet 5 is as low as 0.0% and therefore made Auto mode the default mechanism to automatically classify commandsDockerIn this blog post, we compare four major sandboxing tools for AI coding agents in a hands-on approach: nono, Docker Sandboxes, Microsandbox and OpenShell.Hugging FaceThe OpenAI and Hugging Face incident is a great example of that. In July, OpenAI failed to properly sandbox their fleet of agents running a cybersecurity benchmark (ExploitGym). Because the environment was not properlynolabsIt doesn't require an account and it's made by the author of Sigstore, Luke Hinds, and his team at nolabs.NvidiaNVIDIA OpenShellOpenAIThe OpenAI and Hugging Face incident is a great example of that. In July, OpenAI failed to properly sandbox their fleet of agents running a cybersecurity benchmark (ExploitGym). Because the environment was not properlySuper Rad CompanyMicrosandbox is built by Super Rad Company and uses MicroVMs for isolation. It's open source and written in Rust on top of libkrunfw. It supports running any OCI image and comes with SDKs for various languages to manage
Products
Claude Codetherefore made Auto mode the default mechanism to automatically classify commands to be executed in Claude Code in August. Even though Anthropic claims a 0.0% ASR, Johann Rehberger showed that he obtained a 60-80%CursorClaude Code, Cursor, Copilot CLI and other AI coding agents come with a built-in sandboxing feature, which is often turned off by default. We tried these features in GitHub Copilot for VS Code and Claude Code. They areDocker SandboxesIn this blog post, we compare four major sandboxing tools for AI coding agents in a hands-on approach: nono, Docker Sandboxes, Microsandbox and OpenShell.Firecrackerfor sandboxing. It escaped three times using 3 different techniques. It wasn't able to escape from a Firecracker MicroVM though. Probably because it has a much smaller attack surface and it's a harder target toGitHub Copilot CLIinstalled the tool on Linux and used it for a short period of time on real work, typically with GitHub Copilot CLI and OpenCode. We used the criteria listed above to evaluate each tool.MicrosandboxIn this blog post, we compare four major sandboxing tools for AI coding agents in a hands-on approach: nono, Docker Sandboxes, Microsandbox and OpenShell.nonoIn this blog post, we compare four major sandboxing tools for AI coding agents in a hands-on approach: nono, Docker Sandboxes, Microsandbox and OpenShell.OpenCodetool on Linux and used it for a short period of time on real work, typically with GitHub Copilot CLI and OpenCode. We used the criteria listed above to evaluate each tool.OpenShellIn this blog post, we compare four major sandboxing tools for AI coding agents in a hands-on approach: nono, Docker Sandboxes, Microsandbox and OpenShell.
