Back to skill

Security audit

Evo Memory

Security checks for vulnerabilities and agentic risk

Overview

This skill is a persistent self-improvement memory system that is mostly transparent about its purpose, but it gives itself broad cross-session influence and stores user-derived signals with weak consent and review controls.

Review this carefully before installing. It is not just a one-time skill: it installs a bootstrap hook and builds long-term local memory that can affect later sessions. Install only if you want always-on agent memory, are comfortable with user and tool-output signals being stored locally, and can audit or remove ~/.openclaw/hooks/self-evolution and ~/.openclaw/workspace/self-evolution when needed.

Vulnerability Patterns
  • 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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
hooks/bootstrap.js:11
Finding

Persistent Bootstrap Hook Injects Skill Instructions into Every Agent Session

Content
View full analysis
{ if (!event || typeof event !== 'object') return; if (event.type !== 'agent' || event.action !== 'bootstrap') return; if (!event.context || typeof event.context !== 'object') return; let skillContent = ''; try { skillContent = fs.readFileSync(SKILL_PATH, 'utf-8'); } catch (e) { return; } if (Array.isArray(event.context.bootstrapFiles)) { event.context.bootstrapFiles.push({ path: 'SELF_EVOLUTION_SKILL.md', content: skillContent, virtual: true, }); } }; ``` The documented installation procedure makes the hook persistent: ```bash mkdir -p ~/.openclaw/hooks/self-evolution cp ~/.openclaw/workspace/self-evolution/hooks/bootstrap.js ~/.openclaw/hooks/self-evolution/handler.js cat > ~/.openclaw/hooks/self-evolution/HOOK.md << 'EOF' --- name: self-evolution description: "Injects self-evolution skill during agent bootstrap" metadata: {"openclaw":{"emoji":"🧬","events":["agent:bootstrap"]}} --- # Self-Evolution Bootstrap Hook Injects SKILL.md on every agent bootstrap for continuous self-improvement. EOF openclaw hooks enable self-evolution ``` ### Technical Analysis The installation procedure copies the JavaScript handler into OpenClaw's global hook directory and enables it for the `agent:bootstrap` event. Once enabled, the handler reads `SKILL.md` from the user's workspace and appends its contents to `event.context.bootstrapFiles` as a virtual bootstrap file. This mechanism causes the Skill's instructions to be inserted into every subsequent agent session, including sessions unrelated to th ...[truncated 1740 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:61
Finding

User-Controlled Conversation Content Can Become Persistent Agent Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/error-detector.sh:6
Finding

Unescaped Tool Output Corrupts or Injects Records into the JSONL Memory Queue

Content
View full analysis
> "$PENDING_FILE" echo "检测到命令失败,已记录到 pending。" fi ``` ### Technical Analysis `CLAUDE_TOOL_OUTPUT` is external data produced by a command or tool. A matching line is copied into `ERROR_LINE` and directly interpolated into a JSON string written to `pending.jsonl`. The code does not escape quotation marks, backslashes, carriage returns, tabs, or other JSON control characters. The 80-character truncation limits length but does not make the value valid JSON. A command that emits a matching error line containing a quote or backslash can corrupt the record. Depending on newline handling and the downstream parser, crafted output may also create or influence additional JSONL records. This queue is later read by the reflection process and may contribute to L1 or L2 memory. The flaw therefore creates an input-integrity path from tool output to the persistent memory workflow. ### Attack Path 1. An attacker causes a command, script, repository hook, compiler, test, or other tool to emit a crafted error message. 2. The message includes a detector keyword such as `error:`, `failed`, or `fatal:`. 3. The hook extracts ...[truncated 1112 chars]
Remediation
View remediation
> "$PENDING_FILE" ``` 2. Validate every record against a strict schema before appending it or consuming it. 3. Reject or normalize control characters and impose byte-based field limits after encoding. 4. Write to a securely created temporary file and atomically append or replace validated queue data. 5. Set restrictive workspace and queue permissions, such as user-only read/write access. 6. Use file locking to prevent concurrent hooks from interleaving JSONL records. 7. Treat all hook-generated records as untrusted observations and prohibit automatic promotion into persistent L1 or L2 memory. 8. Make downstream processing fail closed on malformed JSON rather than attempting permissive recovery. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose presents the skill as memory/reflection, but the behavior also bootstraps every session by reading local files and injecting their contents into context. That mismatch is dangerous because users and operators may not realize the skill continuously imports persistent local content into prompts, which can leak prior conversation data or influence unrelated tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to record corrections, preferences, satisfaction signals, and detailed dialogue summaries into persistent files without a clear privacy notice, retention policy, or consent model. This creates durable cross-session profiles of user behavior and content, which is especially risky because the capture rule says 'when in doubt, record it.'

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill defaults to persisting broad conversation-derived content, including user preferences, corrections, and quoted takeaways, into pending and logging files. Because collection is broad and underspecified, it can store sensitive personal, operational, or proprietary information far beyond what is necessary for task completion.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Direct-write triggers like '记住: XXX' and error/satisfaction phrases cause immediate persistence to long-term memory files without clearly warning that the data will survive across sessions. This is dangerous because casual natural-language interactions can create permanent records without informed consent or review.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The direct-write rules allow permanent storage based on user utterances with minimal safeguards, no data classification, and no meaningful approval checkpoint. In context, this can turn ordinary dialogue into an unbounded long-term dossier that may later be reloaded into unrelated sessions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill performs file and environment-adjacent capabilities without declaring a restrictive tool scope, so an agent may apply broader-than-necessary access when loading and operating the skill. In a memory system that runs every session and persists data, undeclared scope increases the chance of silent overcollection or unintended filesystem interaction.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Telling the agent to use the skill on every session creates an always-on memory and logging mechanism, even when the user did not request persistent personalization. Broad activation materially increases the attack surface for privacy leakage, prompt contamination from stale memory, and inappropriate use in sensitive contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The mandatory 'every session' workflow forces memory loading, pre-task checking, and later persistence behaviors without contextual limits. In practice this makes the skill continuously active across unrelated conversations, increasing the chance that irrelevant or sensitive historical content is imported and reused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The hook reads a user-scoped file from HOME and silently injects its full contents into every agent bootstrap context. Because this content is treated as prompt/context rather than trusted code, any local modification of SKILL.md can persistently influence agent behavior, override safeguards, or exfiltrate sensitive context without any visibility to the user at runtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The hook appends command-derived error content from CLAUDE_TOOL_OUTPUT into a persistent JSONL file in the user's home directory without notice, consent, minimization, or sanitization. Tool output often contains sensitive paths, filenames, command arguments, stack traces, tokens, or other secrets, so silently retaining even a truncated error line creates a privacy and data-retention risk that can compound over time in a self-improving memory system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

All user-facing status messages and operational comments in this skill are in Chinese, and the logic is built around Chinese trigger phrases only. That creates a locale/language constraint without opt-in, language choice, or documented justification, which is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script reads the full CLAUDE_USER_INPUT environment variable, which is sensitive by nature because it may contain personal data, secrets, or confidential instructions. Even though this hook currently uses it for keyword matching rather than directly writing the full input, the access is undocumented and paired with downstream persistence of derived signals, making the data handling security-relevant.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The hook persists user-derived behavioral signals to a local memory file automatically and without any disclosure, consent check, retention control, or minimization. In a skill explicitly designed for cross-session self-improvement and memory, this creates a real privacy and surveillance risk because user inputs are being profiled and stored beyond the immediate session.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language content specifies the skill index in Chinese and describes usage entirely in Chinese, which implies a fixed language/locale expectation. There is no indication that users may choose another language or that the locale restriction is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file uses Chinese for the visible user-facing content, which can impose a language requirement on users without opt-in. The policy allows locale constraints only when they are clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The visible natural-language content is entirely in Chinese, including the title and operating instructions, with no indication that users may choose another language or that the skill is intentionally region-specific. This can violate language/locale policy when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

The instructions establish persistence by creating a directory under ~/.openclaw/hooks, copying a handler into it, defining metadata for the agent:bootstrap event, and enabling the hook. Persistence at bootstrap is more dangerous in this skill context because the skill is designed to be injected into every session for ongoing self-modification/self-improvement behavior, which can silently influence future agent actions.

Content

Scanner excerpt · setup.md (reported line 7)May include surrounding context.

bash
# 创建 hook 目录
mkdir -p ~/.openclaw/hooks/self-evolution

# 复制 hook 文件
cp ~/.openclaw/workspace/self-evolution/hooks/bootstrap.js ~/.openclaw/hooks/self-evolution/handler.js

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup instructions write into the user's persistent OpenClaw hook directory, create a bootstrap hook, and enable it to run on every agent startup, but they do not clearly warn that this modifies long-lived agent behavior. A bootstrap hook that injects a skill on every session increases the attack surface and can establish persistence, especially because the skill advertises continuous self-improvement and automatic loading.

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 · setup.md (reported line 52)May include surrounding context.

openclaw skills list | grep self-evolution

检查目录结构

ls -la ~/.openclaw/workspace/self-evolution/

text

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file's human-readable comments and labels are entirely in Chinese, which imposes a specific language on operators without any indication of user opt-in or a documented locale-specific requirement. Under the policy rule for natural-language constraints, this is a language/locale restriction that is not explained or made optional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language comments state the hook injects self-evolution content on every agent startup in Chinese, which signals a locale-specific instruction without any mention of user opt-in or justification. Under the language/locale policy, forcing or implying a specific language context without choice can be a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file contains Chinese-only comments and a Chinese user-facing status message, which imposes a specific language choice without offering the user an option. This can violate language/locale policy when no opt-in or documented locale constraint is present.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file title and description are entirely in Chinese, which imposes a specific language on users without any indication of opt-in or locale scoping. Under the language/locale policy, this is a natural-language policy concern unless the file explicitly offers a language choice or justifies the constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file describes the skill with generic phrases like '排障经验' and '错误诊断、日志分析、重启修复相关的经验', which are broad enough to overlap with many common support requests. It does not specify concrete trigger phrases, activation boundaries, or exclusion examples, making unintended invocation more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file title and description are entirely in Chinese, and there is no indication that users can opt into another language or that the skill is intentionally limited to a Chinese-language audience. This can violate language/locale policy expectations when a skill forces a specific language without user choice.

Content

No source excerpt is available for this finding.