Skip to content

Commit 6dfc746

Browse files
committed
fix(ci): restrict git commands to add/commit/status/diff/log (no push/remote)
1 parent 6bb3b69 commit 6dfc746

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/weekly-update.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ jobs:
9191
claude --print \
9292
--model haiku \
9393
--max-turns 15 \
94-
--allowedTools "Bash(pnpm:*)" "Bash(git:*)" "Read" "Write" "Edit" "Glob" "Grep" \
94+
--allowedTools \
95+
"Bash(pnpm:*)" \
96+
"Bash(git add:*)" "Bash(git commit:*)" "Bash(git status:*)" "Bash(git diff:*)" "Bash(git log:*)" "Bash(git rev-parse:*)" \
97+
"Read" "Write" "Edit" "Glob" "Grep" \
9598
"$(cat <<'PROMPT'
9699
/updating
97100
@@ -185,7 +188,10 @@ jobs:
185188
claude --print \
186189
--model sonnet \
187190
--max-turns 25 \
188-
--allowedTools "Bash(pnpm:*)" "Bash(git:*)" "Read" "Write" "Edit" "Glob" "Grep" \
191+
--allowedTools \
192+
"Bash(pnpm:*)" \
193+
"Bash(git add:*)" "Bash(git commit:*)" "Bash(git status:*)" "Bash(git diff:*)" "Bash(git log:*)" "Bash(git rev-parse:*)" \
194+
"Read" "Write" "Edit" "Glob" "Grep" \
189195
"$(cat <<PROMPT
190196
Build or tests failed after dependency updates. Fix them.
191197

0 commit comments

Comments
 (0)