T09 · Insecure Skill Coding Practices
- Location
SKILL.md:49- Finding
Potential Shell Command Injection Through Unquoted Transaction Fields
- Content
View full analysis
\ --amount \ --currency \ --description \ --tag ``` ### Technical Analysis The skill instructs the Agent to extract transaction fields from natural-language user input and substitute them into a shell command. Although `CURRENT_DATE` is quoted, user-controlled values such as the description, tag, currency, direction, and amount are represented without quoting or an explicit requirement to use a shell-free argument-array interface. If the Agent performs direct textual substitution, shell metacharacters embedded in a field can be interpreted by the command shell rather than passed as literal argument data. Relevant metacharacters include command separators, command substitutions, redirection operators, pipelines, and variable expansions. The fields with the highest exposure are `description`, `tag`, and optional textual arguments because they may legitimately contain spaces and arbitrary text. The document does not prescribe strict validation for these values or require safe process invocation. Exploitability therefore depends on how the Agent executes the documented command, but the supplied pattern permits command injection when values are interpolated into a shell command. ### Attack Path 1. An attacker submits a transaction statement containing shell syntax in a user-controlled field, such as the description or tag. 2. The Agent extracts that content as a ledger field. 3. The Agent substitutes the value directly into the documented command without safe argument separation or shell quoting. 4. The command is passed to a shell. 5. The shell parses the inject ...[truncated 974 chars]- Remediation
View remediation
