Back to skill

Security audit

OpenClaw SubAgents Creator

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent documentation for OpenClaw subagents, but it encourages persistent autonomous agents and database-driven work execution without enough control guidance.

Install only if you are prepared to configure strict tool allowlists, pin the Convex CLI, keep each agent workspace and auth profile isolated, require approval for consequential actions, and add clear controls to list, audit, pause, and remove heartbeat cron jobs.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T06 · System Persistence

Error
Location
SKILL.md:85
Finding
Recurring Heartbeat Jobs Enable Persistent Autonomous Agent Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:85-92` **Additional Location**: `references/multi-agent-architecture.md:194-210` **Vulnerability Type**: Persistent scheduled execution **Risk Level**: High ### Vulnerable Code ```bash openclaw cron add \ --name "agent-heartbeat" \ --cron "0,15,30,45 * * * *" \ --session "isolated" \ --message "You are <AgentName>, the <Role>. Read WORKING.md. Check Mission Control for @mentions and assigned tasks. If work exists, do it and update WORKING.md. If nothing to do, reply HEARTBEAT_OK." ``` The architecture reference also recommends configuring each independent agent with its own recurring heartbeat: ```text Each heartbeat creates an **isolated session** (one-shot). Avoids always-on costs. ``` ### Technical Analysis The Skill instructs users to register recurring cron jobs that launch isolated agent sessions every 15 minutes. The scheduled instruction authorizes each agent to retrieve work from persistent files and Mission Control and to execute that work without requiring a new user request. Although recurring heartbeats are part of the documented architecture, they create a cross-session persistence mechanism. The scheduled job remains active after the original configuration session ends and repeatedly grants the agent opportunities to use its configured filesystem, shell, browser, and database capabilities. No mandatory expiration, execution budget, approval gate, or removal procedure is included. Consequently, a stale, compromised, or unexpectedly modified task source can continue triggering autonomous activity. ### Attack Path 1. A user follows the Skill and registers the recommended heartbeat cron job. 2. The cron configuration survives the original Skill invocation. 3. Every 15 minutes, OpenClaw creates a new isolated agent session. 4. The scheduled instruction directs the agent to read persistent state and query Mission Control. 5. A malicious, compromised, or incorrectly auth ...[truncated 1015 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make heartbeat installation explicitly opt-in rather than part of the default setup. 2. Require users to define an expiration time, maximum number of executions, and resource budget for every scheduled agent. 3. Add an approval gate before shell execution, file modification, external communication, or other consequential actions. 4. Restrict heartbeat sessions to the minimum required tools; routine status checks should not receive shell, process, or browser access. 5. Validate task origin and authorization before treating Mission Control records as executable work. 6. Provide commands to list, disable, and permanently remove all installed heartbeat jobs. 7. Log every wake-up, retrieved task, tool invocation, and resulting state change to an append-only audit trail. 8. Implement rate limits and a failure threshold that automatically disables a heartbeat after repeated errors or suspicious tasks. ]]>

T01 · Skill Instruction Hijacking

Error
Location
references/agent-files.md:56
Finding
Untrusted Mission Control Records Are Treated as Executable Agent Instructions<![CDATA[ ## Vulnerability Details **File Location**: `references/agent-files.md:56-80` **Additional Locations**: `SKILL.md:88-92`, `references/agent-files.md:116-120`, `references/multi-agent-architecture.md:65-81` **Vulnerability Type**: External instruction-channel hijacking **Risk Level**: High ### Vulnerable Code ```markdown ## Mission Control Mission Control is the shared task database. Use Convex CLI to interact: ```bash # Check your assigned tasks npx convex run tasks:list '{"assigneeId": "<your-agent-id>"}' # Check @mentions / notifications npx convex run notifications:list '{"agentId": "<your-agent-id>", "delivered": false}' # Post a comment on a task npx convex run messages:create '{"taskId": "...", "content": "..."}' # Update task status npx convex run tasks:update '{"id": "...", "status": "in_progress"}' # Create a deliverable document npx convex run documents:create '{"title": "...", "content": "...", "type": "deliverable", "taskId": "..."}' ``` Task statuses: inbox -> assigned -> in_progress -> review -> done | blocked ``` The heartbeat template then instructs agents to act on retrieved records: ```markdown ## Take Action or Stand Down - [ ] If work exists: do it, update WORKING.md, post updates to Mission Control - [ ] If nothing to do: reply exactly "HEARTBEAT_OK" and terminate ``` ### Technical Analysis The injected `AGENTS.md` operating manual directs agents to query a shared Convex database and treat assigned tasks and notifications as actionable instructions. The heartbeat checklist then tells the agent to perform any discovered work. The documentation does not require agents to distinguish trusted operational directives from untrusted task descriptions, comments, attachments, or notification content. It also does not specify author authentication, task-level authorization, prompt-injection filtering, allowed action classes, or human approval for consequential operations. Because `AGENTS.md` is injected into subagents, thi ...[truncated 1968 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat all task descriptions, comments, documents, attachments, and notifications as untrusted data rather than authoritative instructions. 2. Authenticate record authors and enforce per-agent, per-project, and per-action access-control lists in Mission Control. 3. Cryptographically associate assignments with an approved issuer where high-impact automation is required. 4. Define an explicit action schema instead of allowing arbitrary natural-language tasks to authorize tool use. 5. Require human confirmation before shell execution, sensitive file access, credential use, external transmission, spawning additional agents, or persistent memory updates. 6. Prevent retrieved content from changing system instructions, tool policies, approval requirements, identity, or safety constraints. 7. Apply strict tool allowlists to heartbeat sessions and subagents; status polling should not inherit broad execution capabilities. 8. Validate and sanitize content before writing it to persistent memory files. 9. Record task origin, author, approval status, retrieved content hash, and every resulting tool call in audit logs. 10. Add task revocation, quarantine, and emergency-disable controls for compromised Mission Control accounts. ]]>

T08 · Insecure Dependencies

Warning
Location
references/agent-files.md:65
Finding
Unpinned Convex CLI Execution Through npx Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `references/agent-files.md:65-80` **Additional Location**: `references/multi-agent-architecture.md:140-154` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash # Check your assigned tasks npx convex run tasks:list '{"assigneeId": "<your-agent-id>"}' # Check @mentions / notifications npx convex run notifications:list '{"agentId": "<your-agent-id>", "delivered": false}' # Post a comment on a task npx convex run messages:create '{"taskId": "...", "content": "..."}' # Update task status npx convex run tasks:update '{"id": "...", "status": "in_progress"}' # Create a deliverable document npx convex run documents:create '{"title": "...", "content": "...", "type": "deliverable", "taskId": "..."}' ``` ### Technical Analysis The templates repeatedly invoke `npx convex` without specifying an exact package version, a lockfile, or an integrity hash. Depending on the local Node.js and `npx` configuration, if an appropriate trusted local binary is unavailable, `npx` may resolve and download a package from a configured registry before executing it. This behavior moves executable code selection outside the audited Skill package. The effective CLI implementation can change after the Skill has been reviewed because of package updates, registry compromise, dependency compromise, or manipulated package-resolution settings. Exploitation is conditional: it requires dynamic package resolution or control over the package source, dependency chain, registry configuration, or local resolution environment. The repository itself does not include a malicious package or embedded payload. ### Attack Path 1. An agent follows the template and invokes `npx convex`. 2. No verified project-local Convex binary is available, or package resolution is redirected through a compromised configuration. 3. `npx` resolves or downloads an unpinned package and its dependencies. 4. A ...[truncated 1097 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add the audited Convex CLI as an exact project dependency and commit the package lockfile. 2. Invoke the verified project-local binary rather than permitting automatic package installation. 3. Configure `npx` to reject installation when the requested executable is not already present locally. 4. Pin package versions and verify registry integrity metadata during installation. 5. Use a trusted private registry or allowlisted package proxy for production agent environments. 6. Perform dependency vulnerability, provenance, and signature checks before deployment. 7. Install dependencies in a controlled build stage rather than during autonomous agent execution. 8. Run the CLI in a restricted sandbox with minimal filesystem access, a minimal environment, and tightly scoped Convex credentials. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

External Model or Provider Selection

High
Category
Excessive Agency
Content
With model/thinking flags:

```
/subagents spawn researcher "..." --model claude-haiku-4-5 --thinking none
```

---
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description says to use this skill for "any task involving OpenClaw multi-agent architecture, agent identity, memory, Mission Control integration, or subagent spawning." This scope is very broad and does not define clear boundaries or exclusions, increasing the chance of unintended invocation during ordinary discussion of OpenClaw concepts rather than actual configuration tasks.

Session Persistence

Medium
Category
Rogue Agent
Content
---

## Step 3: Create Agent Identity Files

Each agent workspace at `~/.openclaw/workspace-<agentId>/` needs identity files.
Load `references/agent-files.md` for full templates.
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.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs users to set up recurring cron-driven agent execution every 15 minutes without an explicit warning that this creates autonomous background behavior. That can lead users to deploy persistent agents that continue reading task state, checking Mission Control, and acting without fresh per-run consent, increasing the risk of unintended actions, cost burn, or sensitive data processing.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The skill gives contradictory guidance about whether subagents can access `sessions_spawn`: the table says depth-1 orchestrators have it, while the next line says it is blocked for all subagents by default. In a system that grants tool access based on documentation-driven configuration, this ambiguity can cause operators or downstream agents to overgrant spawning privileges, enabling unintended recursive agent creation, privilege expansion, or resource exhaustion.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The documentation instructs agents to invoke `npx convex` without pinning an exact package version. `npx` may fetch the latest package at execution time, which creates a supply-chain risk: a compromised upstream release, typo-squatted package resolution, or unexpected breaking change could cause arbitrary code execution in the agent environment. In this skill, the commands are framed as routine operational steps for autonomous subagents, which increases the chance they will be executed automatically and repeatedly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
This command again relies on unpinned `npx convex`, which means execution depends on whatever package version is resolved at runtime. That exposes the agent to supply-chain compromise or unintended behavior changes, and because this specific command queries notifications on wake-up, it may be run frequently by automated heartbeat workflows. Frequent unattended execution makes the risk more operationally significant.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The documented use of `npx convex` without version pinning allows runtime retrieval of mutable code from the package registry. If the package or one of its dependencies is compromised, the agent could execute attacker-controlled code while posting messages into Mission Control, potentially affecting both the local environment and shared task data. The multi-agent orchestration context increases blast radius because one compromised agent workflow can influence others through shared systems.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
This `tasks:update` example uses unpinned `npx convex`, creating the same package-resolution risk at runtime. Because the command modifies task state, a compromised or unexpected CLI version could not only execute arbitrary code but also alter workflow data in ways that mislead operators or disrupt automation. In an agent-management skill, that combination of code execution and control-plane manipulation is meaningfully dangerous.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
This example also instructs the use of `npx convex` without pinning, so the agent may download and execute mutable remote code when creating documents. Since the skill is specifically about configuring and operating autonomous subagents, the documentation is likely to be copied directly into real workflows; that makes the issue more dangerous than a purely illustrative reference because it encourages a repeatable insecure execution pattern.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.