Skip to content

fix(hookify): fail closed on exceptions in pretooluse hook - #84364

Open
alifakbxr wants to merge 1 commit into
anthropics:mainfrom
alifakbxr:fix/84302-pretooluse-fail-closed
Open

fix(hookify): fail closed on exceptions in pretooluse hook#84364
alifakbxr wants to merge 1 commit into
anthropics:mainfrom
alifakbxr:fix/84302-pretooluse-fail-closed

Conversation

@alifakbxr

Copy link
Copy Markdown

This fixes a vulnerability where an exception (such as an ImportError or a generic exception during rule evaluation) would cause the hook to exit with status 0 and allow the gated tool execution. Now, exceptions will emit a permissionDecision: 'deny', ensuring unauthorized actions are prevented when the hook fails.

Resolves #84302

This fixes a vulnerability where an exception (such as an ImportError or
a generic exception during rule evaluation) would cause the hook to exit
with status 0 and allow the gated tool execution. Now, exceptions will
emit a permissionDecision: 'deny', ensuring unauthorized actions are
prevented when the hook fails.

Resolves anthropics#84302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A killed PreToolUse command hook makes the CLI ALLOW the gated tool (fail-open for permission-decision hooks)

1 participant