Back to skill

Security audit

Agent Extract

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent with its stated purpose, but it creates an indefinitely scheduled agent and broadly copies identity and memory data without enough scoping, consent, or cleanup safeguards.

Review this skill carefully before installing. Only use it if you are comfortable creating a second persistent agent, copying selected identity and memory files into its workspace, and managing a recurring cron job. Prefer approving each copied file explicitly, avoid copying unrelated memory, set an expiration or removal plan for the heartbeat, and replace the rm -rf rollback command with a validated backup-or-quarantine workflow.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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 (3)

T06 · System Persistence

Error
Location
SKILL.md:151
Finding

Recurring cron job enables persistent autonomous agent execution

Content
View full analysis
Heartbeat" \ --schedule "every 30m" \ --agent-id "" \ --session-key "agent::main" \ --session-target "isolated" \ --message "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK." \ --delivery "announce" ``` ### Technical Analysis The documented workflow registers a recurring cron job that invokes an isolated agent every 30 minutes. The scheduled job survives completion of the original skill invocation and instructs the agent to read and follow persistent instructions from `HEARTBEAT.md`. Because the effective behavior is stored in a mutable workspace file, later changes to `HEARTBEAT.md` can alter what the recurring agent does without changing the reviewed cron command. The documentation does not prescribe an expiration time, execution limit, restricted tool policy, or mandatory confirmation immediately before creating the schedule. This is persistent cross-session execution and therefore matches `T06: System Persistence`, even though persistence is presented as an intended feature. ### Attack Path 1. A user or agent follows the extraction workflow and creates a new agent workspace. 2. Instructions are placed in the workspace's `HEARTBEAT.md`. 3. The documented `openclaw cron add` command registers a job that runs every 30 minutes. 4. The initiating session ends, but the cron job remains active. 5. Each scheduled invocation starts an isolated agent turn and directs it to follow the workspace instructions. 6. If `HEARTBEAT.md` is subsequently modified, future turns may execute the changed instructions with whatever tools and permissions are available to the extracted agent. ### Im ...[truncated 484 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:102
Finding

Extracted agent receives broad copies of identity and memory data

Content
View full analysis
/{memory,skills} # 复制必要的身份文件(复制,不是移动!) cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace-/ cp ~/.openclaw/workspace/IDENTITY.md ~/.openclaw/workspace-/ cp ~/.openclaw/workspace/AGENTS.md ~/.openclaw/workspace-/ # 复制技能文件 cp -r ~/.openclaw/workspace/skills/ ~/.openclaw/workspace-/skills/ # 复制记忆文件(如果需要) cp -r ~/.openclaw/workspace/memory/*.md ~/.openclaw/workspace-/memory/ ``` ### Technical Analysis The workflow copies identity, behavioral configuration, and all matching Markdown memory files from the main workspace into the extracted agent's workspace. It does not define a file-level allowlist, sensitivity review, redaction process, or separate authorization step for memory transfer. This violates least-privilege design because an agent extracted to perform one function can receive unrelated historical context and identity information. Copying rather than moving the files protects availability of the original data but does not protect confidentiality; it increases the number of principals and storage locations with access to that data. The issue is classified as `T05: Unauthorized Access and Privilege Escalation` because the extracted agent is granted broader data access than is demonstrably required for a narrowly scoped skill. ### Attack Path 1. A skill or function is selected for extraction into a separate agent. 2. The operator follows the documented commands. 3. `SOUL.md`, `IDENTITY.md`, `AGENTS.md`, and every matching `memory/*.md` file are copied into the new workspace. 4. The extracted skill and persistent agent can read the duplicated files from its own workspace. 5. If the extracted skill is untrusted, ...[truncated 697 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:227
Finding

Rollback procedure performs unvalidated recursive workspace deletion

Content
View full analysis
` 2. 删除 cron job:`openclaw cron remove ` 3. 从配置中移除 agent(使用 `config.patch`) 4. 恢复 main 的 HEARTBEAT.md(如果修改了) ``` ### Technical Analysis The rollback procedure recommends `rm -rf` against a path constructed by textual substitution of ``. No identifier syntax validation, canonical-path check, boundary check, existence check, or interactive confirmation is required before recursive forced deletion. If an invalid value containing path separators or traversal components is substituted, the resulting path may resolve somewhere other than the intended direct child of `~/.openclaw`. Quoting alone would not address traversal because the vulnerability concerns path resolution rather than shell word splitting. This is an insecure coding and operational practice matching `T09: Insecure Skill Coding Practices`. The project does not automatically execute this rollback command, so exploitation requires an operator or agent to follow the documented instruction with an unsafe substituted value. ### Attack Path 1. Extraction is performed with a malformed, incorrectly recorded, or attacker-influenced agent identifier. 2. The extraction fails or the operator decides to roll it back. 3. The placeholder in the documented deletion command is replaced without validation. 4. Path traversal characters or an unexpected path component cause the target to resolve outside the intended extracted workspace. 5. `rm -rf` recursively deletes the resolved target without prompting. ### Impact Assessment A successful misuse can permanently delete files writable by the invoking user. The scope depends on the substituted value and the operating-system permissions of the shell running the command. At ...[truncated 284 chars]
Remediation
View remediation
` naming convention. - Refuse to delete the main workspace or the OpenClaw root under every circumstance. - Show the resolved path and require explicit confirmation before deletion. - Prefer moving the workspace into a quarantine or trash directory before permanent removal. - Back up user-created state and log the rollback operation. - Implement rollback in a validated script or API rather than asking an agent to interpolate and execute a raw `rm -rf` command. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

This finding is the same dangerous command but matched more specifically on the workspace deletion path. The context makes it somewhat bounded to the OpenClaw workspace, yet it remains hazardous because manual substitution or malformed variables can still cause severe local data loss.

Content

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

md
### Q: 如果剥离失败怎么办?

A: 按照以下步骤回滚:
1. 删除新创建的 workspace:`rm -rf ~/.openclaw/workspace-<new-agent-id>`
2. 删除 cron job:`openclaw cron remove <job-id>`
3. 从配置中移除 agent(使用 `config.patch`)
4. 恢复 main 的 HEARTBEAT.md(如果修改了)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

This finding is the same dangerous command but matched more specifically on the workspace deletion path. The context makes it somewhat bounded to the OpenClaw workspace, yet it remains hazardous because manual substitution or malformed variables can still cause severe local data loss.

Content

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

md
### Q: 如果剥离失败怎么办?

A: 按照以下步骤回滚:
1. 删除新创建的 workspace:`rm -rf ~/.openclaw/workspace-<new-agent-id>`
2. 删除 cron job:`openclaw cron remove <job-id>`
3. 从配置中移除 agent(使用 `config.patch`)
4. 恢复 main 的 HEARTBEAT.md(如果修改了)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill directs copying identity, memory, and persona files into a new agent workspace without any warning about sensitive data propagation, minimization, or consent. Duplicating memory and identity state increases exposure surface and can leak private user context into another persistent agent that may run independently.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document promises not to change the main agent unless requested, but the extraction steps include modifying main HEARTBEAT.md as a standard action. This is a real safety issue because operators may trust the stated constraint and unintentionally alter live agent behavior or retained instructions in the main workspace.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill claims main cron jobs and behavior should be preserved unless explicitly migrated, yet later instructs clearing or rewriting the main HEARTBEAT task set during extraction. That contradiction can cause unintended loss of scheduled behavior or silent operational drift in the primary agent, especially if the operator follows the workflow verbatim.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

md
cat ~/.openclaw/openclaw.json | jq '.agents'

# 2. 检查目标技能/功能
ls -la ~/.openclaw/workspace/skills/<skill-name>/

# 3. 检查现有 cron jobs
openclaw cron list

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

md
cat ~/.openclaw/openclaw.json | jq '.agents'

# 2. 检查目标技能/功能
ls -la ~/.openclaw/workspace/skills/<skill-name>/

# 3. 检查现有 cron jobs
openclaw cron list

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

This duplicate finding points to the same behavior: creating a persistent isolated agent by copying persona and memory files. In the skill context, the danger is not mere session creation but durable duplication of sensitive context into a second agent that can continue operating separately.

Content

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

bash
# 创建 workspace 目录
mkdir -p ~/.openclaw/workspace-<new-agent-id>/{memory,skills}

# 复制必要的身份文件(复制,不是移动!)
cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace-<new-agent-id>/

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

This duplicate finding points to the same behavior: creating a persistent isolated agent by copying persona and memory files. In the skill context, the danger is not mere session creation but durable duplication of sensitive context into a second agent that can continue operating separately.

Content

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

bash
# 创建 workspace 目录
mkdir -p ~/.openclaw/workspace-<new-agent-id>/{memory,skills}

# 复制必要的身份文件(复制,不是移动!)
cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace-<new-agent-id>/

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The rollback section includes a destructive recursive delete command with no explicit warning about irreversibility, path verification, or backup requirements. In operational documentation, this creates a meaningful risk of accidental data loss, especially when placeholders are manually substituted or commands are copied quickly.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The concrete example repeats the persistence pattern by creating another independent workspace and copying identity and skill data into it. Examples are often followed directly, so this reinforces potentially unsafe duplication of persistent agent state without privacy, retention, or access-control safeguards.

Content

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

md
# (使用 config.patch 或手动编辑)

# 3. 创建 workspace
mkdir -p ~/.openclaw/workspace-aiway/{memory,skills}
cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace-aiway/
cp ~/.openclaw/workspace/IDENTITY.md ~/.openclaw/workspace-aiway/
cp -r ~/.openclaw/workspace/skills/aiway ~/.openclaw/workspace-aiway/skills/

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script contains user-facing natural-language strings entirely in Chinese, including the usage message and all status output. That can violate a language/locale policy when the skill forces a specific language without user opt-in or documented locale scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest description is written only in Chinese, which creates a language-specific constraint in user-facing skill metadata without indicating any language choice or opt-in. Under the policy, natural-language content that implicitly forces a locale or language can be a violation unless the limitation is documented and justified.

Content

No source excerpt is available for this finding.