T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:35
- Finding
- Claude Code Permission Checks Are Explicitly Disabled## Vulnerability Details **File Location**: `SKILL.md`, lines 35-43 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: High **Vulnerable code:** ```bash claude -p --dangerously-skip-permissions "你的具体要求" ``` The associated parameter documentation explicitly states that `--dangerously-skip-permissions` skips approval checks. ### Technical Analysis The Skill requires every programming task to be delegated to Claude Code with `--dangerously-skip-permissions`. This option disables the permission and approval controls intended to prevent unreviewed file modifications and command execution. Disabling these controls violates least privilege because ordinary code generation, review, and testing do not inherently require unrestricted operation. The nested coding agent receives authority beyond what is necessary for each task, while the Skill defines no restrictions on accessible paths, executable commands, network access, or sensitive files. ### Attack Path 1. An attacker or untrusted source supplies a malicious, ambiguous, or deceptive programming request. 2. The Skill incorporates that request into a Claude Code invocation. 3. Claude Code starts with `--dangerously-skip-permissions`. 4. The nested agent interprets the request as requiring sensitive file access, command execution, or destructive modifications. 5. Those operations proceed without an interactive approval barrier. 6. The attacker may consequently influence files and processes accessible to the account running the Skill. ### Impact Assessment Successful exploitation may permit unapproved modification, creation, or deletion of files within the privileges of the host process. It may also allow execution of local commands, access to sensitive project or user files, alteration of repositories, and interaction with any credentials or services available to the invoking account. The precise scope is bounded by operating-sys ...[truncated 194 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `--dangerously-skip-permissions` and retain Claude Code's standard approval workflow. 2. Require explicit approval for shell execution, writes outside the intended project, destructive operations, network access, and access to sensitive files. 3. Run Claude Code in a sandbox or container with only the target workspace mounted as writable. 4. Use a dedicated, unprivileged operating-system account without access to unrelated repositories, personal files, deployment credentials, or host administration interfaces. 5. Define allowlists for permitted commands and filesystem paths. 6. Deny access to SSH keys, cloud credentials, environment-secret files, package publishing tokens, and production configuration unless a specific task requires them. 7. Require review of generated changes and test commands before execution, especially when the original request comes from an untrusted source.
