T09 · Insecure Skill Coding Practices
- Location
SKILL.md:63- Finding
Command Injection Through Unquoted User-Controlled Domain Argument
- Content
View full analysis
--source monitor --data '{"sessions": ..., "clicks": ..., ...}'`, then `ledger.py diff --source monitor` for the period delta and `ledger.py trend --source monitor --field ` for the trend line. Label every figure Measured / User-provided / Estimated, and attribute outcome movement against a control rather than to the latest change — see [references/measurement-protocol.md](../../../references/measurement-protocol.md). See [scripts/connectors/README.md](../../../scripts/connectors/README.md). ``` ### Technical Analysis The documented command places the user-controlled `` value directly into a shell command without quoting or validation: ```sh python3 "${CLAUDE_PLUGIN_ROOT}/scripts/connectors/ledger.py" record --source monitor --data '{"sessions": ..., "clicks": ..., ...}' ``` If an agent host follows this instruction by substituting the requested domain into a command string and executing it through a shell, shell metacharacters in the domain are interpreted as syntax rather than as part of a hostname. Characters such as semicolons, command substitutions, pipes, or redirection operators could therefore introduce additional commands. The related `diff` and `trend` examples also use unquoted `` placeholders and are subject to the same underlying weakness. The JSON argument is currently single-quoted, but future insertion of unescaped user-controlled string values into that JSON could create an additional injectio ...[truncated 1880 chars]- Remediation
View remediation
