> Markdown version of [/magazine/787-do-you-trust-your-agents-five-quick-ways-to-contain-them](https://www.wearedevelopers.com/magazine/787-do-you-trust-your-agents-five-quick-ways-to-contain-them). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Do You Trust Your Agents? Five Quick Ways to Contain Them **By:** [Daniel Cranney](https://www.wearedevelopers.com/@daniel-cranney) **Published:** October 22, 2026 **Do you trust your agents?** Most of us use coding agents every day now. Give one a vague request, walk away, and come back to a pile of mostly working software. It’s brilliant, right up until you remember you’ve handed a probabilistic machine access to your files, credentials and network. In this week’s Dev Digest, we’re looking at Docker’s Mark Cavage’s talk on exactly this question from WeAreDevelopers North America. In his demo, an AI agent was running inside a container, a setup many of us would consider safe. But the container had been given access to the host’s Docker socket, a common shortcut, and the agent used it to reach a secret file on the host machine. Containers were designed to keep applications apart, not to hold back a tool that can install software and run its own code. So we thought we’d share a few tips we picked up from the talk. ### ✅ Five things to do today 1. **Audit what it can reach.** Check Compose files, CI configs and dev containers for mounted sockets, privileged mode and broad host mounts like your home directory. 2. **Use a harder boundary.** A VM, micro-VM, disposable cloud machine or spare box. Let the agent have free rein inside it, and you can stop approving every single command. 3. **Lock down the network.** Block outbound traffic by default and allow only what the task needs: package registries, your Git host, specific APIs. 4. **Keep credentials out of reach.** Use scoped, short-lived tokens and a proxy or secrets manager that injects them, rather than a personal access token sitting in the agent’s environment. 5. **Set permissions in rules, not prompts.** Mark’s own agent can read his email and draft replies, but it can never press send. The capability simply isn’t there. Ask of every integration: could this be read-only? Once more than one person or agent is involved, also make it visible, stoppable and written down as config in the repo, so a teammate can run the same setup. Agents don’t have to be perfect, and trust doesn’t have to be either. Risk is a spectrum, and you can move fast once the foundations are solid. The agents may write the code, but you still own what ships. ### 📺 Want more? Watch the full talk There’s plenty more in the session: the live escape demo and the contained re-run, a network proxy that lets agents use credentials without ever seeing them, an open specification for describing sandboxed agent environments, and how to run agents in the cloud when you close your laptop. Watch it here: [Manufacturing Trust: Speed and Safety in the Age of Agents](https://www.wearedevelopers.com/videos/100550-manufacturing-trust-speed-and-safety-in-the-age-of-agents) ## Related Articles - [The Overflow: AI and Agentic Coding](https://www.wearedevelopers.com/magazine/721-the-overflow-ai-and-agentic-coding) - [Dev Digest 207: Spring Cleaning, AI Agent Manipulation and Stopping Bad Bots](https://www.wearedevelopers.com/magazine/695-dev-digest-207-spring-cleaning-ai-agent-manipulation-and-stopping-bad-bots) - [Never delegate the understanding](https://www.wearedevelopers.com/magazine/749-never-delegate-the-understanding) - [Dev Digest 176: Expensive Agents, Taking Over VSCode and Safer Vibe Coding](https://www.wearedevelopers.com/magazine/603-dev-digest-176-expensive-agents-taking-over-vscode-and-safer-vibe-coding) ## Related Videos - [Manufacturing trust: speed and safety in the age of agents](https://www.wearedevelopers.com/videos/100550-manufacturing-trust-speed-and-safety-in-the-age-of-agents) - [rm -rf: Horror Stories From Unsandboxed AI Agents (and How Docker Fixes This)](https://www.wearedevelopers.com/videos/100446-rm-rf-horror-stories-from-unsandboxed-ai-agents-and-how-docker-fixes-this) - [Give the Agent Its Own Machine](https://www.wearedevelopers.com/videos/100532-give-the-agent-its-own-machine) - [Supply Chain Security When Agents Write the Code](https://www.wearedevelopers.com/videos/100531-supply-chain-security-when-agents-write-the-code) ## Related Jobs - [Senior Software Engineer, Sandboxes (Eu Or East Coast Preferred)](https://www.wearedevelopers.com/jobs/ext/2161904-senior-software-engineer-sandboxes-eu-or-east-coast-preferred) at **Docker, Inc.** - [Staff Software Engineer, Agentic Platform](https://www.wearedevelopers.com/jobs/48464-staff-software-engineer-agentic-platform) at **Docker, Inc.** - [Senior Software Engineer, Sandboxes (Eu Or East Coast Preferred)](https://www.wearedevelopers.com/jobs/ext/2145616-senior-software-engineer-sandboxes-eu-or-east-coast-preferred) at **Docker, Inc.** - [Senior Software Engineer, Sandboxes (Eu Or East Coast Preferred)](https://www.wearedevelopers.com/jobs/ext/2159298-senior-software-engineer-sandboxes-eu-or-east-coast-preferred) at **Docker, Inc.** - [Senior Software Engineer, Sandboxes (Eu Or East Coast Preferred)](https://www.wearedevelopers.com/jobs/ext/2145730-senior-software-engineer-sandboxes-eu-or-east-coast-preferred) at **Docker, Inc.** - [Senior Software Engineer, Sandboxes](https://www.wearedevelopers.com/jobs/48460-senior-software-engineer-sandboxes) at **Docker, Inc.**