Skip to content

Commit 95ea005

Browse files
committed
Restore tool permissions for workflow execution
Commit b47b8c3 removed claude_args configuration, causing permission denials for gh and git commands in CI. This restores explicit tool allowlists tailored to each workflow's purpose. Changes: - claude-code-review.yml: Read-only tools for automated PR reviews - claude.yml: Full development tools + write permissions for commits/PRs Fixes permission mismatch where claude.yml prompted for commits but lacked contents:write permission.
1 parent 102fc4f commit 95ea005

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,6 @@ jobs:
228228
**Important**: This workflow maintains conversation continuity - resolved issues show as "Resolved", ongoing issues have threaded replies, and only new issues create new comment threads.
229229
230230
Always post a NEW comment - never update previous ones. Natural conversation flow.
231+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
232+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
233+
claude_args: '--allowedTools "Task,Skill,Read,Glob,Grep,Write,TodoWrite,mcp__cloudflare-docs__search_cloudflare_documentation,mcp__exa__get_code_context_exa,mcp__exa__web_search_exa,Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh repo view:*),Bash(gh api:*),Bash(git log:*),Bash(git cat-file:*),Bash(git rev-parse:*),Bash(jq:*)"'

.github/workflows/claude.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
2020
runs-on: ubuntu-latest
2121
permissions:
22-
contents: read
23-
pull-requests: read
24-
issues: read
22+
contents: write
23+
pull-requests: write
24+
issues: write
2525
id-token: write
2626
actions: read # Required for Claude to read CI results on PRs
2727
steps:
@@ -97,3 +97,4 @@ jobs:
9797
9898
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
9999
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
100+
claude_args: '--allowedTools "Task,Skill,Read,Write,Edit,Glob,Grep,TodoWrite,mcp__cloudflare-docs__search_cloudflare_documentation,mcp__exa__get_code_context_exa,mcp__exa__web_search_exa,Bash(npm test:*),Bash(npm run *),Bash(npm install:*),Bash(npm ls:*),Bash(npm view:*),Bash(docker:*),Bash(git status),Bash(git log:*),Bash(git diff:*),Bash(git rev-parse:*),Bash(git fetch:*),Bash(git add:*),Bash(git commit:*),Bash(git push:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr checks:*),Bash(gh pr create:*),Bash(gh issue view:*),Bash(gh issue create:*),Bash(gh issue comment:*),Bash(gh repo view:*),Bash(gh api:*),Bash(find:*),Bash(tree:*),Bash(ls:*),Bash(jq:*)"'

0 commit comments

Comments
 (0)