Sandboxing AI Agents
Docker is betting its next decade on AI agents. Its own answer is that containers aren't the sandbox. The container image is the useful part.
Read Docker's blog over the past month and you'd think it had become an AI company. At WeAreDevelopers North America in San Jose (September 23–25), Docker launched three things:
- Cloud Sandboxes, isolated environments for coding agents that run on Docker's own servers.
- The Sandbox Kit Specification, an open format for describing an agent and what it's allowed to reach.
- A plan to hand that spec to the CNCF, the foundation behind Kubernetes, for neutral governance.
I wrote recently about moving my whole home server to containers, so I was curious what the container has to do with agents. The answer turned out to be more interesting than "run your agent in Docker".
Containers aren't the sandbox
A container is not a strong security boundary, and Docker now says so plainly. A container shares the host's kernel and uses namespaces and cgroups to give one workload its own view of the system. That's the right tool for software that does one job and only touches what it's handed.
An agent is a different animal. It decides what to do next, installs packages it needs, opens ports, and tries something else when the first thing is blocked. In a container, the thing it's probing is the same kernel your host runs on.
So Docker's Sandboxes aren't containers at all. Each one is a microVM: a small virtual machine with its own kernel and its own Docker daemon. Inside, the agent can have root and build and run containers of its own. The damage stops at the VM boundary.
In the keynote, Docker showed an agent running in a container that had the host's Docker socket mounted. The agent used it to read a secret on the host (recap). It didn't exploit any bug. It used access the configuration had handed it. That one hit home. In my own container migration, the biggest trap was configuration too: ports Docker publishes skip the host firewall. The holes we dig ourselves are the ones that get us.
The real second act: the image format
If microVMs do the containing, what's left for containers? The format.
In 2015, Docker gave its image format and runtime to the Open Container Initiative. That's why an image built anywhere runs anywhere today. Docker is now trying the same move for agents. The problem it's aiming at is one I recognise. Everything an agent can do is a grant someone made: a mounted folder here, a token with more scope than the task needed there, a firewall rule opened "just for now". None of it is written down in one place. It lives in shell history, dashboards and memory. A few months in, nobody can say what the agent is actually allowed to do.
A Kit writes it down. It's an ordinary OCI image (the same kind docker pull fetches) that bundles three things:
- the agent itself;
- its tools (CLIs, MCP servers, instructions);
- a typed list of everything it asks to reach: hosts, credentials, volumes.
That list sits in an image annotation, so every registry, scanner and signing tool you already have handles a Kit without changes. Pinning the image digest pins the agent and its permissions together. Best of all, permissions become diffable. When a new version of an agent wants more access, that shows up as added lines in a review, and someone can refuse them.
The spec is Apache 2.0 on GitHub (docker/sandbox-kit-spec). Docker lists AWS, Datadog, JFrog, Palo Alto Networks and Snyk among the companies already building Kits.
Agents that never see the secret
The idea I like most is a small one. In Cloud Sandboxes, you store keys and tokens once, and a proxy injects them into each outgoing request. The agent never sees the secret itself.
That matters, because prompt injection, an agent obeying instructions hidden in a web page, an issue or a code comment, has no reliable fix at the model level. Docker's own rundown of agent risks is blunt about that. You can't stop an agent from being fooled. What you can do is make sure there's nothing valuable within its reach when it is. An agent can't leak a token it never had.
The catch: you're trusting the registry even more
If an image now carries an agent's permissions too, a compromised registry account becomes much more dangerous. Someone could publish an agent with wider access under a name you trust.
That isn't hypothetical. In the same weeks, Docker disclosed CVE-2026-105445. From August 2024 until it was fixed on September 30th, converting a Docker Hub account into an organization quietly handed that account's access tokens to whoever was named as the new owner. Nothing was rotated, and nobody was asked. An attacker could create an account, make a token, convert the account and name you as owner. Their token would then push and pull images as you. Docker fixed it within four hours of the report and notified the affected users, which is how it should go. It's still a reminder that an image tag is only as trustworthy as the account behind it.
My take
I use coding agents every day, and I think this is the right direction. Isolation at the VM level, permissions written down and reviewable, secrets kept out of the agent's hands. Putting the format under the CNCF rather than keeping it proprietary is the right call, too. It worked for container images.
I'd keep one eye on the business side, though. The spec is open, but Cloud Sandboxes is compute that Docker sells by the second. An open standard that happens to fit one vendor's product best is still a standard, so long as other runtimes actually adopt it. We'll see.
In the meantime, some rules that don't need any new product:
- Never mount the Docker socket into anything an agent runs in. It's root on the host by another name.
- Don't give agents your own credentials. Use narrow, short-lived tokens, scoped to the task.
- Pin images by digest, not by tag, for anything that acts on your behalf.
Containers changed how we ship software. Their second act may be telling us what that software is allowed to do.
References
- Introducing Cloud Sandboxes — Docker
- Trust Docker for the agents you don't (WeAreDevelopers recap) — Docker
- From Dockerfile to Kit: the Docker Sandboxes Kit Specification — Docker
- Docker and CNCF partner on an open spec for agent permissions — Docker
- AI Agent Security Risks — Docker
- Docker Hub security advisory, CVE-2026-105445 — Docker
- docker/sandbox-kit-spec on GitHub