T09 · Insecure Skill Coding Practices
- Location
SKILL.md:61- Finding
Indiscriminate Automatic Approval of Security-Sensitive Prompts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 61-73
Vulnerability Type: Generic confirmation bypass in a PTY-based command executor
Risk Level: HighVulnerable code:
python if b'Do you want to' in output: os.write(master_fd, b'y\n') if b'Are you sure' in output: os.write(master_fd, b'y\n') if b'Continue?' in output: os.write(master_fd, b'y\n')Technical Analysis
The documented implementation detects generic text fragments in process output and responds affirmatively without determining which command generated the prompt or what operation is awaiting approval. These strings are used by many security-sensitive and destructive operations, including package installation, file deletion, deployment, permission changes, and overwriting files.
The mechanism therefore removes an important interactive safety boundary. It also does not bind an approval to a specific command, expected program, predefined argument list, or known low-risk operation. A malicious repository, dependency, subprocess, or agent-generated command could deliberately print one of these strings and consume the injected affirmative response.
Attack Path
- An attacker places malicious instructions, code, or build scripts in a project processed by the skill.
- The coding agent or project tooling launches a command that requests confirmation before performing a destructive or security-sensitive operation.
- The command emits a generic prompt such as
Are you sure. - The PTY handler matches the text without validating the pending operation.
- The handler writes
yto the subprocess. - The destructive operation proceeds without informed user consent.
- If the runner was started with elevated privileges, the operation executes with those elevated privileges.
Impact Assessment
An attacker could bypass confirmation controls and cause unintended file modification or deletion, dependency i ...[truncated 298 chars]
- Remediation
View remediation
Remediation Suggestions
- Disable automatic affirmative responses by default.
- Require explicit user approval for destructive, privileged, deployment, authentication, and dependency-management operations.
- Bind any permitted automatic response to an exact executable, normalized argument list, expected prompt, and narrowly defined operation.
- Maintain a denylist for destructive commands in addition to a minimal allowlist.
- Display the exact pending command, working directory, execution user, and expected effects before requesting approval.
- Reject prompts generated by unknown child processes.
- Record approval decisions and executed commands in tamper-resistant audit logs.
- Add tests proving that generic prompt text cannot independently trigger approval.
