T09 · Insecure Skill Coding Practices
- Location
scripts/process_task.js:79- Finding
Shell Command Injection Through Attacker-Controlled Feishu Task Content
- Content
View full analysis
60 ? '...' : ''}` ); ``` ```javascript const preview = subtask.replace(/^[\d\-\*•]+[\.\)]\s*/, '').substring(0, 50); ``` ```javascript await sendFeedback(`✅ Completed ${progress}% - ${preview}...`); ``` ### Technical Analysis The task processor receives Feishu task text through `process.argv[2]`. Portions of that text are subsequently included in progress messages and passed to `sendFeedback()`. `sendFeedback()` constructs a command string and executes it with `execAsync()`. Node.js `exec()` invokes a system shell. The implemented escaping only handles backslashes, double quotes, newlines, and carriage returns. It does not safely neutralize shell expansion features that remain active inside double-quoted shell strings, including command substitution using `$(...)` or backticks. Consequently, task text is interpreted partly as shell syntax rather than exclusively as the value of the `--message` argument. This is a direct command-i ...[truncated 1878 chars]- Remediation
View remediation
