sb-dev/openquant / .agents/skills/skill-scanner
skill-scanner
FlaggedScan agent skills for security issues. Use when asked to "scan a skill", "audit a skill", "review skill security", "check skill for injection", "validate SKILL.md", or assess whether an agent skill is safe to install. Checks for prompt injection, malicious scripts, excessive permissions, secret exposure, and supply chain risks.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.7 KB |
| references/dangerous-code-patterns.md | markdown | 6.3 KB |
| references/permission-analysis.md | markdown | 4.2 KB |
| references/prompt-injection-patterns.md | markdown | 6.4 KB |
| scripts/scan_skill.py | script | 28.9 KB |
references/permission-analysis.md
View on GitHub# Permission Analysis
Framework for evaluating tool permissions granted to agent skills.
## Tool Risk Tiers
| 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 |
## Least Privilege Assessment
For each tool in `allowed-tools`, verify:
1. **Is it referenced?** Does the SKILL.md body mention operations requiring this tool?
2. **Is it necessary?** Could the skill achieve its purpose without this tool?
3. **Is the scope minimal?** Could a more restrictive tool achieve the same result?
### Assessment Checklist
| 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 |
## Common Permission Profiles
Expected tool sets by skill type:
### Analysis / Review Skills
- **Expected**: `Read, Grep, Glob` or `Read, Grep, Glob, Bash`
- **Bash justification**: Running linters, type checkers, or bundled scripts
- **Examples**: code-review, security-review, find-bugs
### Workflow Automation Skills
- **Expected**: `Read, Grep, Glob, Bash`
- **Bash justification**: Git operations, CI commands, gh CLI
- **Examples**: commit, pr-writer, iterate-pr
### Content Generation Skills
- **Expected**: `Read, Grep, Glob, Write` or `Read, Grep, Glob, Bash, Write, Edit`
- **Write/Edit justification**: Creating or modifying documentation, configs
- **Examples**: agents-md, doc-coauthoring
### External-Facing Skills
- **Expected**: `Read, Grep, Glob, Bash, WebFetch`
- **WebFetch justification**: Fetching documentation, API specs
- **Flag if**: WebFetch is present but no URLs appear in skill instructions
### Full-Access Skills
- **Expected**: Almost never
- **If seen**: Requires strong justification — the skill should be doing something that genuinely needs broad access
- **Flag**: `*` wildcard, or more than 5 distinct tools
## Red Flags
Combinations 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 |
## Scoring
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 |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |