T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:24
- Finding
- Coding Agents Are Launched with Permission and Approval Safeguards Disabled<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 24-28, 64-66, and 85 **Vulnerability Type**: Unsafe permission bypass for autonomous coding agents **Risk Level**: High ### Vulnerable Code ```bash SESSION=oc-myproject-feature tmux new-session -d -s "$SESSION" -c ~/projects/myproject tmux send-keys -t "$SESSION" 'claude --dangerously-skip-permissions' Enter tmux capture-pane -p -J -t "$SESSION" -S -200 ``` The parallel-agent example repeats the unsafe configuration: ```bash # Launch agents tmux send-keys -t oc-project-fix1 'claude --dangerously-skip-permissions' Enter tmux send-keys -t oc-project-fix2 'codex --full-auto' Enter ``` The accompanying guidance also recommends bypass modes: ```text - Codex needs `--yolo` or `--full-auto` for non-interactive fixes ``` ### Technical Analysis The Skill presents agent modes that bypass normal permission prompts or approval controls as the standard workflow. The `--dangerously-skip-permissions`, `--full-auto`, and recommended `--yolo` options allow generated actions to proceed with substantially reduced human review. These options do not independently grant operating-system privileges beyond those of the user running the agent. However, they remove an important least-privilege and consent boundary between model-generated instructions and local command execution. This is particularly dangerous when an agent processes untrusted repositories, issue descriptions, source comments, build scripts, or other attacker-controlled content. An attacker can place instructions or deceptive task content in a repository and rely on the autonomous agent to execute commands without an approval checkpoint. The commands would run with all filesystem, process, repository, credential, and network access already available to the agent process. ### Attack Path 1. A victim opens or clones a repository containing attacker-controlled instructions, source comments, configuration, or build behavior. 2. The Skill star ...[truncated 1373 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `--dangerously-skip-permissions`, `--full-auto`, and `--yolo` from the default examples and recommendations. 2. Launch coding agents in their normal interactive approval mode by default. 3. Require explicit, task-specific user consent before enabling any unattended execution mode. 4. If autonomous operation is necessary, run the agent inside a restricted container or sandbox with: - A dedicated unprivileged user. - A narrowly scoped writable working directory. - No access to SSH keys, cloud credentials, browser profiles, or unrelated home-directory files. - Network access disabled or restricted to an allowlist. - Read-only mounts for files that do not need modification. 5. Treat repository content and task descriptions as untrusted input. 6. Require review of generated commands and diffs before commits, pushes, package installation, or execution of repository scripts. 7. Document the security implications of bypass modes instead of presenting them as a routine requirement. ]]>
