Skip to content

Commit ecfecb6

Browse files
sjnimsclaude
andauthored
docs: document security scope and trust model for workflow commands (#165)
## Summary Documents the security model and trust requirements for workflow commands (`/plugin-dev:create-plugin` and `/plugin-dev:create-marketplace`), providing transparency about their file system access. ## Problem Fixes #162 The workflow commands have broad file system access (Write, Edit, Bash(mkdir:*), etc.) which is correct and necessary for their scaffolding function. However, security-conscious users had no documentation explaining what access they're granting or why it's needed. ## Solution Implemented Option 3 from the issue (both command files + CLAUDE.md): ### CLAUDE.md - Comprehensive "Workflow Command Security" section - Explains why broad tool access is needed (creating directories, generating templates, initializing git) - Documents security considerations (permission scope, confirmation prompts, directory verification) - Contrasts with `/plugin-dev:start` which uses minimal permissions - Provides guidance for security-sensitive environments ### Command files - Brief security notes - Added one-sentence security notes to both workflow commands - Cross-references the detailed documentation in CLAUDE.md - Doesn't slow down users but provides visibility ### Alternatives Considered 1. **Command files only** - Would duplicate content and increase maintenance burden 2. **CLAUDE.md only** - Less discoverable for users reading command files 3. **Both (chosen)** - Best discoverability with single source of truth for details ## Changes | File | Change | |------|--------| | `CLAUDE.md` | Added "Workflow Command Security" subsection under Workflow | | `commands/create-plugin.md` | Added brief security note after Core Principles | | `commands/create-marketplace.md` | Added brief security note after Core Principles | ## Testing - [x] markdownlint passes on all modified files - [x] Documentation is accurate (verified against actual frontmatter) - [x] Cross-references are correct --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5f5f5d9 commit ecfecb6

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,36 @@ An 8-phase guided workflow for marketplace creation:
225225
7. Validation - Run marketplace validators
226226
8. Testing & Finalization - Test installation and finalize
227227

228+
### Workflow Command Security
229+
230+
The workflow commands (`/plugin-dev:create-plugin` and `/plugin-dev:create-marketplace`) require broad file system access to perform their scaffolding functions:
231+
232+
```yaml
233+
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(mkdir:*), Bash(git init:*), ...
234+
```
235+
236+
**Why this access is needed:**
237+
238+
- Creating plugin directory structures requires `Write` and `Bash(mkdir:*)`
239+
- Generating manifest files and component templates requires `Write` and `Edit`
240+
- Initializing git repositories requires `Bash(git init:*)`
241+
- Exploring existing code for patterns requires `Read`, `Grep`, `Glob`
242+
243+
**Security considerations:**
244+
245+
- These commands can write to any location within the user's permission scope
246+
- The commands prompt for confirmation before creating structures
247+
- Review the target directory before starting a workflow
248+
- In multi-user environments, verify the working directory is appropriate
249+
250+
**Design contrast with `/plugin-dev:start`:**
251+
252+
The entry point command uses `disable-model-invocation: true` and restricts tools to `AskUserQuestion, SlashCommand, TodoWrite` since it only routes to other commands. The workflow commands need broader access because they perform the actual file creation work.
253+
254+
**For security-sensitive environments:**
255+
256+
Review the `allowed-tools` frontmatter in each command file to understand exactly what access is granted. Future Claude Code versions may support path-scoped tool restrictions (e.g., `Write(./plugins/*)`), which would allow tighter scoping.
257+
228258
## Validation Agents
229259

230260
Use these agents proactively after creating components:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Guide the user through creating a complete plugin marketplace from initial conce
1919

2020
**Initial request:** $ARGUMENTS
2121

22+
**Security note:** This workflow has broad file system access to create marketplace structures. It can write files and create directories within your permission scope. Review the target directory before starting, and see CLAUDE.md "Workflow Command Security" for details.
23+
2224
---
2325

2426
## Phase 1: Discovery

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Guide the user through creating a complete, high-quality Claude Code plugin from
2020

2121
**Initial request:** $ARGUMENTS
2222

23+
**Security note:** This workflow has broad file system access to create plugin structures. It can write files and create directories within your permission scope. Review the target directory before starting, and see CLAUDE.md "Workflow Command Security" for details.
24+
2325
---
2426

2527
## Phase 1: Discovery

0 commit comments

Comments
 (0)