Repository navigation
fix(adversarial-review): name a fixed path in the sandbox exclusion, not a versioned glob - #1578
Merged
Merged
Conversation
…not a versioned glob The adversarial-review sandbox exclusion matched the tool as ~/.claude/plugins/cache/apache-magpie/magpie-adversarial-review/*/tools/adversarial-review. The `*` stood for the plugin version, but it also matches spaces, so once a command was approved it ran outside the sandbox even with extra `uv` options spliced in at that position (`--with <any package>`, a second `--from`). This is the gap apache#1406 closed for vetted-ops. The magpie-adversarial-review plugin now ships a SessionStart hook that points ~/.claude/magpie/adversarial-review at the installed version each session, and the exclusion, the Claude Code command, the shared pre-PR block and every skill that runs the tool name that fixed path. The existing Edit(~/.claude/magpie/**) deny covers it. The Codex, Gemini and Copilot commands keep resolving the installed version, since only Claude Code runs the hook and only its exclusion is a permission rule. sandbox-lint now rejects a `*` before the end of any sandbox.excludedCommands entry; apache#1406 only checked permissions.allow. isolated-setup-update and -verify report the old exclusion as a must-fix. Generated-by: Claude Opus 5
The sandbox exclusion now names ~/.claude/magpie/adversarial-review, so what that path points at is what runs outside the sandbox. A broken link leaves every review sandboxed, with every reviewer reporting unavailable; a real file or directory there, or a link elsewhere, would run that code unsandboxed, and the SessionStart hook refuses to replace anything that is not a symlink. Check 14d reports the first as a warning and the second as a failure. Generated-by: Claude Opus 5
potiuk
force-pushed
the
fix/adversarial-review-stable-path
branch
from
October 10, 2026 21:43
e17f34f to
6a55c98
Compare
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.
Summary
The adversarial-review sandbox exclusion matched the tool as
~/.claude/plugins/cache/apache-magpie/magpie-adversarial-review/*/tools/adversarial-review.The
*stood for the plugin version, but it also matches spaces, so once acommand was approved it ran outside the sandbox even with extra
uvoptionsspliced in at that position (
--with <any package>, a second--from).This is the gap #1406 closed for vetted-ops.
The magpie-adversarial-review plugin now ships a SessionStart hook that points
~/.claude/magpie/adversarial-reviewat the installed version each session,and the exclusion, the Claude Code command, the shared pre-PR block and every
skill that runs the tool name that fixed path. The path is covered by the
existing
Edit(~/.claude/magpie/**)deny. The Codex, Gemini and Copilotcommands keep resolving the installed version, since only Claude Code runs the
hook and only its exclusion is a permission rule.
sandbox-lint now rejects a
*before the end of anysandbox.excludedCommandsentry; #1406 only checked
permissions.allow, which is how this one slippedthrough. isolated-setup-update and -verify report the old exclusion as a
must-fix, and verify's new check 14d confirms the link resolves into the
installed plugin (a real file or directory at that path would otherwise run
unsandboxed).
Type of change
Test plan
tools/adversarial-reviewtests: the Claude invocation matches theexclusion, and the exclusion has no wildcard before the tool name and does
not match a spliced
--withcommandtools/sandbox-linttest for a mid-entry wildcard inexcludedCommandsfails without the lint change and passes with itprek run --all-filespassesGenerated-by: Claude Opus 5
🤖 Generated with Claude Code