T09 · Insecure Skill Coding Practices
- Location
SKILL.md:48- Finding
Command Injection Through Shell-Interpolated Message Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:48-50;references/message-send.md:20-28,38-40,67-69
Vulnerability Type: OS command injection caused by unsafe shell interpolation
Risk Level: HighVulnerable Code
SKILL.md:48-50:markdown | Send message | `auwomo message send --to "recipient" --text "content"` | | Preview without sending | `auwomo message send --to "recipient" --text "content" --dry-run` | | Send by open_id | `auwomo message send --to ou_xxx --text "content"` |references/message-send.md:20-28:bash auwomo message send --to "recipient" --text "Please complete today's daily report before leaving work." --dry-runThe dry-run output displays the command that would be executed without actually sending it.
3. Send the Message
bash auwomo message send --to "recipient" --text "Please complete today's daily report before leaving work."references/message-send.md:38-40:bash auwomo message send --to "recipient" --text "hello" --format jsonreferences/message-send.md:67-69:bash auwomo message send --to "recipient-one" --text "Please submit the daily report" auwomo message send --to "recipient-two" --text "Please submit the daily report"Technical Analysis
The skill directs an agent to insert user-supplied recipient identifiers and message bodies into shell command strings enclosed with double quotes. Double quotes do not neutralize all shell syntax. Command substitution using
$(...)or backticks remains active inside double-quoted strings, and an embedded quote can terminate the intended argument and introduce additional shell operators.For example, if an implementation directly constructs and executes the documented command through a shell, a message containing:
text Status update $(id > /tmp/agent-identity)could cause the shell to execute
idbefore invokingauwomo. The--dry-run...[truncated 2274 chars]- Remediation
View remediation
Remediation Suggestions
-
Require execution through a structured process API that accepts an argument array and does not invoke a shell. The intended arguments should be equivalent to:
text ["auwomo", "message", "send", "--to", recipient, "--text", message]Add
"--dry-run"or"--format", "json"as separate arguments when needed. -
Explicitly prohibit shell-string execution, including
sh -c,bash -c,eval, and process APIs configured withshell=true. -
Update every command example to state that placeholders represent separate process arguments rather than text to be interpolated into a shell command.
-
Validate recipients using the documented exact-match policy and validate direct
open_idvalues against the expected identifier format. -
Treat message text as opaque data. Do not remove ordinary message punctuation merely as a substitute for safe process invocation.
-
If a shell is unavoidable, apply a well-tested, platform-specific argument-quoting routine to every dynamic value. Manual wrapping with single or double quotes is insufficient.
-
Add security tests using message bodies containing command substitutions, backticks, quotes, semicolons, newlines, redirection operators, and other shell metacharacters. Confirm that these values arrive at
auwomoliterally and do not create local side effects.
-
