Repository navigation
feat(sandbox-lint): accept only allowlisted sandbox exclusions - #1695
Merged
Merged
Conversation
An excluded command runs outside the sandbox, and recognising the shapes of commands that run their arguments can never be complete (find -exec, git -c, make, docker). Exclusions are few and named by the framework, so accept only those, or a narrowing of one, plus whatever a project lists in its overrides after review. Generated-by: Claude Opus 5
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.
An excluded command runs outside the sandbox. The runs-anything check (#1693) recognises shapes of commands that run their arguments, and that can never be complete:
find -exec,git -c,make,dockerand many more all pass it. Exclusions are few and named by the framework, so sandbox-lint now accepts anexcludedCommandsentry, in any layer, only when it is on an allowlist or narrows an entry on it.EXCLUDED_COMMAND_ALLOWLIST:gh *,roborev *, the four vetted-ops forms, the adversarial-review runner and~/.claude/scripts/magpie-run-evals.sh *. A narrowing such asgh auth *or baregh, and the legacycmd:*spelling, also pass..apache-magpie-overrides/sandbox-lint/excluded-commands.txt. Those entries still have to pass the runs-anything check, so a project cannot allow a shell or an unpinned runner this way. An unreadable file is reported, not a crash.Bash(...)allow rules keep the shape check only: approving a tool such aszizmor *without a prompt is legitimate.Compatibility: an adopter's existing exclusion that is not on the list now fails the lint until it is added to the project's extension file after review.
🤖 Generated with Claude Code