mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 11:28:55 +08:00
fix: replace deprecated :* with modern * wildcard in git permissions (#929)
Replace `Bash(git add:*)` syntax with `Bash(git add *)` in default tool permissions for tag mode and create-prompt. The colon-prefixed wildcard syntax is deprecated and causes SDK validation errors. Closes #856 Co-authored-by: Dave-London <hello@os4us.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Dave-London
Claude Opus 4.6
parent
23ed4cb53d
commit
1bb0e7464b
+13
-13
@@ -894,9 +894,9 @@ describe("buildAllowedToolsString", () => {
|
||||
expect(result).toContain("Write");
|
||||
|
||||
// Default is no commit signing, so should have specific Bash git commands
|
||||
expect(result).toContain("Bash(git add:*)");
|
||||
expect(result).toContain("Bash(git commit:*)");
|
||||
expect(result).toContain("Bash(git push:*)");
|
||||
expect(result).toContain("Bash(git add *)");
|
||||
expect(result).toContain("Bash(git commit *)");
|
||||
expect(result).toContain("Bash(git push *)");
|
||||
expect(result).toContain("mcp__github_comment__update_claude_comment");
|
||||
|
||||
// Should not have commit signing tools
|
||||
@@ -916,8 +916,8 @@ describe("buildAllowedToolsString", () => {
|
||||
expect(result).toContain("Write");
|
||||
|
||||
// Should have specific Bash git commands for non-signing mode
|
||||
expect(result).toContain("Bash(git add:*)");
|
||||
expect(result).toContain("Bash(git commit:*)");
|
||||
expect(result).toContain("Bash(git add *)");
|
||||
expect(result).toContain("Bash(git commit *)");
|
||||
expect(result).toContain("mcp__github_comment__update_claude_comment");
|
||||
|
||||
// Should not have commit signing tools
|
||||
@@ -1009,13 +1009,13 @@ describe("buildAllowedToolsString", () => {
|
||||
expect(result).toContain("Write");
|
||||
|
||||
// Specific Bash git commands should be included
|
||||
expect(result).toContain("Bash(git add:*)");
|
||||
expect(result).toContain("Bash(git commit:*)");
|
||||
expect(result).toContain("Bash(git push:*)");
|
||||
expect(result).toContain("Bash(git status:*)");
|
||||
expect(result).toContain("Bash(git diff:*)");
|
||||
expect(result).toContain("Bash(git log:*)");
|
||||
expect(result).toContain("Bash(git rm:*)");
|
||||
expect(result).toContain("Bash(git add *)");
|
||||
expect(result).toContain("Bash(git commit *)");
|
||||
expect(result).toContain("Bash(git push *)");
|
||||
expect(result).toContain("Bash(git status *)");
|
||||
expect(result).toContain("Bash(git diff *)");
|
||||
expect(result).toContain("Bash(git log *)");
|
||||
expect(result).toContain("Bash(git rm *)");
|
||||
|
||||
// Comment tool from minimal server should be included
|
||||
expect(result).toContain("mcp__github_comment__update_claude_comment");
|
||||
@@ -1031,7 +1031,7 @@ describe("buildAllowedToolsString", () => {
|
||||
|
||||
// Base tools should be present
|
||||
expect(result).toContain("Edit");
|
||||
expect(result).toContain("Bash(git add:*)");
|
||||
expect(result).toContain("Bash(git add *)");
|
||||
|
||||
// Custom tools should be included
|
||||
expect(result).toContain("CustomTool1");
|
||||
|
||||
Reference in New Issue
Block a user