Repository navigation
fix: refuse native ask grants for calls rewritten after review - #70
Merged
Merged
Conversation
The all-tools native ask bridge now keeps the live execute.before event in its grant and re-checks the tool name and input digest (taken before the review starts) inside permission.evaluate, so a call that a later hook rewrote leaves the native ask to a human before it runs. execute.after also compares the tool name. allToolsNativeAsks "review" is rejected with mode "on-ask" and on OpenCode 1.x instead of being ignored, and the README documents same-action resources, explicit ask rules, the audit log gap and the hook order assumption. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7
execute.before now compares the call with the digest taken before the review and fails closed when it changed, even when no native ask follows. An input that can no longer be serialized counts as changed, the post-execution error names the call rather than the input, and the new tests use the shared helpers and cover the reviewer branch of the evaluate hook. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7
This was referenced Oct 24, 2026
Merged
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.
Closes #68
Summary
allToolsNativeAsks: "review"grant keeps the liveexecute.beforeevent and re-checks its tool name and input digest insidepermission.evaluate. A call that a later hook rewrote (or that changed while the review ran — the digest is now taken before the review) leaves the native ask to a human before the tool runs.execute.afteralso compares the tool name, not only the input.allToolsNativeAsks: "review"is rejected withmode: "on-ask"and on OpenCode 1.x instead of being silently ignored.permission.evaluateparagraph, explicit useraskrules, same-action asks not re-checking resources (documented rather than matched, since a tool may resolve its own resources at run time), the audit log gap, undefinedexecute.afterthrow handling and the hook order assumption.agent, and the config/V1 rejections.Not changed: escalate on an extra action still denies (design note in #68), and flipped asks are not audited (documented).
🤖 Generated with Claude Code
https://claude.ai/code/session_01QUBBebviXSBQtiRAmDopZ7