Repository navigation
fix(security): fail closed when the public-surface scrub cannot decide - #2071
Merged
Merged
Conversation
- A throw while evaluating a command now blocks it, unless a human set MAGPIE_ALLOW_EMBARGO_TERMS=1, the escape hatch the evaluation already honours; before, the outcome depended on how the engine treats a throwing gate. - A blocked evaluation blocks even without a reason (a fallback reason is used); before, blocked with an empty reason was let through. - denyFor / denyOnEvaluationError are exported and tested. Generated-by: Claude Opus 5
potiuk
enabled auto-merge (squash)
November 14, 2026 03:40
2 tasks done
potiuk
added a commit
that referenced
this pull request
Nov 14, 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.
Summary
public-surface-scrubis the gatingtool.callhook that blocks Bash commands which would publish embargoed security content. Two paths could let a command through:MAGPIE_ALLOW_EMBARGO_TERMS=1before the session (the escape hatch the evaluation already honours).blockedwithout areason. The hook denied only onblocked && reason. It now blocks onblockedalone, with a fallback reason. All eight current block paths set a reason, so this was latent.The decisions live in two exported helpers,
denyForanddenyOnEvaluationError, each with a test.Found while fixing the 2.1.325 type-check findings (#2070).
Test plan
claude plugin test plugins/magpie-security: 167 pass (165 + 2 new)claude plugin validate --strict(2.1.325) and the pinnedcheck-claude-modspassprekon the touched files passesGenerated-by: Claude Opus 5
🤖 Generated with Claude Code