T09 · Insecure Skill Coding Practices
- Location
scripts/swarm.js:154- Finding
Arbitrary Command Execution Through Unsanitized Task and Cleanup Metadata
- Content
View full analysis
r.taskId === wt.task.id); if (!result || result.status === 'MERGED' || result.status === 'REJECTED') { tryRun(`git branch -D "${wt.branchName}"`, repoPath); log(`✓ Deleted branch: ${wt.branchName}`); } ``` ### Technical Analysis The script builds command strings by interpolating values derived from task files and cleanup package files, then passes those strings to `bash -c`. The affected values include: - `task.id` - `wt.worktreePath` - `wt.branchName` These fields are not validated against a safe ch ...[truncated 1745 chars]- Remediation
View remediation
