Skip to content

Commit 0606435

Browse files
Allow configuring allowedTools
Should not be needed, but some existing skill may not have the correct values: so keeping existing default for compatibility. Issue: ZENKO-5260
1 parent 6e62a3e commit 0606435

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

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

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,24 @@ on:
3131
- comment: post as a PR comment
3232
- auto: check if allowed, otherwise post as a comment
3333
default: auto
34-
ACTIONS_APP_ID:
34+
allowed-tools:
3535
type: string
3636
description: >
37-
GitHub App ID used to generate a token for checking out marketplace
38-
repositories at a specific branch. Required when any entry in
39-
plugin_marketplaces uses the `<url>#<ref>` syntax.
40-
required: false
41-
default: ${{ vars.ACTIONS_APP_ID }}
37+
Space-separated list of allowed tools for the review. By default, a set of safe tools is allowed, but you can customize this list to enable or disable specific tools based on your needs and risk tolerance.
38+
NOTE: should not be needed if the skill already indicates the appropriate allowed tools. Keeping default value for compatibility.
39+
default: >-
40+
"Read"
41+
"Bash(git diff *)"
42+
"Bash(git log *)"
43+
"Bash(git show *)"
44+
"Bash(gh repo view *)"
45+
"Bash(gh pr view *)"
46+
"Bash(gh pr diff *)"
47+
"Bash(gh pr checks *)"
48+
"Bash(gh pr comment *)"
49+
"Bash(gh api *repos/*/pulls/*/comments*)"
50+
"Bash(gh api *issues/*/comments*)"
51+
"Bash(gh api *repos/*/check-runs*)"
4252
secrets:
4353
GCP_WORKLOAD_IDENTITY_PROVIDER:
4454
required: true
@@ -137,7 +147,7 @@ jobs:
137147
use_vertex: "true"
138148
prompt: "/review-pr REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }}"
139149
claude_args: |
140-
--allowedTools "Read" "Bash(git diff *)" "Bash(git log *)" "Bash(git show *)" "Bash(gh repo view *)" "Bash(gh pr view *)" "Bash(gh pr diff *)" "Bash(gh pr checks *)" "Bash(gh pr comment *)" "Bash(gh api *repos/*/pulls/*/comments*)" "Bash(gh api *issues/*/comments*)" "Bash(gh api *repos/*/check-runs*)"
150+
--allowedTools ${{ inputs.allowed-tools }}
141151
--model "${{ inputs.model }}"
142152
plugin_marketplaces: ${{ steps.marketplaces.outputs.marketplaces }}
143153
plugins: ${{ inputs.plugins }}

0 commit comments

Comments
 (0)