T09 · Insecure Skill Coding Practices
- Location
scripts/dispatch-all.sh:7- Finding
Predictable fallback API credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent orchestration purpose, but it exposes remote agent execution through an under-secured HTTP dispatcher with weak deployment defaults and persistent service setup.
Review before installing. Only run this on trusted private networks, require a strong non-default API key, avoid exposing port 9876 broadly, prefer TLS or identity-aware private transport, and fix the service configuration before enabling persistence. Treat any reachable dispatcher as an interface that can start local OpenClaw agents under that user's permissions.
scripts/dispatch-all.sh:7Predictable fallback API credential
scripts/dispatch-all.sh:27Bearer credentials and agent instructions transmitted over plaintext HTTP
scripts/dispatcher.py:26Dispatcher listens on every network interface by default
scripts/dispatcher.py:175API secret supplied through process command-line arguments
scripts/dispatcher.py:156Predictable log files in shared temporary directory permit symlink attacks and data exposure
scripts/setup-service.sh:21Persistent service installer omits mandatory authentication configuration and enters a restart loop
The description presents a broader orchestration system: dispatching tasks, monitoring progress, and coordinating teams across machines via multiple network methods. The supplied code chunk implements only a narrow subset: broadcasting one message to predefined agents on two predefined IPs using HTTP requests to a /dispatch endpoint with bearer auth. That supports the dispatch portion, but not the claimed monitoring or broader coordination capabilities. The transport is also materially narrower than described, since the script itself uses HTTP to hardcoded addresses and does not implement SSH or generic multi-network orchestration. Therefore the description overstates the actual behavior of this code chunk.
The README explicitly instructs users to expose a lightweight HTTP dispatcher and send agent commands over plain unauthenticated HTTP. In this skill's context, those requests trigger remote agent task execution, so any reachable party on the network could inject commands, tamper with tasks, or abuse the orchestrator for unauthorized remote actions.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 1. Install on remote machines
scp scripts/dispatcher.py user@remote:~/.openclaw/
ssh user@remote "nohup python3 ~/.openclaw/dispatcher.py &"
# 2. Send tasks from gateway
curl -X POST http://remote-ip:9876/dispatch \
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 1. Install on remote machines
scp scripts/dispatcher.py user@remote:~/.openclaw/
ssh user@remote "nohup python3 ~/.openclaw/dispatcher.py &"
# 2. Send tasks from gateway
curl -X POST http://remote-ip:9876/dispatch \
The example shows sending task data to http://remote-ip:9876/dispatch via POST, which implies commands are transmitted without encryption or authenticated integrity checks. Because the payload contains instructions for remote agents, an attacker on the path or any party with access to the endpoint could observe, modify, or submit arbitrary tasks.
ssh user@remote "nohup python3 ~/.openclaw/dispatcher.py &"
# 2. Send tasks from gateway
curl -X POST http://remote-ip:9876/dispatch \
-d '{"agent":"my-agent","message":"Start building."}'
# 3. Broadcast to all machines
The skill advertises and documents capabilities that involve network access, shell execution, and file operations, but it declares no tool scope or permission boundaries. In an orchestration skill that can dispatch work to remote machines, missing explicit permission constraints increases the chance of over-broad execution and unintended access if the skill is installed or invoked in a permissive environment.
The quick-start instructs users to expose a /dispatch endpoint that accepts agent and message input and triggers remote agent execution, while explicitly noting there is no authentication. Even on a private overlay network, any compromised peer or misconfigured routing could abuse the endpoint to send arbitrary tasks to remote agents, making this especially dangerous in a tool designed for cross-machine control.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Dispatch to an agent
curl -X POST http://remote-ip:9876/dispatch \
-H 'Content-Type: application/json' \
-d '{"agent":"byondedu-ceo","message":"Read TASKS.md and start building."}'
The script advertises itself as 'Secure' but sends both the bearer token and message body over plain HTTP to remote hosts. Anyone able to observe traffic on the path to those agents can recover credentials and task contents, then replay or forge dispatch requests.
External transmission by itself is expected for an orchestration script, so the network call is not inherently malicious. However, in this implementation the transmission occurs over insecure HTTP and includes an authentication token, which makes the call security-relevant and exploitable if the network path is not fully trusted.
for agent in "${PC2_AGENTS[@]}"; do
echo -n " PC2 → $agent: "
result=$(curl -s -X POST "http://$PC2:9876/dispatch" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_KEY" \
-d "{\"agent\":\"$agent\",\"message\":\"$MESSAGE\"}" 2>&1)
The broadcast loop transmits sensitive operational data and the Authorization bearer token in cleartext without warning or safeguards. In an orchestration tool, intercepted messages could reveal internal coordination details while a stolen token could let an attacker issue commands to multiple agents across machines.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def trigger_agent(self, agent_id, message):
"""Run openclaw agent in background."""
try:
proc = subprocess.Popen(
[OPENCLAW, "agent", "--agent", agent_id, "--message", message, "--timeout", "120"],
stdout=open(f"/tmp/dispatch-{agent_id}.log", "a"),
stderr=subprocess.STDOUT
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
#!/bin/bash
# ClawOrchestrate — Systemd service installer
# Run this on each remote machine to set up persistent dispatcher
set -e
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
#!/bin/bash
# ClawOrchestrate — Systemd service installer
# Run this on each remote machine to set up persistent dispatcher
set -e
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
echo "Installing ClawOrchestrate dispatcher as systemd service..."
# Create service file
cat > ~/.config/systemd/user/${SERVICE_NAME}.service << EOF
[Unit]
Description=ClawOrchestrate Agent Dispatcher
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
echo "Installing ClawOrchestrate dispatcher as systemd service..."
# Create service file
cat > ~/.config/systemd/user/${SERVICE_NAME}.service << EOF
[Unit]
Description=ClawOrchestrate Agent Dispatcher
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Reload and enable
systemctl --user daemon-reload
systemctl --user enable ${SERVICE_NAME}
systemctl --user start ${SERVICE_NAME}
echo "✅ Service installed and started."
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Reload and enable
systemctl --user daemon-reload
systemctl --user enable ${SERVICE_NAME}
systemctl --user start ${SERVICE_NAME}
echo "✅ Service installed and started."