T09 · Insecure Skill Coding Practices
- Location
scripts/safe-exec-approve.sh:27- Finding
Non-interactive approval bypass executes dangerous commands without human confirmation
- Content
View full analysis
"$REQUEST_FILE.tmp" && mv "$REQUEST_FILE.tmp" "$REQUEST_FILE" echo "✅ Executing..." eval "$COMMAND" ``` ### Technical Analysis The approval utility initializes `IS_INTERACTIVE` to false and only requests confirmation when stdin is attached to a terminal. Every non-interactive invocation therefore skips confirmation and proceeds directly to `eval`. The `OPENCLAW_AGENT_CALL` and `SAFE_EXEC_AUTO_CONFIRM` environment variables also force the non-interactive branch, even if a terminal is available. No authenticated approval token, trusted principal check, or independent confirmation channel is required. This violates the Skill's declared security model, which states that dangerous commands wait for explicit user approval. The same agent that created or discovered a pending request can invoke this script through a non-interactive execution tool and cause the command to run. ### Attack Path 1. An agent submits a dangerous command through SafeExec. 2. SafeExec stores the command in a p ...[truncated 757 chars]- Remediation
View remediation
