Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"allowedTools": ["Bash(*)"]
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The allowlist syntax here uses a space form ("Bash(gh *)") while the workflow uses a colon form (e.g., "Bash(gh pr view:*)"). If the tool-matching grammar expects the command:pattern format, these entries may not match as intended and could result in tools being blocked or unintentionally allowed. Align the settings file with the exact same pattern style used in the workflow (and ideally the same specific subcommands).

Suggested change
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
"allowedTools": ["Bash(gh:*)", "Bash(git:*)", "Bash(python3:*)", "Bash(grep:*)", "Bash(cat:*)", "Bash(ls:*)"]

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even after moving off Bash(*), entries like Bash(gh *), Bash(git *), and Bash(python3 *) are still very permissive (e.g., gh auth, arbitrary gh api calls, arbitrary scripting). Since the workflow comment says “allow exactly what the review flow uses,” consider restricting to the minimal required subcommands (mirroring the workflow allowlist) rather than * at the tool level.

Suggested change
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
"allowedTools": ["Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]

Copilot uses AI. Check for mistakes.
}
16 changes: 14 additions & 2 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,29 @@ jobs:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ github.token }}

# (Optional) Useful while debugging; can expose secrets in logs
show_full_output: true
Comment on lines +31 to 32
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show_full_output: true contradicts the “Optional” warning comment and can leak sensitive data into GitHub Actions logs. Default this to false, and only enable it conditionally for debugging (e.g., via an input, env var, or workflow_dispatch parameter) so it cannot be accidentally left on for normal PRs.

Copilot uses AI. Check for mistakes.

plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'

claude_args: |
--allowedTools "Bash(*)"
# IMPORTANT: allow exactly what the review flow uses
claude_args: >
--allowedTools
"Bash(gh pr view:*)"
"Bash(gh pr diff:*)"
"Bash(gh api:*)"
"Bash(gh search code:*)"
"Bash(cat:*)"
"Bash(ls:*)"
"Bash(grep:*)"
"Bash(python3:*)"
"Bash(git:*)"
Comment on lines +42 to +48
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states “allow exactly what the review flow uses,” but the allowlist still includes broad capabilities (Bash(git:*), Bash(python3:*), and especially Bash(gh api:*)) that can materially expand access beyond viewing PR content. If these are not strictly required, remove them; if they are required, narrow them as much as the tool syntax allows (e.g., specific gh api endpoints / specific git subcommands) to reduce the blast radius of a prompt-injection scenario.

Suggested change
"Bash(gh api:*)"
"Bash(gh search code:*)"
"Bash(cat:*)"
"Bash(ls:*)"
"Bash(grep:*)"
"Bash(python3:*)"
"Bash(git:*)"
"Bash(gh search code:*)"
"Bash(cat:*)"
"Bash(ls:*)"
"Bash(grep:*)"

Copilot uses AI. Check for mistakes.

prompt: |
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
Post the results as one top-level PR comment titled "Claude Code Review".
If you cannot access the diff/files, say so explicitly and explain what was blocked.

additional_permissions: |
actions: read