Skip to content

Commit 4b066a8

Browse files
authored
Refine allowed tools for Claude Code Review
Updated allowed tools for Claude Code Review to specify exact commands used in the review flow.
1 parent 1fcb45a commit 4b066a8

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,29 @@ jobs:
2828
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
2929
github_token: ${{ github.token }}
3030

31+
# (Optional) Useful while debugging; can expose secrets in logs
3132
show_full_output: true
3233

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

36-
claude_args: |
37-
--allowedTools "Bash(*)"
37+
# IMPORTANT: allow exactly what the review flow uses
38+
claude_args: >
39+
--allowedTools
40+
"Bash(gh pr view:*)"
41+
"Bash(gh pr diff:*)"
42+
"Bash(gh api:*)"
43+
"Bash(gh search code:*)"
44+
"Bash(cat:*)"
45+
"Bash(ls:*)"
46+
"Bash(grep:*)"
47+
"Bash(python3:*)"
48+
"Bash(git:*)"
3849
3950
prompt: |
4051
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
4152
Post the results as one top-level PR comment titled "Claude Code Review".
53+
If you cannot access the diff/files, say so explicitly and explain what was blocked.
4254
4355
additional_permissions: |
4456
actions: read

0 commit comments

Comments
 (0)