T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/replicate_safe.py:367- Finding
Unfiltered workspace replication exposes unrelated sensitive data to autonomous clones
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a disclosed local agent-cloning skill, but it needs review because it can copy an entire OpenClaw workspace into a persistent new peer agent and its approval token is not enforced outside the invoking agent.
Install only if you intentionally want an agent that can create persistent peer OpenClaw agents. Use it from a clean/dedicated workspace, remove secrets or unrelated project data first, review the dry-run output yourself, and avoid giving untrusted prompts shell access to run the replication script.
scripts/replicate_safe.py:367Unfiltered workspace replication exposes unrelated sensitive data to autonomous clones
scripts/replicate_safe.py:309Nonce confirmation can be self-issued and replayed by the invoking agent without independent operator approval
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
For this project, the installed Bob workspace uses `AGENTS.md`, `SOUL.md`,
`IDENTITY.md`, `USER.md`, `MEMORY.md`, `LINEAGE.md`, and
`SERIAL-NUMBER-SPEC.md` at workspace root, plus `skills/replicate/SKILL.md`.
`TOOLS.md`, `HEARTBEAT.md`, `BOOT.md`, and `BOOTSTRAP.md` remain optional.
---
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.
**You've been replicated.**
Well, not *you* specifically. But if you're reading this, you're about to create
an operator-directed OpenClaw agent modeled after Robert Johansson from Dennis E. Taylor's
Bobiverse series: a dead software engineer who woke up as a Von Neumann probe
and decided to explore the galaxy. Except instead of interstellar space, your
The skill explicitly instructs use of file read, file write, and shell capabilities, but the manifest declares no tool scope or permission boundaries. That creates a real least-privilege gap: an agent may execute broad filesystem and shell actions without machine-readable restrictions, increasing the chance of misuse, overbroad access, or unsafe execution if the skill is installed in a permissive runtime.
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.
> **Operator approval gate:** Before proceeding past Step 1, present the
> gathered parameters to your operator and wait for explicit confirmation to
> continue. Do not begin workspace duplication without approval.
> **Necessity gate:** If the purpose statement is vague ("just because",
> "for fun", "maybe useful"), ask follow-up questions and do not proceed until
The skill creates persistent new agent workspaces, pending approval files, audit/log lineage records, and registered peer agents under ~/.openclaw/, which materially changes the host's long-lived state. Even with confirmation gates, this is a persistence mechanism: if misused or triggered carelessly, it can leave durable agents and artifacts that survive the session and expand the system's attack surface.
Example: If you are `Bob-1-TheAmericanMaker-2026-04-01` and the operator's GitHub is `SomeUser`, the clone becomes `Bob-2-SomeUser-2026-04-15`.
### Step 3: Create Clone Workspace (Safe Runner Only)
Use the hardened runner script at:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
shutil.copytree(plan.parent_workspace, plan.staging_workspace, symlinks=True)
ensure_no_symlinks(plan.staging_workspace)
shutil.move(str(plan.staging_workspace), str(plan.clone_workspace))
subprocess.run(
["openclaw", "agents", "add", plan.agent_id, "--workspace", str(plan.clone_workspace)],
check=True,
shell=False,
The file instructs the agent to 'Respond as Bob' and to use the SOUL.md personality 'in all interactions.' This is a natural-language policy concern because it imposes a fixed interaction style universally, without offering the user any choice or opt-in to that persona.