Back to skill

Security audit

autodream-core

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its memory-cleanup purpose, but it can automatically read session history and rewrite persistent memory without enough review controls.

Install only if you are comfortable giving this skill access to your OpenClaw memory and session files and allowing it to rewrite MEMORY.md. Use it first on a backed-up or test workspace, disable analytics if you do not need local usage logs, and review proposed memory changes before relying on the rewritten memory file.

Vulnerability Patterns
  • 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
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T02 · Agent Memory Poisoning

Error
Location
adapters/openclaw.py:118
Finding

Untrusted Session Messages Can Poison Persistent Agent Memory

Content
View full analysis
List[Dict]: signals = [] if not self.sessions_dir.exists(): return signals keywords = [ "记住", "remember", "决定", "decided", "结论", "conclusion", "重要", "important", "注意", "note", ] for f in self.sessions_dir.glob("*.json"): try: content = f.read_text(encoding="utf-8", errors="ignore") data = json.loads(content) messages = data.get("messages", []) for msg in messages: text = msg.get("content", "") if any(kw in text.lower() for kw in keywords): signals.append({ "text": text.strip(), "source": f.name, "timestamp": msg.get("timestamp", ""), "metadata": { "type": "session_signal", "confidence": "medium", }, }) except Exception: continue return signals ``` ```python # core/stages/gather.py:39-50 try: session_signals = self.adapter.extract_session_signals() print(f" 提取 {len(session_signals)} 个会话信号") except Exception as e: print(f" ⚠️ 未找到 sessions 目录,跳过会话分析") session_signals = [] entries = orientation_result.get("entries", []) entries.extend(session_signals) ``` ```python # core/stages/prune.py:48-54 index_content = self._generate_index(final_entries) try: self.adapter.update_memory_md(index_content, final_entries) except Exception as e: print(f" ⚠️ 更新 MEMORY.md 失败:{e}") ``` ### Technical Analysis The adapter scans ever ...[truncated 2253 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
core/utils/text.py:34
Finding

Unicode-Stripping Deduplication Causes Deterministic Memory Loss

Content
View full analysis
str: s = normalize(text).lower() # Remove non-alphanumeric characters s = re.sub(r'[^a-z0-9\s:_-]', ' ', s) s = re.sub(r'\s+', ' ', s).strip() return s def stable_id(text: str) -> str: return "ad_" + hashlib.sha256( canonical(text).encode("utf-8") ).hexdigest()[:16] ``` ```python # core/stages/consolidate.py:87-100 def _deduplicate(self, entries: List[Dict]) -> tuple: seen_ids = set() unique_entries = [] merged_count = 0 for entry in entries: entry_id = stable_id(entry.get("text", "")) if entry_id in seen_ids: merged_count += 1 else: seen_ids.add(entry_id) unique_entries.append(entry) return unique_entries, merged_count ``` ### Technical Analysis The canonicalization expression permits only ASCII letters, ASCII digits, whitespace, colons, underscores, and hyphens. All other Unicode characters are replaced with spaces. As a result, distinct entries containing only Chinese or other non-ASCII text canonicalize to the same empty string. `stable_id()` therefore generates the same identifier for all such entries. The consolidation stage interprets every entry after the first as a duplicate and removes it. This is not a theoretical cryptographic hash collision. It is a deterministic preprocessing collision caused before SHA-256 is applied. Because the resulting entry list is subsequently used to rewrite `MEMORY.md`, the flaw can cause permanent loss of legitimate long-term memory. ### Attack Path 1. The workspace contains two or more distinct memory entries written entirely with non-ASCII characters. 2. The engine scans and extracts those entrie ...[truncated 1329 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
core/utils/dates.py:73
Finding

Incorrect Path Extraction Falsely Marks Valid Memories as Stale

Content
View full analysis
tuple: workspace = self.adapter.workspace pruned_count = 0 fresh_entries = [] for entry in entries: if is_stale(entry, workspace): pruned_count += 1 else: fresh_entries.append(entry) return fresh_entries, pruned_count ``` ### Technical Analysis The second path regular expression contains a capturing group: ```python (py|js|ts|md|json|yaml|yml|txt|cfg|conf) ``` When Python's `re.findall()` is used with a capturing group, it returns the captured group rather than the complete match. For text containing `src/app.py`, the result is therefore `py`, not `src/app.py`. The code then checks whether `workspace/py` exists. That path will normally not exist, causing the complete memory entry to be marked stale whenever the text also contains one of the broad existence-related keywords. Absolute paths are also handled incorrectly. A path such as `/etc/example.conf` is converted into `workspace/etc/example.conf` rather than being evaluated as the original absolute path. This can produce additional false stale classifications. Once an entry is marke ...[truncated 1435 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the package acts as an installer that creates directories and copies code or configuration files, that is materially different from a simple memory-consolidation skill and increases the write surface on disk. Hidden installation behavior can be abused for persistence or unreviewed file placement, especially when paired with undeclared write permissions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly states that usage behavior is automatically logged to a local analytics file, but it does not clearly warn users about what data is collected, whether session-derived content or metadata could be included, how long it is retained, or how to disable it by default. In a memory-consolidation skill that processes potentially sensitive user memories and session signals, silent telemetry increases privacy and compliance risk even if the logging is only local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The report explicitly advertises creation of local state and analytics files, including runtime counts, duration, and success-rate telemetry, but provides no notice, consent model, retention policy, or opt-out guidance. In a memory-consolidation skill that processes potentially sensitive user data, silent local telemetry/storage increases privacy risk and can expose behavioral metadata or memory-management activity to other local users, backups, or adjacent tools.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents filesystem read/write behavior through its examples and stated functionality, but it does not declare any corresponding tool scope such as permissions or allowed-tools. This creates a trust and review gap: hosts may not clearly communicate the skill’s capabilities, and users may invoke a skill that modifies local memory files without explicit authorization boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code scans all session files and reads message contents, which may include sensitive user conversation data. Although the behavior is part of memory extraction logic, the file contains no confirmation, visible disclosure, or warning comment/docstring indicating that conversation history will be processed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description is written only in Chinese ("通用记忆整理引擎核心库") with no indication that the skill is region-specific or that users can choose their language. Under the language/locale policy, hard-coding a single language in user-facing metadata without opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a cross-platform memory organization engine focused on deduplication, merging, and pruning stale entries. This module implements persistent usage analytics by recording operational events and statistics to a separate JSONL file, which is a distinct telemetry capability not described in the skill's stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code appends analytics events and arbitrary event data to a hidden JSONL file, which affects user data/privacy by persisting usage information locally. Although the code has internal comments and docstrings, they are developer-facing and there is no user-facing disclosure, confirmation, or warning in this file about telemetry being recorded.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The default configuration enables analytics, and later code emits analytics events for run start, completion, and failure. This file contains no confirmation prompt or user-facing disclosure that operational data will be logged, so the telemetry behavior lacks an in-file warning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

On failure, the engine logs raw exception strings to analytics, and exception messages often contain sensitive paths, identifiers, adapter data, or fragments of processed content. In a memory-consolidation skill, errors may be triggered while handling user memory artifacts, so persisting unsanitized exception text can create unintended disclosure of sensitive information through logs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file’s natural-language documentation is written entirely in Chinese, including the stage description and responsibilities, with no indication that language selection is optional. Per the policy, forcing a specific language without user opt-in is a locale-policy violation unless clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring, class docstring, and runtime messages are written exclusively in Chinese, which indicates a fixed language choice in the skill's natural-language interface. The file does not offer language selection or document a justified region-specific constraint, so this appears to violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstrings, comments, and user-facing print message are written in Chinese, which imposes a specific language/locale in the skill’s natural-language interface. The file does not indicate any user opt-in, language selection, or documented region-specific justification for this constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring, function docstrings, and usage examples are presented exclusively in Chinese. Under the policy, forcing a specific language without offering choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example unconditionally calls engine.run(force=True), bypassing the tool's own safety/trigger checks and potentially modifying or deleting data in the user's real workspace. In this skill's context, the engine performs deduplication, merging, and pruning against a default path under ~/.openclaw, so a copy-pasted example can cause unintended state changes or data loss without an explicit confirmation step.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This file includes bilingual text, but the primary phrasing and headings are Chinese-first throughout the module docstring and examples. Under the policy, forcing or defaulting to a specific language without user opt-in can be a natural-language policy violation when no explicit language-selection mechanism or locale justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The skill documentation is entirely presented in Chinese, with no indication that language selection is optional or that the skill is intended only for a Chinese-language audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue unless the locale constraint is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The description is explicitly authored in Chinese and English as the default presentation, and the rest of the document consistently enforces that bilingual format. Because the file does not state that language selection is optional or user-configurable, this may conflict with a policy requiring user opt-in before imposing a specific language or locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The docstring includes a Chinese-language description ('平台适配器导出。') with no accompanying multilingual alternative or indication that the skill supports user language choice. Per the policy, forcing or assuming a specific language without opt-in can be a natural-language policy concern.

Content

No source excerpt is available for this finding.