Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🛡️ Detected with Advanced Tier | 🟠 Major | 🏗️ Heavy lift
Authorization Bypass
Reachability: External
Exploitability: Moderate
CWE: CWE-693
View Security blast radius
Make the merge block independent of command spelling and payload location.
Claude Code matches Bash deny rules against command text, so
sh -c 'gh pr merge 123'does not match Line 4. GitHub CLI also accepts GraphQL request bodies through--input;gh api graphql --input merge.jsonhidesmergePullRequestfrom Lines 6-7. (code.claude.com)With a merge-capable
ghtoken, these unmatched calls can merge a PR inbypassPermissions. (code.claude.com)Use a
PreToolUsehook that checks wrapped commands and referenced request bodies, or enforce the merge restriction at the API boundary. Test both command forms in bypass mode.This conflicts with the PR objective to block these merge routes in bypass mode.
🤖 Prompt for AI Agents