T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:442- Finding
Unrestricted Cross-Project Discovery and Execution of an External Indexer
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:94,SKILL.md:263,SKILL.md:406,SKILL.md:442-444, andSKILL.md:505-506
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumVulnerable Code
bash python3 ~/.hermes/scripts/project-knowledge-index.py doctor 2>/dev/null | head -10markdown 1. **Scan sibling projects** for existing patterns firstbash python3 ~/.hermes/scripts/project-knowledge-index.py index 2>/dev/nullbash # Find project root find ~ -maxdepth 5 -name "CLAUDE.md" 2>/dev/null | head -5 search_files(path="~", pattern="CLAUDE.md", limit=10) search_files(path="~", pattern="PROJECT.md", limit=10)markdown 5. **Missing project discovery** — scan all projects before claiming an incomplete portfolio picture.Technical Analysis
The skill instructs the agent to search the user's home directory, inspect sibling or all projects, and execute
project-knowledge-index.pyfrom outside the audited package. These operations exceed the least-privilege scope normally required to manage the current project.Searching from
~can reveal unrelated repositories and project-memory files. Scanning sibling projects can then expose their internal instructions, architecture, business context, and other sensitive metadata to the current session. The skill also states that cross-project knowledge becomes available, indicating that discovered information may be aggregated rather than used only for locating the active repository.The external indexer presents an additional trust-boundary issue. Its implementation is not included in the audited artifact, and the path under
~/.hermes/scripts/is mutable local code. Consequently, the reviewed skill cannot guarantee which files the script reads, how indexed information is stored, or what behavior occurs when the script is invoked.No evidence was found that the skill transmits collected information externally, install ...[truncated 1582 chars]
- Remediation
View remediation
Remediation Suggestions
- Restrict all default discovery to the current repository root rather than the user's home directory.
- Replace home-directory searches with repository-scoped commands, such as:
bash find . -maxdepth 3 \( -name "CLAUDE.md" -o -name "PROJECT.md" \) - Remove the requirements to “scan sibling projects” and “scan all projects.” Make cross-project inspection optional and require explicit, current-turn user approval identifying the permitted directories.
- Apply a canonical-path allowlist before reading files so symlinks or relative paths cannot escape the approved repository.
- Do not execute
~/.hermes/scripts/project-knowledge-index.pyautomatically. Require explicit approval and clearly disclose the script path and intended scope. - Prefer a vendored, version-pinned, reviewed indexer whose implementation is included in the package. If an external indexer remains necessary, validate its integrity and configure it with an explicit repository allowlist.
- Exclude credential files, local environment files, secret-bearing paths, unrelated repositories, and ignored files from indexing.
- Display the files selected for indexing and obtain confirmation before processing them.
- Document where indexed data is stored, its retention period, and how users can inspect or delete it.
