T09 · Insecure Skill Coding Practices
- Location
SKILL.md:73- Finding
Shell Command Injection Through Unquoted File Path
- Content
View full analysis
/tmp/summon-command-output ``` 2. The agent substitutes that value directly into the documented command. 3. The final name argument becomes equivalent to: ```bash -F "name=$(basename document; id > /tmp/summon-command-output)" ``` 4. When the command is interpreted by a shell, `basename document` runs first, followed by the injected `id` command. 5. The injected command executes with the same operating-system identity and permissions ...[truncated 1038 chars]- Remediation
View remediation
&2 exit 1 fi curl -s -X POST 'https://summontranslator.com/api/v1/jobs' \ -H "Authorization: Bearer $SUMMON_API_KEY" \ -F "file=@${file_path}" \ -F "provider=${provider}" \ -F "model=${model}" \ -F "targetLanguages=${target_languages}" \ -F "sourceLanguage=${source_language}" \ -F "name=${output_name}" ``` The caller should invoke this script using a non-shell argument array so that the supplied path remains one argument regardless of embedded shell metacharacters. Apply the same structured argument handling to all other placeholders used by the documented commands. ]]>
