<?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: WaterMill | Digital Agency</title>
    <description>The latest articles on DEV Community by WaterMill | Digital Agency (watermill).</description>
    <link>https://dev.to/watermill</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%2Forganization%2Fprofile_image%2F15886%2F490b3cf4-b38d-434c-a9d5-96cdc60c3dc1.png</url>
      <title>DEV Community: WaterMill | Digital Agency</title>
      <link>https://dev.to/watermill</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/watermill"/>
    <language>en</language>
    <item>
      <title>Let’s Talk About Claude Code, Part 2: Container or Sandbox VM?</title>
      <dc:creator>Ben Miller</dc:creator>
      <pubDate>Thu, 05 Nov 2026 16:39:55 +0000</pubDate>
      <link>https://dev.to/watermill/lets-talk-about-claude-code-part-2-container-or-sandbox-vm-302d</link>
      <guid>https://dev.to/watermill/lets-talk-about-claude-code-part-2-container-or-sandbox-vm-302d</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/bmillerz/lets-talk-about-claude-code-part-1-where-is-your-agent-actually-running-35ff"&gt;Part 1&lt;/a&gt; I said every project of mine now runs in a Docker Sandbox, and I promised to explain why I picked that over a plain dev container.&lt;/p&gt;

&lt;p&gt;A dev container is a big step up from running an agent straight on your laptop. It stops the agent wandering into your other repos and your &lt;code&gt;~/.ssh&lt;/code&gt;. It still leaves two gaps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gap 1: the kernel is shared
&lt;/h2&gt;

&lt;p&gt;A container shares your machine's kernel. If anything breaks out, it lands on your host, with all the credentials from Part 1 sitting there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gap 2: Docker inside Docker
&lt;/h2&gt;

&lt;p&gt;Most of my projects need Docker for Postgres, Redis and Mailpit. Giving an agent Docker from inside a container usually means mounting the Docker socket:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -v /var/run/docker.sock:/var/run/docker.sock ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That effectively hands the agent your machine. Anything that can talk to the socket can start a privileged container with your whole filesystem mounted, and you're back where Part 1 started.&lt;/p&gt;

&lt;h2&gt;
  
  
  How sbx closes both
&lt;/h2&gt;

&lt;p&gt;Docker Sandboxes (&lt;code&gt;sbx&lt;/code&gt;) gives each agent its own microVM, with its own kernel and its own Docker engine. The agent can run the whole stack without touching mine.&lt;/p&gt;

&lt;p&gt;Outbound traffic goes through a network policy, so I decide what it can talk to:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sbx policy allow network registry.npmjs.org,packagist.org
sbx policy log    # what was blocked, and why
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Git credentials are injected by the proxy, so the token never sits inside the VM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trade-off
&lt;/h2&gt;

&lt;p&gt;As I said in Part 1, sbx skips permission prompts by default. That doesn't cure the habit of approving on autopilot. It replaces the prompts with a hard boundary, so the boundary has to be right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the boundary stops
&lt;/h2&gt;

&lt;p&gt;Part 1 covered the obvious one: the project folder is shared, so the agent can break anything in it. Two less obvious ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;That includes git history.&lt;/strong&gt; A reset or a deleted &lt;code&gt;.git&lt;/code&gt; folder is as easy to do as a deleted file. Push to a remote often, not just commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Files it writes can run on your host.&lt;/strong&gt; Git hooks, &lt;code&gt;package.json&lt;/code&gt; scripts and build config all run on your machine the next time you use them outside the sandbox. Review what changed before you run it there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If that worries you, sbx has a clone mode (&lt;code&gt;--clone&lt;/code&gt;). The agent works in its own git clone, and nothing reaches your checkout until you fetch it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next up
&lt;/h2&gt;

&lt;p&gt;Network rules: what your agent should be allowed to reach.&lt;/p&gt;

&lt;p&gt;If you're already sandboxing agents, what's on your allowlist? I'm curious where people draw the line on package registries and third-party APIs.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>docker</category>
      <category>security</category>
    </item>
    <item>
      <title>Let's Talk About Claude Code, Part 1: Where Is Your Agent Actually Running?</title>
      <dc:creator>Ben Miller</dc:creator>
      <pubDate>Wed, 04 Nov 2026 17:01:17 +0000</pubDate>
      <link>https://dev.to/watermill/lets-talk-about-claude-code-part-1-where-is-your-agent-actually-running-35ff</link>
      <guid>https://dev.to/watermill/lets-talk-about-claude-code-part-1-where-is-your-agent-actually-running-35ff</guid>
      <description>&lt;p&gt;I've watched a coding agent wander out of its project folder and start reading other client repos on the same laptop. It wasn't doing anything malicious. It was trying to be helpful. But some of those repos had production credentials in them, and they all got rotated that afternoon.&lt;/p&gt;

&lt;p&gt;Most discussion about coding agents is about which model to use. Much less of it covers where the agent runs, and that's where most of the risk is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an agent on your host can reach
&lt;/h2&gt;

&lt;p&gt;Run Claude Code directly on your machine and it runs as you. Whatever your user account can read, it can read too, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH keys in &lt;code&gt;~/.ssh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Cloud credentials in &lt;code&gt;~/.aws&lt;/code&gt;, &lt;code&gt;~/.config/gcloud&lt;/code&gt; and similar&lt;/li&gt;
&lt;li&gt;Every &lt;code&gt;.env&lt;/code&gt; file in every project on the disk&lt;/li&gt;
&lt;li&gt;Every other repo you've cloned, including ones for other clients&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one is what caught me out. Nobody worries about the agent reading the repo it's working in. The problem is everything else that happens to be on the same disk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why permission prompts aren't enough
&lt;/h2&gt;

&lt;p&gt;Claude Code asks before it runs commands or touches files outside the working directory. That works for the first few prompts. By the fortieth in a session you're approving without reading, or you've turned on skip-permissions so they stop interrupting you.&lt;/p&gt;

&lt;p&gt;Prompts depend on a human paying attention every time. That's a weak control to build on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I do now
&lt;/h2&gt;

&lt;p&gt;Every project now runs in a Docker Sandbox (&lt;code&gt;sbx&lt;/code&gt;). Each agent gets its own microVM, and the only part of my machine it can see is the project folder.&lt;/p&gt;

&lt;p&gt;Two things to know before you switch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;sbx starts Claude Code with permission prompts skipped by default.&lt;/strong&gt; That's deliberate, because the VM is the boundary instead of the prompts. It does mean the agent will act without asking inside the sandbox.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your project folder is still shared.&lt;/strong&gt; The agent can delete or break anything in the repo. Commit often, and keep secrets out of the working tree.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Next in the series
&lt;/h2&gt;

&lt;p&gt;Part 2 covers why I went with sbx over a plain dev container, and what a container doesn't protect you from.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How are you running your agents? Directly on the host, in a container, or in a VM? Tell me in the comments.&lt;/em&gt;&lt;/p&gt;

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