Back to skill

Security audit

OpenClaw Agent Creator

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for managing OpenClaw agents, but it can create persistent scheduled agents and includes under-scoped shell-evaluated cron prompts.

Review carefully before installing. Use this only in an OpenClaw environment where you intend the agent to edit ~/.openclaw, restart the gateway, create cron jobs, and send Telegram messages. Require explicit review of every file change and cron payload, reject untrusted agent IDs or prompt text containing shell syntax, and avoid scheduled prompts that run arbitrary commands.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/config-schema.md:109
Finding
Arbitrary Command Execution Through Shell Substitution in Cron Prompts<![CDATA[ ## Vulnerability Details **File Location**: `references/config-schema.md:109`, `references/prompt-patterns.md:98-105`, and `SKILL.md:115-124` **Vulnerability Type**: Command injection through shell-evaluated prompt content **Risk Level**: High ### Vulnerable Code `references/config-schema.md:109`: ```markdown | `payload.message` | Prompt sent to agent. `$(...)` shell substitution works. | ``` `references/prompt-patterns.md:98-105`: ```markdown `$(...)` is evaluated before reaching the LLM: | Expression | Output | |------------|--------| | `$(date '+%A, %B %d, %Y')` | `Wednesday, February 11, 2026` | | `$(date '+%b %d, %Y')` | `Feb 11, 2026` | | `$(date '+%I:%M %p %Z')` | `09:00 AM MST` | | `$(date +%Y-%m-%d)` | `2026-02-11` | ``` `SKILL.md:115-124`: ```markdown Edit `cron/jobs.json`. Every cron job prompt MUST include: - **Dynamic group ID resolution preamble** (NEVER hardcode Telegram group IDs): ``` FIRST: Resolve your Telegram group ID by running: jq -r '.bindings[] | select(.agentId == "<agent_id>") | .match.peer.id' ~/.openclaw/openclaw.json Use the output as the target for all Telegram messages in this task. ``` - **Date injection**: `$(date '+%A, %B %d, %Y')` after the preamble - **Explicit constraints**: source allowlists, recency rules, format templates - **Delivery instructions**: use `target='<AGENT_GROUP_ID>'` placeholder (resolved by the preamble) ``` ### Technical Analysis The documented cron configuration permits `$(...)` expressions in `payload.message` and states that they are evaluated before the prompt reaches the LLM. This crosses a trust boundary: text intended to serve as an LLM prompt is also interpreted as shell syntax. The Skill creates cron prompts from user-supplied task requirements but does not require validation or escaping of prompt content. It also does not restrict shell substitutions to the documented `date` expressions. Consequently, a malicious requirement containing a substitution such as `$(a ...[truncated 1633 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Disable shell evaluation for `payload.message`; treat the entire prompt as inert data. 2. Generate dates in trusted application code and insert the resulting value without invoking a shell. 3. If backward compatibility requires substitution, enforce an exact allowlist of supported expressions rather than accepting arbitrary `$(...)`. 4. Reject externally influenced prompt text containing `$(`, backticks, command separators, redirects, pipes, control characters, or other shell syntax. 5. Keep user-controlled task content separate from scheduler metadata and pass it through a non-shell serialization interface. 6. Validate the final `cron/jobs.json` payload before writing it and refuse unsafe expressions. 7. Run scheduled jobs under a dedicated, least-privileged account with restricted filesystem and network access. 8. Add tests proving that strings such as `$(id)`, backtick substitutions, multiline shell syntax, and nested substitutions remain literal and are never executed. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:29
Finding
Command and Path Injection Through Insufficiently Validated Agent Identifiers<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:29-31`, `SKILL.md:53-56`, and `SKILL.md:116-120` **Vulnerability Type**: Unsafe shell and path interpolation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:29-31`: ```markdown Before creating anything, clarify with Arch: - Agent name and ID (lowercase, no spaces for ID) - Role and responsibilities (specific, not vague) ``` `SKILL.md:53-56`: ```bash mkdir -p ~/.openclaw/workspace-<agent_id>/memory mkdir -p ~/.openclaw/agents/<agent_id>/agent ``` `SKILL.md:116-120`: ```markdown - **Dynamic group ID resolution preamble** (NEVER hardcode Telegram group IDs): ``` FIRST: Resolve your Telegram group ID by running: jq -r '.bindings[] | select(.agentId == "<agent_id>") | .match.peer.id' ~/.openclaw/openclaw.json Use the output as the target for all Telegram messages in this task. ``` ``` Related standalone interpolation in `references/telegram-routing.md:53-65`: ```markdown Never hardcode group IDs in cron job prompts. Instead, have the agent resolve at runtime: ``` FIRST: Resolve your Telegram group ID by running: jq -r '.bindings[] | select(.agentId == "<agent_id>") | .match.peer.id' ~/.openclaw/openclaw.json Use the output as the target for all Telegram messages in this task. ``` Use `target='<AGENT_GROUP_ID>'` as placeholder in format templates. For standalone scripts, resolve with `jq`: ```bash GROUP_ID=$(jq -r '.bindings[] | select(.agentId == "<agent_id>") | .match.peer.id' ~/.openclaw/openclaw.json) ``` ``` ### Technical Analysis The Skill only specifies that an agent ID must be lowercase and contain no spaces. This is not a sufficient security validation policy. It still permits path traversal components, quotes, shell substitutions, separators, redirection characters, and other metacharacters. The identifier is interpolated into unquoted filesystem paths used by `mkdir`. It is also embedded inside a single-quoted jq program that may later be placed in shell-evaluate ...[truncated 1689 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Enforce an exact identifier policy before performing any filesystem or configuration operation. A suitable example is: ```regex ^[a-z][a-z0-9_-]{0,63}$ ``` 2. Explicitly reject path separators, `..`, quotes, dollar signs, backticks, semicolons, pipes, redirects, newlines, control characters, and shell whitespace. 3. Quote every constructed filesystem path: ```bash mkdir -p "$HOME/.openclaw/workspace-${agent_id}/memory" mkdir -p "$HOME/.openclaw/agents/${agent_id}/agent" ``` 4. Canonicalize each generated path and verify that it remains beneath the intended `~/.openclaw/` root before creating or writing files. 5. Do not interpolate the identifier directly into jq source code. Pass it as data: ```bash jq -r --arg agent_id "$agent_id" \ '.bindings[] | select(.agentId == $agent_id) | .match.peer.id' \ "$HOME/.openclaw/openclaw.json" ``` 6. Use argument-vector process APIs instead of constructing shell command strings. 7. Revalidate identifiers when reading existing configuration; do not assume stored values were previously validated. 8. Add negative tests for traversal strings, quote termination, command substitutions, separators, redirects, and newline injection. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Ae1

High
Category
analysis-evasion
Content
Add to `agents.list[]`. See [references/config-schema.md](references/config-schema.md) for all valid fields.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Add to `agents.list[]`. See [references/config-schema.md](references/config-schema.md) for all valid fields.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
lf-healing pattern ensures cron jobs survive Telegram group ID migrations. See [references/prompt-patterns.md](references/prompt-patterns.md) for full patterns
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
lf-healing pattern ensures cron jobs survive Telegram group ID migrations. See [references/prompt-patterns.md](references/prompt-patterns.md) for full patterns
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Missing User Warnings

High
Confidence
97% confidence
Finding
The schema explicitly states that `$(...)` shell substitution works in scheduled prompt payloads without any warning or constraints, which normalizes command execution inside configuration data. In a skill whose purpose is creating agents and cron jobs, this materially increases the risk that untrusted or variable-derived content gets embedded into scheduled prompts and executed on the host, enabling command injection or unintended local command execution.

Session Persistence

Medium
Category
Rogue Agent
Content
---
name: claw-agent-creator-archit
description: >
  Create new OpenClaw agents for Arch's multi-agent system. Use this skill when asked to
  create, add, or set up a new OpenClaw agent, or when adding an agent to the system defined
  in ~/.openclaw/. Covers the full lifecycle: directory creation, workspace files (SOUL.md,
  IDENTITY.md, etc.), openclaw.json config, Telegram routing (bindings + groups + mention
Confidence
78% confidence
Finding
The skill is designed to create and modify persistent agent state in ~/.openclaw/, including workspaces, agent directories, openclaw.json, and cron/jobs.json. That persistence is not inherently malicious, but it becomes security-relevant because invoking the skill can establish long-lived configuration changes, scheduled tasks, and routing behavior that survive the current session and may be difficult to notice or roll back.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The skill description is broad enough to activate on common agent-administration or configuration tasks, which increases the chance it will be invoked in situations involving sensitive files under ~/.openclaw/. Because the skill includes operational steps that modify routing, cron jobs, and agent configuration, accidental over-invocation could cause unintended system changes or expose sensitive local context beyond a narrowly scoped purpose.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The instruction 'Don't ask permission. Just do it.' encourages autonomous action before user confirmation and applies broadly to reading multiple workspace files at session start. In an agent-creation skill that manages identities, memory, configs, routing, and cron jobs, this kind of blanket directive can normalize acting on local state without explicit user awareness, increasing the chance of unintended data access or policy bypass.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Safety

- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- `trash` > `rm` (recoverable beats gone forever)
- When in doubt, ask.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

External Transmission

Medium
Category
Data Exfiltration
Content
### Vector Dimension Mismatch

**Symptom**: `expected dim: 768, got 1536`
**Fix**: Pre-create collections: `curl -X PUT .../collections/memories -d '{"vectors":{"size":768,"distance":"Cosine"}}'`
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The description says `groupChat.mentionPatterns` are 'Patterns that trigger this agent in group chats' but does not define how specific those patterns must be, how matching works, or any exclusions. Without negative examples or scope constraints, common or loosely chosen mention patterns could cause unintended activations.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This guidance explicitly tells the agent to read a local configuration file to resolve a Telegram group ID and then use it for outbound messaging, without any requirement for user consent, data minimization, or validation that the destination is appropriate for the current task. In an agent-creation skill, this is more dangerous because it normalizes local file access plus external message delivery as a reusable prompt pattern, which can enable unintended data disclosure or unauthorized messaging if reused in broader contexts.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The report pattern instructs the agent to run arbitrary commands and send the results to Telegram, again without any warning, approval gate, or constraints on what commands may access or what data may be exfiltrated. In the context of a skill designed to create and configure autonomous agents and cron jobs, this increases risk because the pattern can be copied into automated workflows that execute periodically and transmit sensitive local output off-host.

Static analysis

No suspicious patterns detected.