.agents/skills/skill-scanner/references/permission-analysis.md
Framework for evaluating tool permissions granted to agent skills.
| Tier | Tools | Risk Level | Notes |
|---|---|---|---|
| Tier 1 — Read-Only | Read, Grep, Glob | Low | Cannot modify anything; safe for analysis skills |
| Tier 2 — Execution | Bash | Medium | Can run arbitrary commands; should have clear justification |
| Tier 3 — Modification | Write, Edit, NotebookEdit | High | Can modify files; verify the skill needs to create/edit files |
| Tier 4 — Network | WebFetch, WebSearch | High | Can access external URLs; verify domains are necessary |
| Tier 5 — Delegation | Task | High | Can spawn subagents; increases attack surface |
| Tier 6 — Unrestricted | * (wildcard) | Critical | Full access to all tools; almost never justified |
For each tool in allowed-tools, verify:
| Tool | Justified When | Unjustified When |
|---|---|---|
Read | Skill reads files for analysis | — (almost always justified) |
Grep | Skill searches file contents | — (almost always justified) |
Glob | Skill finds files by pattern | — (almost always justified) |
Bash | Running bundled scripts (uv run), git/gh CLI, build tools | No scripts or CLI commands in instructions |
Write | Skill creates new files (reports, configs) | Skill only reads and analyzes |
Edit | Skill modifies existing files | Skill only reads and analyzes |
WebFetch | Skill fetches external documentation or APIs | No URLs referenced in instructions |
WebSearch | Skill needs to search the web | No search-dependent logic |
Task | Skill delegates to subagents for parallel work | Could run sequentially without delegation |
Expected tool sets by skill type:
Read, Grep, Glob or Read, Grep, Glob, BashRead, Grep, Glob, BashRead, Grep, Glob, Write or Read, Grep, Glob, Bash, Write, EditRead, Grep, Glob, Bash, WebFetch* wildcard, or more than 5 distinct toolsCombinations and patterns that warrant scrutiny:
| Pattern | Concern |
|---|---|
Bash + no scripts in skill directory | Why does it need shell access? |
Write or Edit + skill described as "analysis" or "review" | Analysis skills shouldn't modify files |
WebFetch + no URLs in instructions | What is it fetching? |
Task + Bash + Write | Can spawn subagents with write access — high risk |
* (unrestricted) | Maximum attack surface; almost never appropriate |
| Tools granted but never referenced in instructions | Overly permissive; violates least privilege |
Rate the overall permission profile:
| Rating | Criteria |
|---|---|
| Appropriate | All tools justified and minimal for the skill's purpose |
| Slightly Overpermissioned | 1-2 tools not clearly needed; low risk |
| Overpermissioned | Multiple unnecessary tools; medium risk |
| Dangerously Overpermissioned | Unrestricted access or many high-tier tools without justification |