T09 · Insecure Skill Coding Practices
- Location
SKILL.md:8- Finding
Unrestricted Auto-Approved Agent Execution and Unsafe Task Interpolation
- Content
View full analysis
" notes: | Use for coding, scaffolding, debugging, and multi-step plans. Keep prompts short and task-oriented. examples: - 'cline -y "Create hello.sh that prints date and uname -a."' - 'cline -y "Refactor this repo: add README and scripts folder."' ``` ### Technical Analysis The skill instructs the agent to invoke Cline with the `-y` option and an arbitrary task value. This option enables non-interactive, auto-approved operation. Consequently, commands and file modifications selected by Cline may proceed without per-operation user confirmation. The task placeholder is also embedded inside a shell-style command string: ```text cline -y "" ``` No requirement is given to pass the task as a structured process argument or to escape shell metacharacters. If the skill framework substitutes untrusted task text into this string and executes it through a shell, a task containing quote characters or shell operators could terminate the intended argument and introduce additional commands. Whether this direct injection route is exploitable depends on how the host executes the command template, but the configuration does not establish a safe argument boundary. The separate safety statement instructing the agent to ask before destructive commands does not technically enforce a control and is weakened by the unconditional use of auto-approval. ### Attack Path 1. An attacker or untrusted repository content influences the task supplied to the skill. 2. The task is substituted into `cline -y ""`. 3. One of the following execution paths occurs: - Cline interprets malicious instructions and selects unsafe commands or file modifications. - If the host uses a ...[truncated 979 chars]- Remediation
View remediation
