Repository navigation
fix(sandbox-lint): refuse wholesale weakenings and keep the vetted-ops checkout read-only - #1693
Merged
Merged
Conversation
A layer could still pass the lint while excluding every command from the sandbox (a bare "*" or a shell or interpreter exclusion), approving every shell command (Bash or Bash(*), which the mid-pattern "*" rule misses), turning prompting off with defaultMode bypassPermissions, or allowing every host. Each is now an invariant, so it fails in the committed file, the local template, and a contributor's live .claude/settings.local.json alike. Generated-by: Claude Opus 5
potiuk
force-pushed
the
fix/magpie-dir-not-writable
branch
from
October 17, 2026 21:47
f6088d4 to
3aa2d7c
Compare
… directories A working directory is sandbox-writable whatever allowWrite says, and the vetted-ops exclusions run that checkout's code outside the sandbox, so listing ~/.claude/magpie in additionalDirectories let sandboxed code change what runs unsandboxed. It was only there to stop Read prompts under the read block, which the vetted-ops commands need off anyway. Generated-by: Claude Opus 5
potiuk
force-pushed
the
fix/magpie-dir-not-writable
branch
from
October 17, 2026 21:57
3aa2d7c to
4f9fa56
Compare
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits. The first is the lint hardening that missed the #1684 merge; the second closes the gap its last review found.
1. Refuse settings that switch a control off wholesale. In any layer — committed floor, local template, or a contributor's own
.claude/settings.local.json— sandbox-lint now fails on:excludedCommandsentry orBash(...)allow whose command runs anything:*, or a shell or interpreter by name, path or version (bash,/bin/sh,python3.12,env,source, …);NAME=value;uv runwithout--project, every otheruvsubcommand,uvxwithout--from,npx, andnpm/pnpm/yarn/pipxbeyond their read-only forms);Bashallow;defaultMode: bypassPermissions;*inallowedDomains.2. Keep the vetted-ops checkout out of the working directories. The sandbox makes every working directory (
permissions.additionalDirectories,/add-dir) writable to sandboxed Bash, whateverallowWritesays.sandbox-add-project-root.shlisted~/.claude/magpiethere, and the vetted-ops exclusions run that checkout's code outside the sandbox. The entry was only there to stopReadprompts underblockReadsOutsideWorkingDirectories, which the vetted-ops commands need off anyway.~spellings). Verify has a new check 16f, and update treats it as a must-fix.Migration: update
~/.claude/scripts/sandbox-add-project-root.sh, re-run it with--all-worktreesfrom each repo, and restart the agent session.Residual risk (sandbox-lint README): the check recognises shapes, so a tool not on its lists that runs its arguments still passes (
find -exec,git -c,make, …). An allowlist of command words forexcludedCommandswould close that and is a separate change. The environment uv builds from a pin lives in the writable uv cache or.venv.🤖 Generated with Claude Code