T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:13- Finding
Unrestricted Coding-Agent Execution Bypasses Least-Privilege Controls
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13-17 and 130-135
Vulnerability Type: Agent execution with permission checks disabled
Risk Level: HighVulnerable Code
markdown ## Prerequisites - Claude Code (`claude` CLI) installed with `--permission-mode bypassPermissions --print` - [cc-plugin](https://github.com/TokenRollAI/cc-plugin) installed in Claude Code (provides llmdoc read/write, investigator/scout/recorder sub-agents) - Global `~/.claude/CLAUDE.md` configured with cc-plugin settingsmarkdown #### 4.1 Prompt Construction For each task, construct the agent prompt from the task card: ```bash claude --permission-mode bypassPermissions --print '<task prompt>' 2>&1text ### Technical Analysis The workflow explicitly requires every coding-agent invocation to use `--permission-mode bypassPermissions`. This disables normal per-operation permission enforcement and violates least privilege. The documented `workdir` setting only selects a working directory; it is not an operating-system sandbox and does not prevent access to other files, credentials, processes, or network resources available to the parent process. This becomes particularly dangerous because agent prompts are assembled from user requirements, project files, specifications, and task cards. Malicious or compromised input can consequently influence an agent that has broad command and filesystem capabilities. ### Attack Path 1. An attacker supplies a crafted coding requirement or places adversarial instructions in project content read during specification or task planning. 2. The workflow incorporates that content into a task card and agent prompt. 3. Phase 4 invokes Claude Code with `--permission-mode bypassPermissions`. 4. The influenced agent uses its available tools to execute commands or access files beyond the task's legitimate scope. 5. Because permission prompts are disabled, the operation proceeds without an authorization check ...[truncated 752 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
--permission-mode bypassPermissionsfrom all recommended invocations. - Use an explicit allowlist for required filesystem, command, and network operations.
- Require interactive confirmation for destructive commands, access outside the repository, credential access, and network activity.
- Run coding agents in an isolated container or sandbox with the target repository mounted as the only writable project path.
- Provide only short-lived, task-specific credentials when external services are required.
- Enforce OS-level resource boundaries because a working-directory setting alone is not a security boundary.
- Log and review agent tool calls, and stop execution when a command exceeds the confirmed task scope.
- Remove
