<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anoop Gopi</title>
    <description>The latest articles on DEV Community by Anoop Gopi (@anoopgopi).</description>
    <link>https://dev.to/anoopgopi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271634%2Fb38baa03-504d-4181-85fc-0faab0f8bc32.jpg</url>
      <title>DEV Community: Anoop Gopi</title>
      <link>https://dev.to/anoopgopi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anoopgopi"/>
    <language>en</language>
    <item>
      <title>Give Your Coding Agent sudo, Not Your Laptop: Docker Sandboxes in Practice</title>
      <dc:creator>Anoop Gopi</dc:creator>
      <pubDate>Sun, 29 Nov 2026 04:02:26 +0000</pubDate>
      <link>https://dev.to/anoopgopi/give-your-coding-agent-sudo-not-your-laptop-docker-sandboxes-in-practice-1fb2</link>
      <guid>https://dev.to/anoopgopi/give-your-coding-agent-sudo-not-your-laptop-docker-sandboxes-in-practice-1fb2</guid>
      <description>&lt;p&gt;&lt;em&gt;The local steps ran on Mac with sbx 0.54.1; the GitHub secret and cloud parts come from Docker's docs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you use Claude Code or Codex every day, you know how this goes. At first you approve every command. By the twentieth &lt;code&gt;npm install&lt;/code&gt; you're tired of clicking yes, so you let the agent run on its own.&lt;/p&gt;

&lt;p&gt;From that point on, the agent is working on your laptop, in your shell, with your files and your credentials, and nobody is watching each step. Usually nothing goes wrong. But "usually" isn't a security model.&lt;/p&gt;

&lt;p&gt;Docker Sandboxes are Docker's answer to this. In this post I'll cover what they are, how to set one up, and what they don't protect you from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a normal container isn't enough
&lt;/h2&gt;

&lt;p&gt;Most of us would reach for a container first. Put the agent in a container and call it done.&lt;/p&gt;

&lt;p&gt;The problem is that agents usually need Docker too, to build an image or start a test database. The quick fix is to mount &lt;code&gt;/var/run/docker.sock&lt;/code&gt; into the container. With a typical rootful Docker daemon on Linux, that gives the agent enough control to start a privileged container and mount the host filesystem. Docker's own docs say only trusted users should control the daemon (&lt;a href="https://docs.docker.com/engine/security/#docker-daemon-attack-surface" rel="noopener noreferrer"&gt;Docker daemon attack surface&lt;/a&gt;). Once the socket is mounted, the container is still there, but it isn't protecting much.&lt;/p&gt;

&lt;p&gt;A container does not make the code inside it trustworthy. An agent decides for itself what to install and run, and it can be tricked by what it reads. Docker said as much when it relaunched its brand on 19 November 2026: "Containers isolate workloads. But agents aren't workloads. Agents are actors." (&lt;a href="https://www.docker.com/blog/meet-the-new-docker-built-to-run-on-trust/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;). That's a marketing line, but the point behind it is right.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Docker Sandbox is
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://docs.docker.com/ai/sandboxes/" rel="noopener noreferrer"&gt;Docker Sandbox&lt;/a&gt; is a small virtual machine (a microVM) where an agent can work across multiple sessions. You manage it with a CLI called &lt;code&gt;sbx&lt;/code&gt;. Each sandbox has its own Linux kernel, so the agent is separated from your machine by a hypervisor, not just by Linux namespaces. Docker built its own VMM for this. It uses the native hypervisor on each platform: Hypervisor.framework on macOS, Windows Hypervisor Platform on Windows and KVM on Linux (&lt;a href="https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/" rel="noopener noreferrer"&gt;architecture post&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Inside the VM, the agent gets its own Docker Engine. It can run &lt;code&gt;docker build&lt;/code&gt;, &lt;code&gt;docker run&lt;/code&gt; and &lt;code&gt;docker compose&lt;/code&gt; without touching your host daemon. The &lt;a href="https://docs.docker.com/ai/sandboxes/security/isolation/" rel="noopener noreferrer"&gt;isolation docs&lt;/a&gt; put it plainly: "The agent has no path to your host Docker daemon."&lt;/p&gt;

&lt;p&gt;For local sandboxes, network access follows a deny-by-default policy. Outbound TCP only reaches destinations a rule allows, UDP is off, ICMP is blocked, and DNS goes through a resolver that applies the same rules (&lt;a href="https://docs.docker.com/ai/sandboxes/security/defaults/" rel="noopener noreferrer"&gt;default security posture&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Proxy-managed credentials stay outside the local VM. When you store an API key or token with &lt;code&gt;sbx secret&lt;/code&gt;, a proxy on your host adds it to matching outgoing requests. The agent sees a placeholder, not the real value. This doesn't protect secrets you leave in project files, or credentials an agent saves inside the VM (&lt;a href="https://docs.docker.com/ai/sandboxes/configuration/credentials/" rel="noopener noreferrer"&gt;credential docs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fosq62hnbj0oao5c6eqp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fosq62hnbj0oao5c6eqp6.png" alt="Docker Sandbox architecture: the agent runs in a microVM with its own kernel and Docker Engine; a host-side proxy enforces network policy and injects credentials" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the VM the agent has a lot of freedom. It runs as a non-root user with &lt;code&gt;sudo&lt;/code&gt;, it can install packages with apt, pip or npm, and it can run containers. That's on purpose. Docker relies on the VM boundary rather than restricting the agent's privileges inside it.&lt;/p&gt;

&lt;p&gt;The trade-offs are a slower first run, while the agent image is pulled, and one more environment to manage. For code you trust, regular containers are still fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting one up
&lt;/h2&gt;

&lt;p&gt;You don't need Docker Desktop for this. &lt;code&gt;sbx&lt;/code&gt; is a standalone CLI. Local sandboxes need macOS 14 or later on Apple silicon, Windows 11 with Windows Hypervisor Platform turned on, or Ubuntu 24.04 or later with KVM (&lt;a href="https://docs.docker.com/ai/sandboxes/install/" rel="noopener noreferrer"&gt;install docs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;You'll need a Docker account to sign in. Install the CLI, then log in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# macOS&lt;/span&gt;
brew trust docker/tap
brew install docker/tap/sbx

&lt;span class="c"&gt;# Windows&lt;/span&gt;
winget install -h Docker.sbx

&lt;span class="c"&gt;# then, on any platform&lt;/span&gt;
sbx login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you skip &lt;code&gt;sbx login&lt;/code&gt;, the first &lt;code&gt;sbx create&lt;/code&gt; or &lt;code&gt;sbx run&lt;/code&gt; starts the sign-in for you.&lt;/p&gt;

&lt;p&gt;On Ubuntu, &lt;code&gt;sbx&lt;/code&gt; comes from Docker's apt repository as the &lt;code&gt;docker-sbx&lt;/code&gt; package. Follow the &lt;a href="https://docs.docker.com/ai/sandboxes/install/" rel="noopener noreferrer"&gt;install docs&lt;/a&gt; for that.&lt;/p&gt;

&lt;p&gt;Then go to your project and start an agent (&lt;a href="https://docs.docker.com/ai/sandboxes/get-started/" rel="noopener noreferrer"&gt;get started guide&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/my-project
sbx policy init balanced
sbx run --name my-sandbox claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;sbx policy init balanced&lt;/code&gt; sets your network rules up front. The Balanced preset allows common development services and blocks everything else until you approve it. If you skip this step, &lt;code&gt;sbx&lt;/code&gt; asks you to pick a preset on the first run.&lt;/p&gt;

&lt;p&gt;If you use Claude Code with a Max, Team or Enterprise subscription, run &lt;code&gt;/login&lt;/code&gt; inside the sandbox. The session token stays on your host. When I first started it, Claude Code said "Not logged in", so expect to do this once. If you pay per API call instead, store your key on the host with &lt;code&gt;sbx secret set&lt;/code&gt; (&lt;a href="https://docs.docker.com/ai/sandboxes/configuration/credentials/" rel="noopener noreferrer"&gt;credential docs&lt;/a&gt;) rather than pasting it into the sandbox. Codex, Copilot, Cursor, Devin, Droid, Kiro, OpenCode and Docker Agent are also supported, and so is a plain shell.&lt;/p&gt;

&lt;p&gt;From a second terminal you can see what's running and open up network access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sbx ls
sbx policy ls
sbx policy allow network registry.npmjs.org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the agent needs a site outside the active rules, it gets blocked and you decide whether to allow it. Balanced already permits common services, so the npm registry example may not need an extra rule. Don't approve on autopilot. Each "yes" adds to what the agent can reach.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I saw when I tried it
&lt;/h3&gt;

&lt;p&gt;I ran these checks on macOS with &lt;code&gt;sbx&lt;/code&gt; 0.54.1 and the Balanced preset, from a shell inside the sandbox:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sudo whoami&lt;/code&gt; printed &lt;code&gt;root&lt;/code&gt;. The agent really does get sudo inside the VM.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker run --rm hello-world&lt;/code&gt; pulled and ran on the sandbox's own engine. &lt;code&gt;docker info&lt;/code&gt; reported the sandbox's name, not my Mac. There is a &lt;code&gt;/var/run/docker.sock&lt;/code&gt; inside the sandbox, but it belongs to that private engine.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl -sI https://example.com&lt;/code&gt; got &lt;code&gt;403 Forbidden&lt;/code&gt; from the sandbox proxy. The site isn't on the Balanced allow-list, so it was blocked.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl -sI https://registry.npmjs.org&lt;/code&gt; went through the proxy and returned &lt;code&gt;200&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Keep tokens out of the sandbox
&lt;/h3&gt;

&lt;p&gt;If the agent needs GitHub, don't paste a token into the sandbox. Store it on the host instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sbx secret &lt;span class="nb"&gt;set&lt;/span&gt; github --command &lt;span class="s1"&gt;'gh auth token'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proxy adds the token to GitHub requests, so the real value never enters the VM. Be clear about what this does and doesn't do. While the agent runs, it can still use that access, for example to push to any repo the token allows. So give the token the smallest scope that works. What the agent can't do is copy the token out and reuse it somewhere else later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your project folder is shared by default
&lt;/h3&gt;

&lt;p&gt;This is the one people miss. When you run &lt;code&gt;sbx run&lt;/code&gt; without a path, your current folder is mounted read-write. When I tried it in a test folder, the startup summary said so plainly: &lt;code&gt;Workspace: /tmp/sbx-demo (rw)&lt;/code&gt;. Docker's &lt;a href="https://docs.docker.com/ai/sandboxes/security/isolation/#workspace-isolation" rel="noopener noreferrer"&gt;workspace isolation docs&lt;/a&gt; say: "There is no boundary between the agent's edits and your host filesystem." The agent can change build scripts, CI files, IDE settings, agent config like &lt;code&gt;.claude/settings.json&lt;/code&gt;, and Git hooks. Changes to &lt;code&gt;.git/hooks/&lt;/code&gt; don't show up in &lt;code&gt;git diff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You choose how much of your project the agent sees:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;th&gt;What the agent can touch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Direct mount&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sbx run claude&lt;/code&gt; in your project&lt;/td&gt;
&lt;td&gt;Your working tree, read-write, hooks included&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clone&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sbx run --clone claude .&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A private clone inside the VM; your repo is mounted read-only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mountless&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sbx create --name scratch claude&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No host project files&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For anything that runs unattended, use clone mode. Docker recommends it for unfamiliar agents and for running several agents on one repo. The agent works on its own clone. When I tried it, the startup summary still said &lt;code&gt;Workspace: /tmp/sbx-demo (rw)&lt;/code&gt;, which looks alarming but refers to the agent's clone inside the VM. The line to check is &lt;code&gt;source /tmp/sbx-demo → /run/sandbox/source (ro)&lt;/code&gt;: your repo is mounted read-only.&lt;/p&gt;

&lt;p&gt;To get the agent's commits, run &lt;code&gt;git fetch sandbox-&amp;lt;name&amp;gt;&lt;/code&gt; in your repo while the sandbox is running (&lt;a href="https://docs.docker.com/ai/sandboxes/workflows/git/" rel="noopener noreferrer"&gt;Git workflows&lt;/a&gt;). Fetched branches are kept under &lt;code&gt;refs/sandboxes/&amp;lt;name&amp;gt;/&lt;/code&gt;, so they survive &lt;code&gt;sbx rm&lt;/code&gt;. Turn one into a normal branch with &lt;code&gt;git branch my-branch refs/sandboxes/&amp;lt;name&amp;gt;/&amp;lt;branch&amp;gt;&lt;/code&gt;. Fetch before you remove the sandbox: &lt;code&gt;sbx rm&lt;/code&gt; warns you, but anything you didn't fetch is lost.&lt;/p&gt;

&lt;p&gt;One catch: clone mode stops the agent from changing your repo, not from reading it. Untracked files like &lt;code&gt;.env&lt;/code&gt; are still readable inside the sandbox. Keep secrets out of the project folder and use &lt;code&gt;sbx secret&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;When you're done:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sbx stop my-sandbox   &lt;span class="c"&gt;# keeps state&lt;/span&gt;
sbx rm my-sandbox     &lt;span class="c"&gt;# asks to confirm; deletes the VM and everything in it, not your host files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To come back to a sandbox later, run &lt;code&gt;sbx run --name my-sandbox&lt;/code&gt;. Running &lt;code&gt;sbx&lt;/code&gt; on its own opens a dashboard of all your sandboxes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local or cloud?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;sbx&lt;/code&gt; CLI and local sandboxes are free, including for commercial use (&lt;a href="https://docs.docker.com/ai/sandboxes/" rel="noopener noreferrer"&gt;docs&lt;/a&gt;). Since 24 September 2026 you can also run sandboxes on Docker's cloud (&lt;a href="https://www.docker.com/blog/introducing-cloud-sandboxes-start-on-your-laptop-finish-in-the-cloud/" rel="noopener noreferrer"&gt;announcement&lt;/a&gt;). That's useful for long or overnight jobs, or when you want to close your laptop. Cloud sandboxes are part of Docker Agentic Platform, which Docker still labels experimental.&lt;/p&gt;

&lt;p&gt;Cloud compute is billed per second, by sandbox size, and a stopped sandbox isn't billed. Prices can change, so I'm not listing them here: see Docker's &lt;a href="https://www.docker.com/blog/introducing-cloud-sandboxes-start-on-your-laptop-finish-in-the-cloud/" rel="noopener noreferrer"&gt;Cloud Sandboxes announcement&lt;/a&gt; for the launch details and the &lt;a href="https://agentic-platform.docker.com/usage" rel="noopener noreferrer"&gt;Usage &amp;amp; billing&lt;/a&gt; page in the Agentic Platform console for current rates. Model usage is billed by your model provider, not Docker.&lt;/p&gt;

&lt;p&gt;To use the cloud, you turn on the &lt;a href="https://docs.docker.com/agentic-platform/signup/" rel="noopener noreferrer"&gt;Docker Agentic Platform pay-as-you-go plan&lt;/a&gt; for your personal Docker account. It's billed separately from your regular Docker subscription. Cloud sandboxes expire after one hour by default, and you can extend that up to 24 hours from creation. Copy your work out before a sandbox expires. The &lt;a href="https://docs.docker.com/ai/sandboxes/cloud/usage/#configure-expiration" rel="noopener noreferrer"&gt;cloud lifecycle docs&lt;/a&gt; explain what happens to stopped sandboxes.&lt;/p&gt;

&lt;p&gt;To move a local sandbox to the cloud:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sbx move my-project --to cloud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This copies a snapshot of the sandbox's filesystem. A few things don't come with it (&lt;a href="https://docs.docker.com/ai/sandboxes/cloud/move/" rel="noopener noreferrer"&gt;move docs&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running processes and memory.&lt;/li&gt;
&lt;li&gt;Workspace mounts and clone-mode volumes. A direct-mounted project stays on your machine, and clone-mode volumes are excluded too. Copy or commit the work you need separately.&lt;/li&gt;
&lt;li&gt;Secrets from your local store, and the network rules you added locally. You set those up again on the cloud side.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The destination must support the source architecture: &lt;code&gt;sbx move&lt;/code&gt; does not convert between Arm and x86. It creates a separate sandbox and leaves the source in place; later changes are not synchronized.&lt;/p&gt;

&lt;p&gt;One thing does come with it. If an agent signed in from inside the sandbox and saved a credential to disk, that file goes along with the snapshot. Remove in-sandbox credentials before you move.&lt;/p&gt;

&lt;p&gt;One current cloud limitation: &lt;code&gt;docker exec&lt;/code&gt;, &lt;code&gt;docker compose exec&lt;/code&gt; and healthchecks can use the sandbox VM filesystem instead of the target container's filesystem. Check the &lt;a href="https://docs.docker.com/ai/sandboxes/cloud/usage/#known-limitations" rel="noopener noreferrer"&gt;known limitations&lt;/a&gt; before moving a container-based test workflow.&lt;/p&gt;

&lt;p&gt;For teams, &lt;a href="https://docs.docker.com/ai/governance/" rel="noopener noreferrer"&gt;Docker AI Governance&lt;/a&gt; (a separate paid product) lets admins set network, filesystem and MCP rules for everyone's local sandboxes. Org rules take priority over local ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  What sandboxes don't protect you from
&lt;/h2&gt;

&lt;p&gt;Docker's &lt;a href="https://docs.docker.com/ai/sandboxes/security/isolation/" rel="noopener noreferrer"&gt;isolation docs&lt;/a&gt; are honest about the limits. These are the ones I'd keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct-mount edits.&lt;/strong&gt; The agent can edit hooks, CI config, build files and IDE tasks that run later on your host. Docker's advice is to review those changes like a pull request from someone you don't know.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared skills.&lt;/strong&gt; Supported agents also mount a persistent host-side skills store read-only by default. A sandbox granted write access can change skills that other sandboxes load. Use &lt;code&gt;--skills=off&lt;/code&gt; at creation if you do not want that mount.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard links.&lt;/strong&gt; If a file in your project is a hard link to a file outside it, the agent can change the original. Filesystem rules don't catch this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local MCP servers.&lt;/strong&gt; MCP servers that run locally over stdio run on your host, not in the VM. They are not sandboxed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSH agent and clipboard.&lt;/strong&gt; SSH agent forwarding is on by default. Your private keys stay on the host, but anything in the sandbox can ask the agent to sign. The sandbox can also write to your clipboard, so check what you paste after running untrusted code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment files.&lt;/strong&gt; Sandbox environment files can run commands on your host with your permissions. &lt;code&gt;sbx&lt;/code&gt; shows you a plan first. Read it before you approve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your allow-list.&lt;/strong&gt; Every site you allow is a site the agent could send your data to. Keep it short.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection.&lt;/strong&gt; The sandbox limits the damage, but an agent that reads a poisoned README can still misuse whatever access you gave it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point is why a sandbox doesn't replace review. It decides how bad a mistake can get, not whether the agent makes one. Anything that leaves the sandbox still needs a human to look at it first: a push to a shared branch, a production credential, a change to CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Stop mounting &lt;code&gt;docker.sock&lt;/code&gt; into agent containers. If the agent needs Docker, give it a sandbox.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;sbx policy init balanced&lt;/code&gt; and allow only the sites your agent needs.&lt;/li&gt;
&lt;li&gt;Use clone mode (&lt;code&gt;sbx run --clone claude .&lt;/code&gt;) for unattended runs, and keep &lt;code&gt;.env&lt;/code&gt; files out of the project folder.&lt;/li&gt;
&lt;li&gt;Store tokens with &lt;code&gt;sbx secret set&lt;/code&gt; and keep their scope small.&lt;/li&gt;
&lt;li&gt;After each session, check the diff and &lt;code&gt;.git/hooks/&lt;/code&gt; before you build or push.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Docker, "Meet the New Docker: Built to Run on Trust" (19 Nov 2026) — &lt;a href="https://www.docker.com/blog/meet-the-new-docker-built-to-run-on-trust/" rel="noopener noreferrer"&gt;https://www.docker.com/blog/meet-the-new-docker-built-to-run-on-trust/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Docker Sandboxes" — &lt;a href="https://docs.docker.com/ai/sandboxes/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Install Docker Sandboxes" — &lt;a href="https://docs.docker.com/ai/sandboxes/install/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/install/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Get started with Docker Sandboxes" — &lt;a href="https://docs.docker.com/ai/sandboxes/get-started/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/get-started/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Default security posture" — &lt;a href="https://docs.docker.com/ai/sandboxes/security/defaults/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/security/defaults/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Isolation layers" (includes workspace isolation) — &lt;a href="https://docs.docker.com/ai/sandboxes/security/isolation/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/security/isolation/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Cloud sandboxes" — &lt;a href="https://docs.docker.com/ai/sandboxes/cloud/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/cloud/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Move a sandbox" — &lt;a href="https://docs.docker.com/ai/sandboxes/cloud/move/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/cloud/move/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sekaran &amp;amp; Gumbley, "Why MicroVMs: The Architecture Behind Docker Sandboxes" (16 Apr 2026) — &lt;a href="https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/" rel="noopener noreferrer"&gt;https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Karia &amp;amp; Sekaran, "Introducing Cloud Sandboxes" (24 Sep 2026) — &lt;a href="https://www.docker.com/blog/introducing-cloud-sandboxes-start-on-your-laptop-finish-in-the-cloud/" rel="noopener noreferrer"&gt;https://www.docker.com/blog/introducing-cloud-sandboxes-start-on-your-laptop-finish-in-the-cloud/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Docker daemon attack surface" — &lt;a href="https://docs.docker.com/engine/security/#docker-daemon-attack-surface" rel="noopener noreferrer"&gt;https://docs.docker.com/engine/security/#docker-daemon-attack-surface&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Manage credentials" — &lt;a href="https://docs.docker.com/ai/sandboxes/configuration/credentials/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/configuration/credentials/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Sign up for Docker Agentic Platform" — &lt;a href="https://docs.docker.com/agentic-platform/signup/" rel="noopener noreferrer"&gt;https://docs.docker.com/agentic-platform/signup/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Use cloud sandboxes" — &lt;a href="https://docs.docker.com/ai/sandboxes/cloud/usage/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/cloud/usage/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "AI governance" — &lt;a href="https://docs.docker.com/ai/governance/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/governance/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Agentic Platform, "Usage &amp;amp; billing" (sign-in required) — &lt;a href="https://agentic-platform.docker.com/usage" rel="noopener noreferrer"&gt;https://agentic-platform.docker.com/usage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Docs, "Git workflows" — &lt;a href="https://docs.docker.com/ai/sandboxes/workflows/git/" rel="noopener noreferrer"&gt;https://docs.docker.com/ai/sandboxes/workflows/git/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Anoop Gopi is a Docker Captain. Views are his own and not Docker's.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>ai</category>
      <category>security</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
