T09 · Insecure Skill Coding Practices
- Location
SKILL.md:36- Finding
Potential Shell Command Injection Through Unsafely Interpolated User Input
- Content
View full analysis
` — `great | good | normal | tired | terrible` (freeform accepted; lowercased) - `--energy ` — 1-10 (rejected outside that range) ``` The instructions later explicitly direct the agent to derive free-form command arguments from natural-language input: ```markdown - **Parse loosely from natural language.** "feeling tired, energy 4" → `--mood tired --energy 4`. "sore chest and triceps" → `--sore chest,triceps`. - **Merge, don't replace.** If user adds "energy 6 now" later in the day, only update `--energy`. Don't wipe morning mood. - **Recommend the enum values** when you summarize back, but accept freeform — if a user says "drained" or "wired," store it verbatim; downstream skills can pattern-match or pass-through. ``` ### Technical Analysis The Skill instructs an agent to invoke the `life-state` CLI through Bash while deriving arguments from user-controlled natural-language input. Several arguments, including `--mood`, `--sleep`, `--sore`, and `--note`, can contain free-form text. The documentation does not require structured process invocation, argument arrays, validation, or shell-safe escaping. If an implementing agent constructs a command by directly substituting a user value into the documented Bash command, quotation marks, command substitutions, or shell metacharacters in that value can terminate the intended argument and introduce additional shell operations. For example, a malicious note containing syntax ...[truncated 2302 chars]- Remediation
View remediation
