T09 · Insecure Skill Coding Practices
- Location
index.js:24- Finding
Shell Command Injection Through Text-to-Speech Parameters
- Content
View full analysis
- Remediation
View remediation
{ const child = spawn('edge-tts', args, { shell: false }); child.once('error', reject); child.once('close', code => { if (code === 0) resolve(); else reject(new Error(`edge-tts exited with code ${code}`)); }); }); ``` 3. Enforce an explicit whitelist for supported voices in every action, not only in the streaming action. 4. Validate `rate`, `volume`, and `pitch` with strict, anchored formats and documented numeric ranges. 5. Generate output paths internally and apply the path controls described in the separate filesystem finding. 6. Add automated regression tests containing shell metacharacters, command substitutions, quotes, newlines, and option-like input. 7. Avoid attempting to fix this solely through shell escaping; bypassing the shell is the appropriate security boundary. ]]>
