T09 · Insecure Skill Coding Practices
- Location
scripts/generate.js:69- Finding
Arbitrary Command Execution Through Shell Command Injection
- Content
View full analysis
/dev/null`); return; } const r = run(cmd); ``` ```javascript const cmd = [ 'uv run', JSON.stringify(OVERLAY_SCRIPT), '--input', JSON.stringify(baseVideoPath), '--output', JSON.stringify(overlayedPath), '--captions', JSON.stringify(opts.scriptText), '--lang', opts.lang, logoFlag, ].filter(Boolean).join(' '); const r = run(cmd); ``` ```javascript const cmd = [ 'ffmpeg -y', `-i ${JSON.stringify(overlayedPath)}`, `-i ${JSON.stringify(audioSrc)}`, '-filter_complex', '"[0:a]volume=1.0[va];[1:a]volume=0.20[bgm];[va][bgm]amix=inputs=2:duration=first:dropout_transition=2[aout]"', '-map 0:v', '-map "[aout]"', '-c:v copy', '-c:a aac -b:a 192k', '-shortest', JSON.stringify(finalPath), ].join(' '); const r = run(cmd); ``` ### Technical Analysis The application constructs commands by concatenating strings and then passes the resulting command to `bash -lc`. Consequently, the shell interprets metacharacters contained in user-controlled arguments. The `--veo-model` and `--lang` values are inserted without shell quoting. Other ...[truncated 1612 chars]- Remediation
View remediation
