Back to skill

Security audit

create-agents-wizard

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent agent-workspace scaffolding skill that writes user-approved OpenClaw files, with a command-quoting hardening issue users should watch.

Review every generated AGENTS/SOUL/IDENTITY/BOOTSTRAP/USER/STYLE file before confirming writes. Use normal, trusted workspace paths, avoid passing untrusted path text, and ensure any OpenClaw CLI command is executed with structured arguments or proper shell quoting, especially when paths contain spaces or symbols. Use --force only when you intend to overwrite existing workspace files.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:46
Finding

Command Injection Through an Unquoted User-Controlled Workspace Path

Content
View full analysis
--workspace ` ``` ### Technical Analysis The workflow collects the workspace path from the user and later instructs the agent to interpolate that value into a shell command. The command template does not quote `` or require execution through a structured argument-array API. Although agent IDs are restricted to lowercase letters, digits, and hyphens, no equivalent validation is specified for workspace paths. If the rendered command is passed to a shell, metacharacters in a malicious workspace value can terminate or alter the intended command and introduce additional commands. For example, a workspace value containing a command separator could cause the shell to interpret the remainder as a separate command. The vulnerability depends on the agent rendering this template with the supplied value and invoking it through a shell rather than a non-shell process API. ### Attack Path 1. An attacker or untrusted user requests creation of an agent. 2. The attacker supplies a workspace path containing shell metacharacters, such as: ```text /tmp/work; ``` 3. The agent substitutes that value into the documented command: ```sh openclaw agents add example --workspace /tmp/work; ``` 4. The agent executes the rendered string through a shell. 5. The shell runs the intended `openclaw` command and then executes the injected command with the operating-system privileges of the agent process. ### Impact Assessment Successful exploitation can provide arbitrary command execution under the account running the agent. The attacker could read or modify files accessible to that account, alter agent workspaces, expose lo ...[truncated 302 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The code does relate to agent workspace setup and the six named files, so it is in the same general domain. However, the declared description promises a guided, likely interactive workflow for creating multiple agents in batch, collecting preferences per agent, drafting and confirming files, then writing and summarizing results. The actual script is much narrower: it operates on one agent/workspace at a time, creates placeholder files if missing, or copies existing files from a provided directory. It does not implement batch creation, preference collection, confirmation steps, or substantive customization logic. This is a material scope and behavior mismatch rather than a minor implementation detail.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/scaffold.sh (reported line 19)May include surrounding context.

sh
--agent <id>        Agent id (for display/log only)
  --workspace <path>  Target workspace path
  --from <dir>        Source dir containing any of the 6 files to copy
  --force             Overwrite existing files when copying from --from
  -h, --help          Show this help
EOF
}

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 3)May include surrounding context.

md
---
name: create-agents-wizard
description: Guided creation of multiple OpenClaw agents and their workspace templates. Use when users ask to create agents in batch, configure new agents, or customize AGENTS/SOUL/IDENTITY/BOOTSTRAP/USER/STYLE files. The workflow confirms scope, collects preferences agent-by-agent, drafts and confirms files, writes to disk, and summarizes results.
---

# Create Agents Wizard

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

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

md
Rules:
- Do not dump a long questionnaire; ask in small rounds (2–4 key questions each).
- Preserve user intent; do not change direction without consent.
- Respect selected mode (Standard 6 files or Fast 2 files).
- If user requests partial scaffolding, allow writing only the confirmed subset and continue/stop as requested.

Static analysis

No suspicious patterns detected.