Skip to content

Commit 6b4b916

Browse files
sjnimsclaude
andauthored
fix: restrict Bash tool access in create-marketplace command (#108)
## Summary Restrict Bash tool access from unrestricted `Bash` to `Bash(mkdir:*)` in the create-marketplace command, following the least-privilege security principle. ## Problem Fixes #106 The `create-marketplace` command had unrestricted `Bash` in its allowed-tools, violating: - The command-development skill best practice (SKILL.md:469): "Limit scope: Use `Bash(git:*)` not `Bash(*)`" - Consistency with the sister command `create-plugin.md` which properly restricts Bash access ## Solution Changed `Bash` to `Bash(mkdir:*)` since the command only needs `mkdir -p` for directory creation (lines 131-136 in the command body). ### Alternatives Considered 1. **Keep unrestricted** - Rejected; violates least-privilege principle 2. **Add more patterns like `Bash(mkdir:*), Bash(git init:*)`** - Rejected; create-marketplace doesn't need git init (unlike create-plugin) ## Changes - `plugins/plugin-dev/commands/create-marketplace.md`: Change `Bash` → `Bash(mkdir:*)` ## Testing - [x] Markdownlint passes - [x] Change follows established pattern from create-plugin.md ## Security Note This is a defense-in-depth improvement. While Claude exercises judgment regardless, restricting permissions: - Documents the intended scope - Provides an additional safety layer - Maintains consistency across commands --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent f32a1b0 commit 6b4b916

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/plugin-dev/commands/create-marketplace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Create plugin marketplaces with guided workflow
33
argument-hint: [marketplace-description]
4-
allowed-tools: Read, Write, Edit, Grep, Glob, Bash, TodoWrite, AskUserQuestion, Skill, Task
4+
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(mkdir:*), TodoWrite, AskUserQuestion, Skill, Task
55
---
66

77
# Marketplace Creation Workflow

0 commit comments

Comments
 (0)