T09 · Insecure Skill Coding Practices
- Location
SKILL.md:24- Finding
Broad Automatic Process Termination During Timeout Recovery
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 24–29
Vulnerability Type: Unsafe process management using a broad command-line pattern
Risk Level: Mediumbash pkill -f "node.*openclaw.*gateway" || true sleep 3 openclaw gateway statusTechnical Analysis
The skill directs the agent to execute
pkill -fautomatically when the browser reports a timeout. The-foption matches against complete process command lines, while the regular expression can match every accessible Node.js process containing bothopenclawandgateway.The command does not:
- Identify the gateway instance associated with the current task.
- Validate the selected process ID, executable path, owner, or session.
- Distinguish the current gateway from unrelated OpenClaw gateway processes.
- Request user approval before terminating processes.
- Explicitly restart the terminated gateway;
openclaw gateway statusonly checks its status.
Consequently, this recovery procedure violates safe process-management practices and may terminate a wider set of processes than required. The suppression of errors through
|| truecan also conceal failure or partial termination.Attack Path
- A browser operation returns a timeout, whether because of a genuine service failure, resource pressure, or another transient condition.
- The skill follows its documented recovery procedure without requesting confirmation.
- It executes
pkill -f "node.*openclaw.*gateway". - The operating system terminates every process accessible to the executing user whose command line matches the expression.
- Other OpenClaw gateway instances or sessions running under that user may be interrupted.
- The skill waits and runs a status check, but the documented commands do not guarantee that the intended gateway is restarted.
Impact Assessment
The command operates with the privileges of the account running the agent. It does not i ...[truncated 608 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the broad
pkill -frecovery command. - Use an official, instance-scoped OpenClaw restart operation if one is available.
- Require explicit user approval before terminating or restarting system processes unless the user has separately authorized automatic recovery.
- If direct process signaling is unavoidable:
- Obtain the PID from a trusted PID file or service manager.
- Verify the process owner, executable path, start time, and expected instance identifier.
- Signal only the verified PID.
- Prefer graceful termination before forced termination.
- Use a service manager with a uniquely named service unit to isolate the intended gateway instance.
- Do not suppress all failures with
|| true; record and handle termination errors explicitly. - Perform a bounded health check after restart and stop the workflow if recovery cannot be verified.
- Treat browser timeouts as potentially transient: retry the browser operation with bounded backoff before initiating process-level recovery.
- Remove the broad
