Back to skill

Security audit

Smart Memory Keeper

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent memory manager, but it installs persistent agent-memory behavior with automatic reads and rewrites that users should review carefully before enabling.

Install only if you want OpenClaw to maintain durable local memory across sessions. Review the AGENTS.md and HEARTBEAT.md snippets before applying them, avoid storing secrets or personal data, and periodically inspect or delete the memory files if they contain stale or sensitive context.

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
references/formats.md:70
Finding
Persistent Agent Memory Poisoning Through Unvalidated Conversational Content<![CDATA[ ## Vulnerability Details **File Location**: `references/formats.md:70-80`, `references/install-snippets.md:8-19`, `references/dream-guide.md:23-25` **Vulnerability Type**: Persistent storage and automatic reloading of untrusted conversational content **Risk Level**: Medium ### Vulnerable Code Snippets `references/formats.md:70-80`: ```markdown ### When to write journal entries | Trigger | What to record | |---------|----------------| | User makes a key decision | Decision + reasoning (→ Key Decisions) | | Problem solved | Problem + solution (→ relevant topic) | | Unresolved risk found | Risk + plan (→ Watch List) | | User approves an approach | Method + context (→ Validated Approaches) | | AI's approach not rejected | Default approval signal — consider recording | | User says "remember this" | Full content (→ most relevant section) | | Important config changed | Before/after + reason (→ Key Decisions) | ``` `references/install-snippets.md:8-19`: ```markdown ### Session Startup — 3-Tier Load 1. Read `memory/tasks.md` (hot tier) - Found in-progress task → say: "Last time you were working on [task], at [status]. Next step: [next]. Continue?" - Multiple in-progress → list all, let user choose - None → skip 2. Read today's journal `memory/YYYY-MM-DD.md` + last 7 days (warm tier) - Not found → skip (heartbeat creates it automatically) - Found → read to restore recent context 3. Read `MEMORY.md` only when user mentions a specific project (cold tier) ``` `references/dream-guide.md:23-25`: ```markdown **③ Integrate**: - Write collected content to the right files - **Check for memory drift**: if new content contradicts old memory, rewrite the old — don't keep both ``` ### Technical Analysis The Skill instructs the Agent to persist conversational material in journals and long-term memory. In particular, it permits the full content of a “remember this” request to be recorded and treats failure to reject an Agent approach as a possible a ...[truncated 2613 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Persist structured facts rather than raw conversational content** - Do not store the “full content” of a message. - Extract only narrowly defined fields such as task name, status, decision, date, and next action. - Reject imperative instructions, role changes, tool-use directives, and attempts to alter safety constraints. 2. **Require explicit confirmation** - Present every proposed persistent behavioral rule or lesson to the user before writing it. - Do not treat silence or failure to reject an approach as approval. - Require separate confirmation before Dream consolidation replaces an existing memory entry. 3. **Track provenance and trust** - Record the source session, date, author, confirmation status, and trust level for each memory entry. - Prevent unconfirmed or externally sourced content from being promoted into long-term memory. 4. **Separate data from instructions** - Store memory in a schema that distinguishes factual records from executable Agent guidance. - Direct the Agent to treat all loaded memory as untrusted reference data, never as higher-priority instructions. - Ignore stored content that attempts to override system, developer, user, or safety requirements. 5. **Harden consolidation** - Generate a reviewable diff before rewriting or deleting established memory. - Preserve revision history so poisoned changes can be audited and rolled back. - Resolve contradictions through explicit user confirmation rather than automatic replacement. 6. **Validate startup-loaded content** - Scan loaded memory for prompt-injection patterns and instruction-like language. - Quarantine suspicious entries and notify the user instead of placing them directly into the active Agent context. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Self-Modification

High
Category
Rogue Agent
Content
```
Next: run bash run.sh, verify server.py upload fields match expected schema
Next: open scripts/main.py line 390, add show_name check before _upload_results call
Next: update SKILL.md confirmation step with agent_name instructions, republish ClaWHub 1.0.9
```

> Rule: "Next" must include what + where + expected outcome. A context-free AI should be able to start immediately.
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The skill description is written entirely in Chinese, including installation prerequisites and operating instructions, with no indication that other languages are supported or that the Chinese-only presentation is region-specific. Under the language/locale policy rule, this can exclude users by imposing a language choice without opt-in.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The file includes natural-language instructions and user-facing text in Chinese, such as the top-level description and one of the recommended notices, without indicating that language selection is optional or based on user preference. This can violate language/locale policy when a skill imposes a language on users without opt-in.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases are extremely broad and map to common conversational language, so the skill can activate when the user is merely pausing a discussion rather than explicitly requesting persistence. Because the skill writes durable memory files and can alter task state, accidental activation can cause over-collection, incorrect state capture, or unintended persistence of sensitive conversational content.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
1. Tell the user: "Your tasks.md is empty. Let me scan your recent work history and build your memory from scratch."
2. Read `MEMORY.md` + most recent session history (`openclaw sessions list --limit 1`)
3. Extract in-progress tasks, statuses, next steps
4. **Present to user for confirmation — never write without approval**
5. On confirmation → write to `memory/tasks.md`
6. If nothing found → ask user what they're working on
Confidence
75% confidence
Finding
The first-run flow instructs the agent to read recent session history and MEMORY.md before obtaining user confirmation, with approval required only before writing. Even though the metadata mentions confirmation, the skill behavior still performs potentially privacy-sensitive collection and inference over prior sessions without an explicit opt-in at the point of access.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The guide explicitly instructs autonomous modification of persistent memory files: rewriting conflicting entries, pruning old content, and archiving journals, but does not require user confirmation, preview, or rollback. In a memory-management skill, silent alteration of stored context can cause integrity loss, accidental deletion of important history, or persistence of incorrect summaries that affect future agent behavior.

Session Persistence

Medium
Category
Rogue Agent
Content
**① Orient**: scan `memory/tasks.md` and last 7 days of journals — understand current state

**② Collect**: find content worth long-term retention:
- Repeated lessons → distill and write to `MEMORY.md`
- Repeatedly validated methods → update "Notes" in project entries
- Tasks completed 30+ days ago → remove from "Completed" in tasks.md
Confidence
87% confidence
Finding
Although this appears to be a duplicate of the same persistence behavior, the underlying issue remains valid: the skill encourages cross-session retention and modification of memory artifacts without strong guardrails. In the context of a memory skill, this is more expected than in unrelated skills, but it is still dangerous because durable agent memory can amplify mistakes, retain sensitive data, and silently reshape future decisions.

Session Persistence

Medium
Category
Rogue Agent
Content
**1 Orient**: scan `memory/tasks.md` and last 7 days of journals — understand current state

**2 Collect**: find content worth long-term retention:
- Repeated lessons → distill and write to `MEMORY.md`
- Repeatedly validated methods → update "Notes" in project entries
- Tasks completed 30+ days ago → remove from "Completed" in tasks.md
Confidence
87% confidence
Finding
Although this appears to be a duplicate of the same persistence behavior, the underlying issue remains valid: the skill encourages cross-session retention and modification of memory artifacts without strong guardrails. In the context of a memory skill, this is more expected than in unrelated skills, but it is still dangerous because durable agent memory can amplify mistakes, retain sensitive data, and silently reshape future decisions.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## In Progress
- [ ] {task name}
  - Status: {one sentence — what step you're on}
  - Next: {specific action; a fresh AI reading this should be able to start without asking}
  - Updated: {YYYY-MM-DD HH:MM}

## Completed (archive)
Confidence
75% confidence
Finding
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.

Ssd 3

Medium
Confidence
95% confidence
Finding
The instruction to record the full content of anything a user says to remember can cause the skill to persist sensitive data verbatim, including credentials, personal data, internal URLs, tokens, or other secrets the user may mention incidentally. In a filesystem-based memory skill, this creates durable local storage of potentially sensitive information without any minimization, classification, or consent guardrails.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The pause triggers are broad and include common conversational endings, which can cause the agent to persist task state when the user did not clearly intend memory updates. In a memory-management skill, this creates unauthorized or surprising retention of session content and increases the chance of storing sensitive data merely because a conversation ended naturally.

Skill Enumeration

Medium
Category
Agent Snooping
Content
### On project changes
When creating/deleting projects, releasing versions, or changing Git URLs:
read `skills/memory-keeper/SKILL.md` and update the project index in `MEMORY.md`.
```

## Append to HEARTBEAT.md
Confidence
80% confidence
Finding
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.

Skill Enumeration

Medium
Category
Agent Snooping
Content
### On project changes
When creating/deleting projects, releasing versions, or changing Git URLs:
read `skills/memory-keeper/SKILL.md` and update the project index in `MEMORY.md`.
```

## Append to HEARTBEAT.md
Confidence
80% confidence
Finding
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.

Session Persistence

Medium
Category
Rogue Agent
Content
On each heartbeat:

1. Check if today's journal `memory/YYYY-MM-DD.md` exists
   - Not found → create it using the template below (once only, never duplicate)
   - Found → skip

**Journal template:**
Confidence
91% confidence
Finding
The heartbeat-driven creation and maintenance of dated journal files establishes routine session persistence, which is a real security/privacy concern when done automatically. Because the skill is explicitly designed to preserve context across resets, the persistence is intentional but still risky if users are not clearly informed and given control over retention scope and lifetime.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The heartbeat instructions direct the agent to create journal files automatically without any explicit user warning or consent. Automatic persistence on every heartbeat can capture contextual or sensitive session information over time, making this more dangerous because the skill's purpose is long-term memory retention rather than ephemeral operation.

Context-Inappropriate Capability

Medium
Confidence
85% confidence
Finding
The manifest describes a filesystem-based memory-management skill with no external services, focused on loading and updating memory files. The heartbeat instructions additionally require running `openclaw --version` and inspecting `openclaw.json`, which adds host-environment interrogation capabilities beyond the obvious needs of storing and retrieving memory state.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The instructions direct deletion of `memory/dream-state.json` after enabling native Dreaming, but do not require a warning, backup, or confirmation. Even if framed as cleanup, silent deletion of state can remove potentially useful history and conditions users to accept destructive filesystem actions without informed consent.

Static analysis

No suspicious patterns detected.