T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:5
- Finding
- Unnecessary Shell Capability Across Wiki Skills<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:5` - `skills/wiki-ingest/SKILL.md:5` - `skills/wiki-init/SKILL.md:5` - `skills/wiki-lint/SKILL.md:5` - `skills/wiki-maintain/SKILL.md:5` - `skills/wiki-query/SKILL.md:5` **Vulnerability Type**: Excessive tool permissions and violation of least privilege **Risk Level**: Medium ### Vulnerable Configuration The following capability declaration appears in all six affected files: ```yaml compatibility: Write, Read, Glob, Grep, Bash ``` For example, the complete relevant frontmatter in the root Skill is: ```yaml --- name: wiki-knowledge-base description: | LLM-powered personal wiki knowledge base system. Use this when user wants to build and maintain a persistent wiki using LLMs following the LLM Wiki pattern (karpathy/442a6bf555914893e9891c11519de94f). This system implements: wiki initialization (two-layer architecture - wiki content and schema), source ingestion with cross-reference maintenance, querying with synthesis and citations, health checking (lint), and schema management. Source files are stored externally (e.g., in project's raw/ folder), not copied into the wiki. Perfect for: personal knowledge management, research wikis, reading companions, team knowledge bases. Triggers on: wiki knowledge base, LLM wiki, personal wiki, build wiki, knowledge management, or any mention of organizing accumulated knowledge with an LLM. compatibility: Write, Read, Glob, Grep, Bash --- ``` The same excessive capability is declared by each sub-skill: ```yaml compatibility: Write, Read, Glob, Grep, Bash ``` ### Technical Analysis The documented workflows only require Markdown file discovery, reading, searching, creation, and modification. No Skill defines a shell command, executable script, package installation procedure, or other operation that inherently requires Bash. Granting Bash access therefore violates the principle of least privilege. Shell access has a substantially broader security boundar ...[truncated 2457 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `Bash` from the compatibility declaration in all affected files: ```yaml compatibility: Write, Read, Glob, Grep ``` 2. Apply the change to: - `SKILL.md` - `skills/wiki-ingest/SKILL.md` - `skills/wiki-init/SKILL.md` - `skills/wiki-lint/SKILL.md` - `skills/wiki-maintain/SKILL.md` - `skills/wiki-query/SKILL.md` 3. Restrict `Read` and `Write` operations to explicit, user-approved locations: - The selected `wiki/` directory. - The specific external source files or source directory approved by the user. 4. Validate and normalize paths before reading or writing: - Reject path traversal such as `../`. - Resolve symbolic links before enforcing directory boundaries. - Avoid following links outside approved roots. - Require confirmation before overwriting, deleting, or renaming existing files. 5. Treat ingested documents and wiki pages as untrusted data rather than executable instructions. Explicitly state that commands or Agent directives embedded in source content must not be followed. 6. If a future feature genuinely requires shell execution, expose a narrowly scoped operation instead of unrestricted Bash. Use fixed commands, validated arguments, a restricted working directory, and explicit user confirmation. ]]>
