T09 · Insecure Skill Coding Practices
- Location
SKILL.md:28- Finding
Shell command injection through unvalidated endpoint interpolation
- Content
View full analysis
-h` ``` The generated template in `references/templates.md:23-27` repeats the unsafe pattern: ```markdown 1. Confirm endpoint/protocol/auth from user host: - search official docs for canonical endpoint and auth requirements - probe with `uxc -h` (and endpoint variants if needed) 2. Use fixed link command by default: - `command -v ` - If missing, create it: `uxc link ` ``` ### Technical Analysis The Skill explicitly starts with a raw, user-provided endpoint and places that value into shell-oriented command examples. It does not require URL parsing, character validation, shell escaping, or execution through an argument-vector API. If an Agent replaces `` or `` with attacker-controlled text and executes the rendered command through a shell, shell metacharacters can terminate the intended `uxc` argument and introduce another command. Quoting alone would not be sufficient unless quoting and escaping are implemented consistently for the target shell. The validator also checks only whether these command patterns appear in generated documentation. It does not enforce safe endpoint validation or safe process invocation. ### Attack Path 1. An attacker supplies a crafted endpoint containing shell syntax, such as a URL followed by a command separator and an atta ...[truncated 1123 chars]- Remediation
View remediation
