claude-flow icon indicating copy to clipboard operation
claude-flow copied to clipboard

fix: correct Claude Code permission syntax in github init

Open rhowardstone opened this issue 5 months ago • 1 comments

Fixes #773

Summary

This PR corrects the invalid Claude Code permission syntax in the GitHub init command. The generated .claude/settings.json file now uses the proper colon-wildcard syntax (Bash(command:*)) instead of the invalid space-wildcard syntax (Bash(command *)).

Changes

  • Fixed 35 permission entries in the allow array in src/cli/simple-commands/github/init.js
  • Changed from 'Bash(command *)' to 'Bash(command:*)'
  • The deny section remains unchanged (uses different pattern syntax)

Testing

  • Verified that only the GitHub init source file needs updating
  • The template file (src/cli/simple-commands/init/templates/settings.json) already has the correct syntax
  • All permission strings now match the Claude Code specification

References

  • Issue: #773
  • Related template with correct syntax: src/cli/simple-commands/init/templates/settings.json (line 12)

rhowardstone avatar Oct 14 '25 19:10 rhowardstone

@rhowardstone I also see (on an older repo) └ permissions └ deny ├ "Bash(curl * | bash)": Wildcards in the middle of commands are not supported. Use prefix matching with ":" or specify exact commands. Examples: Bash(npm run:) - allows any npm run command, Bash(npm install express) - allows exact command, Bash - allows all commands ├ "Bash(wget * | sh)": Wildcards in the middle of commands are not supported. Use prefix matching with ":" or specify exact commands. Examples: Bash(npm run:) - allows any npm run command, Bash(npm install express) - allows exact command, Bash - allows all commands └ "Bash(eval )": Use ":" for prefix matching, not just "". Change to "Bash(eval :)" for prefix matching. Examples: Bash(npm run:), Bash(git:)

Did you solve that somehow?

mrjcleaver avatar Dec 26 '25 17:12 mrjcleaver