T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- agents/council-sun-tzu.md:6
- Finding
- Overbroad Shell, Filesystem, and Network Permissions Granted to All Council Agents## Vulnerability Details **File Location**: `agents/council-ada.md:6`, `agents/council-aristotle.md:6`, `agents/council-aurelius.md:6`, `agents/council-feynman.md:6`, `agents/council-lao-tzu.md:6`, `agents/council-machiavelli.md:6`, `agents/council-musashi.md:6`, `agents/council-socrates.md:6`, `agents/council-sun-tzu.md:6`, `agents/council-torvalds.md:6`, and `agents/council-watts.md:6` **Vulnerability Type**: Excessive tool permissions and violation of least privilege **Risk Level**: Medium **Complete vulnerable code snippet**: ```yaml tools: ["Read", "Grep", "Glob", "Bash", "WebSearch", "WebFetch"] ``` The same tool declaration appears at line 6 in every listed agent definition. ### Technical Analysis All 11 council personas receive local file-reading, unrestricted shell-execution, search, and network-fetch capabilities. Their declared function is primarily to perform textual analysis from different intellectual perspectives. Most of that functionality does not inherently require command execution or network access. The combination is security-sensitive: - `Read`, `Grep`, and `Glob` can inspect files available to the agent's operating-system account. - `Bash` can execute commands with the permissions of the Claude Code process. - `WebSearch` and `WebFetch` provide outbound network channels. - Together, these tools can form an access-and-egress chain if an untrusted problem statement, repository document, or retrieved page contains instructions that influence the agent. The agent definitions contain no path restrictions, command allowlist, outbound-domain allowlist, or requirement to obtain explicit user approval before using these capabilities. Consequently, the permission set exceeds the minimum privileges needed for persona-based deliberation. The static pre-scan specifically identified `agents/council-sun-tzu.md`. Direct inspection found no URL, upload command, secret-collection logic, or explicit instruction to t ...[truncated 1753 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `Bash`, `WebSearch`, and `WebFetch` from personas whose duties are limited to conceptual analysis. 2. Default purely deliberative personas to no tools, or grant only narrowly required read-only tools. 3. If repository analysis is required, constrain `Read`, `Grep`, and `Glob` to the active workspace and explicitly exclude home-directory credentials, SSH material, environment files, and system configuration. 4. Require explicit user confirmation before any shell command or outbound network request. 5. Apply command allowlists and sandboxing to any agent that genuinely requires `Bash`. 6. Restrict outbound requests to approved domains and prohibit placing local file contents, credentials, tokens, or user data in URLs or request bodies. 7. Treat problem statements, repository files, other agents' output, and fetched web content as untrusted data rather than executable instructions. 8. Separate local inspection and network access so that a single agent cannot both collect local data and transmit it externally without an approval boundary. 9. Document why each granted tool is necessary and periodically review the declarations for least-privilege compliance.
