Skip to content

Commit 03ea722

Browse files
DarkaMaulclaude
andauthored
Add threat model section to README (#33)
Addresses #29 by explaining what threats the devcontainer protects against, the intended development workflow, and SSH agent forwarding semantics. Also adds SSH agent to the Security Model's "Not sandboxed" list. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 48df2ad commit 03ea722

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,21 @@ sudo iptables -A OUTPUT -j DROP
212212
- May break tools that require network access
213213
- DNS resolution still works (consider blocking if paranoid)
214214

215+
## Threat Model
216+
217+
The primary threat this project addresses is **Claude Code running arbitrary commands on your host machine**. When `bypassPermissions` is enabled, Claude executes shell commands, installs packages, and modifies files without confirmation. On a host machine this means it can modify your shell config, `rm -rf` outside the project directory, or abuse locally stored credentials. The devcontainer confines all of that to a disposable container where the blast radius is limited to `/workspace`.
218+
219+
The container includes common development tooling so you can do all development work inside it - not just run Claude. The intended workflow is: clone a repository, start the devcontainer, and work entirely within it. If your project needs additional runtimes or tools beyond what's included, either add them to the Dockerfile for repeated use or install them ad-hoc with `devc exec`.
220+
221+
For the specific boundaries of what is and isn't isolated, see [Security Model](#security-model) below. One nuance worth calling out: the devcontainer runtime automatically forwards your host's SSH agent socket (`SSH_AUTH_SOCK`) into the container. This lets code inside the container authenticate as you over SSH (e.g., `git push`), but the actual private key material stays on the host and is never exposed to the container.
222+
215223
## Security Model
216224

217225
This devcontainer provides **filesystem isolation** but not complete sandboxing.
218226

219227
**Sandboxed:** Filesystem (host files inaccessible), processes (isolated from host), package installations (stay in container)
220228

221-
**Not sandboxed:** Network (full outbound by default—see [Network Isolation](#network-isolation)), git identity (`~/.gitconfig` mounted read-only), Docker socket (not mounted by default)
229+
**Not sandboxed:** Network (full outbound by default—see [Network Isolation](#network-isolation)), git identity (`~/.gitconfig` mounted read-only), SSH agent (socket forwarded, keys stay on host), Docker socket (not mounted by default)
222230

223231
The container auto-configures `bypassPermissions` mode—Claude runs commands without confirmation. This would be risky on a host machine, but the container itself is the sandbox.
224232

0 commit comments

Comments
 (0)