From 53ad2836c4cedca8dcc819f003f1526b2cc0a31c Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Sat, 28 Mar 2026 20:13:47 -0400 Subject: [PATCH] refactor(ai-review): switch --allowedTools to --tools for actual restriction --allowedTools is an approval list (skip permission prompts), redundant with bypassPermissions. --tools is the actual availability whitelist. Also simplified tool list: Bash sub-patterns (gh pr diff *, etc.) aren't supported by --tools. The workflow token has contents:read only, so the agent physically cannot push/delete/modify the repo even with full Bash. --- .github/workflows/ai-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 9aca3631..3a536a0a 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -323,7 +323,7 @@ jobs: --model ${{ env.REVIEW_MODEL }} --permission-mode bypassPermissions --max-turns 50 - --allowedTools "Agent,Glob,Grep,Read,Write,Bash(gh pr diff *),Bash(gh pr view *),Bash(git diff *),Bash(git log *),Bash(git show *),Bash(cat *),Bash(ls *),Bash(wc *),Bash(head *),Bash(tail *),Bash(find *)" + --tools "Agent,Glob,Grep,Read,Write,Bash" # Fallback: if Claude didn't write the review file, extract from execution output - name: Extract review from execution output (fallback)