Back to skill

Security audit

Multi-Agent Deployment Skill for OpenClaw

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent deployment purpose, but it exposes agent memory and cloud gateways too broadly for a production tool without enough authentication, confirmation, or rollback guidance.

Review before installing or running. Use dry-run first, keep the REST memory API bound to localhost unless you add authentication and network controls, remove unauthenticated public cloud ingress, pin package and image versions, back up state before reset commands, and avoid using the documented workflow runner with untrusted filenames.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/memory_sync.py:547
Finding

Unauthenticated REST API Exposes Shared Agent Memory

Content
View full analysis
/"}, 400) return agent_id, key = parts value = self.memory.agent_read(agent_id, key) if value is not None: self._json_response({"key": key, "agent_id": agent_id, "value": value}) else: self._json_response({"error": "Key not found or expired"}, 404) ``` ```python if path == "/write": agent_id = data.get("agent_id") key = data.get("key") value = data.get("value") ttl = data.get("ttl") schema_type = data.get("schema") if not agent_id or not key or value is None: self._json_response({ "error": "Missing required fields: agent_id, key, value" }, 400) return # Schema validation if schema_type: if isinstance(value, dict): inner = value.get("data", value) valid, errors = validate_schema(schema_type, inner) if not valid: self._json_response({ "error": "Schema validation failed", "schema": schema_type, "errors": errors }, 422) return success = self.memory.agent_write(agent_id, key, value, ttl) ``` ```python def _json_response(self, data, status=200): body = json.dumps(data, indent=2, ensure_ascii=False).encode("utf-8") self.send_response(status) self.send_header("Content-Type", "application/json") self.send_header("Content-Length", str(len(body))) self.send_header("Access-Control-Allow-Origin", "*") self.end_headers() self.wfile.write(body) ``` ### Technical Analysis The REST server ...[truncated 2456 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/deploy_script.sh:180
Finding

Generated Cloud Deployments Enable Public or Unauthenticated Gateway Access

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/deploy_script.sh:204
Finding

Mutable Container Tags and Unpinned Global Package Installation Create Supply-Chain Risk

Content
View full analysis
./deployments/Dockerfile.openclaw << EOF FROM node:22-alpine # Install OpenClaw RUN npm install -g openclaw # Create workspace directory RUN mkdir -p /data/.openclaw/workspace # Copy agent configurations COPY ./agents /data/.openclaw/agents COPY ./shared_memory /data/.openclaw/shared_memory # Copy OpenClaw configuration COPY ./config.json /data/.openclaw/config.json # Expose port EXPOSE 8080 # Start OpenClaw gateway CMD ["openclaw", "gateway", "start", "--port", "8080", "--host", "0.0.0.0"] EOF ``` The generated and checked-in deployment manifests also use a mutable image tag: ```yaml image: openclaw/gateway:latest ``` ### Technical Analysis `npm install -g openclaw` resolves the package version at build time instead of using a reviewed, fixed version. Similarly, `openclaw/gateway:latest` is a mutable image reference whose contents can change without any modification to this project. This makes builds non-reproducible and permits future upstream publication changes to alter the executable code deployed by users. A compromised registry account, malicious upstream release, or accidental breaking release could be incorporated automatically during the next build or deployment. The project does not retrieve and execute a custom remote payload directly, and no malicious dependency was identified. The confirmed issue is the unsafe dependency-selection practice and the resulting supply-chain exposure. ### Attack Path 1. An upstream package or container registry account is ...[truncated 1050 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/workflows.md:385
Finding

Workflow Filename Is Interpolated into Executable Python Source

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (26)

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · assets/templates/AGENTS.md (reported line 88)May include surrounding context.

md
### Access Control
- Respect permission boundaries
- Don't bypass security controls
- Report access violations
- Follow principle of least privilege

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The command 'rm -rf /data/.openclaw/shared_memory/*' is a destructive bulk deletion in a troubleshooting guide, and if executed it irreversibly removes all shared-memory contents. In this skill context, operators are likely to run such commands in production recovery scenarios, so even a correctly scoped wipe can destroy state, disrupt coordination, and erase evidence needed for diagnosis.

Content

Scanner excerpt · references/troubleshooting.md (reported line 417)May include surrounding context.

md
cp /backup/shared_data.json.backup /data/.openclaw/shared_memory/shared_data.json
else
  # Reinitialize shared memory
  rm -rf /data/.openclaw/shared_memory/*
  python scripts/memory_sync.py --init --path /data/.openclaw/shared_memory
fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The command 'rm -rf /data/.openclaw/shared_memory/*' is a destructive bulk deletion in a troubleshooting guide, and if executed it irreversibly removes all shared-memory contents. In this skill context, operators are likely to run such commands in production recovery scenarios, so even a correctly scoped wipe can destroy state, disrupt coordination, and erase evidence needed for diagnosis.

Content

Scanner excerpt · references/troubleshooting.md (reported line 417)May include surrounding context.

md
cp /backup/shared_data.json.backup /data/.openclaw/shared_memory/shared_data.json
else
  # Reinitialize shared memory
  rm -rf /data/.openclaw/shared_memory/*
  python scripts/memory_sync.py --init --path /data/.openclaw/shared_memory
fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//memory/*' permanently deletes an agent's memory/state, which can cause loss of business context, break recovery, and remove artifacts relevant to incident response. In a deployment troubleshooting document, such commands are especially dangerous because stressed operators may substitute the wrong agent name or run the command before preserving evidence.

Content

Scanner excerpt · references/troubleshooting.md (reported line 437)May include surrounding context.

md
/data/.openclaw/agents/<agent-name>

# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//memory/*' permanently deletes an agent's memory/state, which can cause loss of business context, break recovery, and remove artifacts relevant to incident response. In a deployment troubleshooting document, such commands are especially dangerous because stressed operators may substitute the wrong agent name or run the command before preserving evidence.

Content

Scanner excerpt · references/troubleshooting.md (reported line 437)May include surrounding context.

md
/data/.openclaw/agents/<agent-name>

# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//memory/*' permanently deletes an agent's memory/state, which can cause loss of business context, break recovery, and remove artifacts relevant to incident response. In a deployment troubleshooting document, such commands are especially dangerous because stressed operators may substitute the wrong agent name or run the command before preserving evidence.

Content

Scanner excerpt · references/troubleshooting.md (reported line 437)May include surrounding context.

md
/data/.openclaw/agents/<agent-name>

# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//workspace/temp/*' performs forceful recursive deletion and can remove more data than intended if path substitution is incorrect or directory layout changes. While likely meant as legitimate cleanup, it still creates operational risk in production by normalizing unsafe copy-paste deletion during recovery procedures.

Content

Scanner excerpt · references/troubleshooting.md (reported line 438)May include surrounding context.

md
# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent
openclaw agent start <agent-name>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//workspace/temp/*' performs forceful recursive deletion and can remove more data than intended if path substitution is incorrect or directory layout changes. While likely meant as legitimate cleanup, it still creates operational risk in production by normalizing unsafe copy-paste deletion during recovery procedures.

Content

Scanner excerpt · references/troubleshooting.md (reported line 438)May include surrounding context.

md
# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent
openclaw agent start <agent-name>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The command 'rm -rf /data/.openclaw/agents//workspace/temp/*' performs forceful recursive deletion and can remove more data than intended if path substitution is incorrect or directory layout changes. While likely meant as legitimate cleanup, it still creates operational risk in production by normalizing unsafe copy-paste deletion during recovery procedures.

Content

Scanner excerpt · references/troubleshooting.md (reported line 438)May include surrounding context.

md
# Reset agent state (optional)
rm -rf /data/.openclaw/agents/<agent-name>/memory/*
rm -rf /data/.openclaw/agents/<agent-name>/workspace/temp/*

# Restart agent
openclaw agent start <agent-name>

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises executable Python and shell scripts that create files, modify configuration, access networks, and perform cloud deployments, but it declares no explicit tool/permission scope. In an agent ecosystem, that omission prevents policy engines and users from understanding or constraining what the skill may do, increasing the risk of unintended local modification or remote deployment activity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-start instructions present commands that scaffold directories, write OpenClaw configuration, initialize persistent shared memory, and prepare cloud deployment without clear warnings that they modify local state and may later affect paid cloud resources. Users or autonomous agents could execute these examples as routine setup and cause unintended configuration drift, persistence, or infrastructure changes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

Quick Start (5 minutes)

bash
# 1. Create 5 agent directories with SOUL.md + AGENTS.md templates
python scripts/agent_setup.py --agents coordinator,research,builder,auditor,personal --output ./agents

# 2. Generate OpenClaw routing config

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documents an HTTP API for shared memory, including write operations and CORS support, but does not prominently warn that exposing this interface can leak or permit modification of inter-agent data if bound beyond localhost or reverse-proxied insecurely. Shared memory often contains task state and coordination data, so network exposure materially expands the attack surface.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 199)May include surrounding context.

bash
# Write via API
curl -X POST http://localhost:8080/write -H "Content-Type: application/json" \
  -d '{"agent_id":"coordinator","key":"task:t001","value":{"task_id":"t001","assigned_to":"research"},"schema":"task_assignment"}'

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The router trigger phrases include generic terms like 'help,' 'support,' 'write,' 'check,' and 'message,' which overlap with common conversational language. Overbroad routing rules can misroute ordinary user requests into higher-privilege or execution-capable agents, causing unintended file writes, deployments, or access to sensitive memory flows.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The security section claims memory isolation is enforced 'via API only,' yet the rest of the skill describes direct file-backed storage, local file inspection, cleanup, and JSON manipulation. This inconsistency can cause operators to overestimate isolation guarantees and expose sensitive inter-agent data through weaker-than-advertised controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The recovery guide includes destructive deletion of shared-memory contents as part of remediation, but it does not place an immediate, explicit warning next to the command about irreversible data loss and the need to verify the target path first. In an operational troubleshooting document, readers may copy-paste commands under stress, so omission of a direct warning materially increases the chance of accidental data destruction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The agent recovery section instructs operators to remove memory and temp state for an agent, but the guide does not clearly warn that these deletions may permanently erase agent state and forensic evidence. Because this is framed as an optional reset during troubleshooting, an operator may perform it without understanding the recovery or audit implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script uploads the contents of local config.json into a cloud secret mechanism without a dedicated warning or confirmation at the time of transfer. In this skill context, config files may contain API keys, routing credentials, or internal topology data, so silent transmission to a provider account can cause unintended secret disclosure, persistence, and compliance issues if the wrong account or app context is active.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script proceeds directly from preparation into live deployment and resource creation without any explicit confirmation gate. In a deployment skill, this is especially risky because merely invoking the script with valid credentials can create cloud resources, incur cost, expose services, or deploy insecure defaults before the operator notices.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script exposes unauthenticated HTTP endpoints for reading, writing, listing, and inspecting shared memory, and the banner/documentation presents this as a convenience feature without emphasizing that it creates a network-accessible data plane. In a multi-agent deployment context, shared memory may contain coordination data, task contents, secrets, or business workflow state, so accidental exposure beyond localhost or deployment behind a proxy could lead to unauthorized disclosure and tampering.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/memory_sync.py (reported line 981)May include surrounding context.

python
print("  python memory_sync.py --cleanup")
        print("  # HTTP REST API (stdlib, zero deps)")
        print("  python memory_sync.py --listen --backend sqlite --path ./shared_memory")
        print("  curl http://localhost:8080/health")
        print('  curl -X POST http://localhost:8080/write \\')
        print('    -H "Content-Type: application/json" \\')
        print('    -d \'{"agent_id":"coordinator","key":"task:t001","value":{"status":"active"}}\'')

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · scripts/routing_config.py (reported line 142)May include surrounding context.

python
output_path.write_text(config_json)
        print(f"Configuration written to: {output_path.absolute()}")
        
        # Also write a simplified version for quick reference
        simple_config = {
            "agents": list(config["agents"].keys()),
            "defaultAgent": config["routing"]["defaultAgent"],

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This markdown file includes a development sprint template with a deploy stage and a data processing pipeline template, both of which imply actions that could affect system state or user data. The surrounding descriptions present these as ready-to-use patterns but do not include any warning or disclosure about verifying targets, reviewing outputs, or the potential impact of deployment and data-loading steps.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documented POST /cleanup endpoint deletes expired entries from shared memory, which is a destructive operation, but the file provides no explicit warning that data will be removed when this endpoint or the corresponding CLI option is used. Although cleanup is part of the tool's function, there is no confirmation prompt or cautionary disclosure for this irreversible removal behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.