T09 · Insecure Skill Coding Practices
- Location
scripts/pre-execution-gate.js:15- Finding
Pre-execution safety gate always fails open
- Content
View full analysis
isRelevantToPlan(c, plan)); return result; } ``` ### Technical Analysis The gate initializes `proceed` to `true` and never changes it. Detected safety issues and conflicts are only copied into warning arrays. Consequently, plans containing patterns such as `rm -rf`, `DROP TABLE`, `DELETE FROM`, `eval`, `exec`, or `child_process` still receive an affirmative execution decision. This is a fail-open implementation of a security boundary. A caller that uses `proceed` as the authoritative go/no-go result will approve operations that the gate itself has identified as dangerous. The issue does not directly execute commands, but it defeats the intended protection around a downstream execution mechanism. ### Attack Path 1. An attacker or untrusted user submits a plan containing a dangerous operation. 2. `checkSafetyConstraints` or `checkConflicts` identifies the operation and returns warnings. 3. `preExecutionGate` records those warnings but leaves `result.proceed` equal to `true`. 4. A downstream caller checks only `proceed`. 5. The dangerous operation is treated as approved and may be executed by the caller. ### Impact Assessment The impact ...[truncated 478 chars]- Remediation
View remediation
