fix: restrict Bash tool access in create-marketplace command#108
Conversation
Change unrestricted `Bash` to `Bash(mkdir:*)` following the least-privilege security principle documented in the command-development skill. The command only needs mkdir for directory creation, so unrestricted Bash access was unnecessary and inconsistent with the sister command create-plugin.md. Fixes #106 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @sjnims's task in 58s —— View job PR Review CompleteReviewing PR #108: fix: restrict Bash tool access in create-marketplace command Summary✅ Looks good - This is a solid security improvement that correctly applies the least-privilege principle. What's Good
Checklist Verification
Code QualityThe change is minimal and surgical: -allowed-tools: Read, Write, Edit, Grep, Glob, Bash, TodoWrite, AskUserQuestion, Skill, Task
+allowed-tools: Read, Write, Edit, Grep, Glob, Bash(mkdir:*), TodoWrite, AskUserQuestion, Skill, TaskFile: This correctly restricts the previously unrestricted Recommendation: Approve and merge. This PR makes a focused security improvement with no functional changes. |
Summary
Restrict Bash tool access from unrestricted
BashtoBash(mkdir:*)in the create-marketplace command, following the least-privilege security principle.Problem
Fixes #106
The
create-marketplacecommand had unrestrictedBashin its allowed-tools, violating:Bash(git:*)notBash(*)"create-plugin.mdwhich properly restricts Bash accessSolution
Changed
BashtoBash(mkdir:*)since the command only needsmkdir -pfor directory creation (lines 131-136 in the command body).Alternatives Considered
Bash(mkdir:*), Bash(git init:*)- Rejected; create-marketplace doesn't need git init (unlike create-plugin)Changes
plugins/plugin-dev/commands/create-marketplace.md: ChangeBash→Bash(mkdir:*)Testing
Security Note
This is a defense-in-depth improvement. While Claude exercises judgment regardless, restricting permissions:
🤖 Generated with Claude Code