Back to skill

Security audit

MemOS Dreaming

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherently designed for memory consolidation, but it can automatically change persistent agent memory and cleanup scope is not fully disclosed.

Install only if you want this skill to manage OpenClaw memory files. Keep cron/apply modes disabled until you have reviewed DREAMS.md/AUDIT.md output, back up MEMORY.md, and understand that local notes or MemOS records may be copied into persistent agent memory.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
scripts/memos_dreaming.py:304
Finding

Untrusted content can be promoted into persistent agent memory

Content
View full analysis
list[dict]: """Scan recent daily memory logs for high-value entries.""" candidates = [] today = datetime.now() cutoff = today - timedelta(days=7) for log_file in sorted(MEMORY_DIR.glob("2026-*.md")): try: log_date = datetime.strptime(log_file.stem[:10], "%Y-%m-%d") if log_date < cutoff: continue except ValueError: continue content = log_file.read_text() ``` ```python def format_memory_promotion(c: dict) -> str: """Format entry for MEMORY.md.""" ts = ts_to_date(c.get("updated_at", get_now_ts())) if c["type"] == "skill": return ( f"\n- **{c['title']}** (skill, {ts})\n" f" {c.get('summary', '')[:200]}" ) elif c["type"] == "task": return ( f"\n- **{c['title']}** (task, {ts})\n" f" {c.get('summary', '')[:200]}" ) else: return f"\n- {c.get('summary', c.get('title', ''))} (daily log, {ts})" ``` ```python if apply: # Append to MEMORY.md ensure_dir(MEMORY_FILE) existing = MEMORY_FILE.read_text() if MEMORY_FILE.exists() else "" # Find last section if "## Promoted" in existing: insert_pos = existing.rfind("## Promoted") elif "## Lessons Learned" in existing: insert_pos = existing.rfind("## Lessons Learned") else: insert_pos = len(existing) new_entries = [] for c in to_promote: new_entries.append(format_memory_promotion(c)) append_promoted(c["entry_hash"], c.get("title", ""), c["type"]) promoted_block = ( f"\n\n## Promoted ...[truncated 2774 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly describes unattended writes to MEMORY.md and automatic cleanup in audit apply mode, but the documentation shown here does not provide a prominent safety warning, confirmation step, backup/rollback guidance, or clear disclosure that cron will make ongoing data modifications. In a memory-management skill, silent or poorly disclosed automatic edits can cause integrity loss, unwanted deletions, or hard-to-audit changes over time, especially once scheduled.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

When run with --apply, the script automatically appends content derived from MemOS and daily logs into MEMORY.md without any interactive confirmation, preview gate, or transactional safety check at the point of modification. Because the promoted content is sourced from local logs and database fields that may contain untrusted or malformed text, this can cause unintended persistent changes to a canonical memory file and may poison downstream agent context or overwrite document structure in ways the user did not explicitly approve.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented purpose of auto-clean is to remove high-confidence noise entries, but the implementation also deletes orphan entries automatically. This mismatch can cause unintended data loss because users invoking --apply may reasonably expect only noise cleanup, not structural-content deletion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

When --apply is provided, the script writes modified content back to MEMORY.md without any confirmation prompt, dry-run gate, or interactive acknowledgement. Because the cleanup heuristics are broad and include deletions, a user can unintentionally destroy retained memory entries with a single command.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The CLI help says --apply will auto-clean noise entries, but the code path also removes orphan entries. Misleading operator-facing text is dangerous in a file-modifying utility because it undermines informed consent and can lead to accidental deletion of legitimate MEMORY.md content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language guidance, labels, and operational instructions are written exclusively in Chinese, and the document does not offer an opt-in language choice or justify a Chinese-only scope. Under SQP-3, forcing a single language without user choice can be a policy issue unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The formatted output includes Chinese-only labels such as '质量评分', '话题', and '标签', which imposes a specific language on users. The file does not provide any opt-in, locale selection, or justification for restricting output to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The task formatter emits Chinese-only labels such as '合并引用' and '话题', which creates an undocumented language constraint for users. No language selection mechanism or explanation is present in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language comment states an assumption tied to Chinese writing ('Chinese chars are information-dense') and uses it to justify a fixed title-length threshold. This reflects a locale/language-specific policy choice without offering user choice or documenting why the tool is intentionally region-specific.

Content

No source excerpt is available for this finding.