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 helper treats the absence of a terminal as equivalent to user approval. It also forcibly disables interactive confirmation whenever either `OPENCLAW_AGENT_CALL` or `SAFE_EXEC_AUTO_CONFIRM` is non-empty. This violates the tool's central security boundary: a dangerous command placed in the pending queue is supposed to require explicit human authorization. Instead, any process that invokes the approval helper without a TTY can cause the queued command to execute. The variable checks test only whether the variables are non-empty, so values such as `OPENCLAW_AGENT_CALL=0` or `SAFE_EXEC_AUTO_CONFIRM=false` still trigger the bypass. The bypass is not restricted by risk level. HIGH and CRITICAL requests follow the same path and are executed through `eval`. ### Attack Path 1. An att ...[truncated 1056 chars]- Remediation
View remediation
