Back to skill

Security audit

hierarchical-agent-memory

Security checks for vulnerabilities and agentic risk

Overview

This skill organizes OpenClaw memory files and scheduled summaries in a disclosed, user-controlled way, with no evidence of hidden execution or exfiltration.

Install only if you want OpenClaw to maintain persistent workspace memory. Review the full preset carefully because it can create recurring synthesis jobs and generated archive files; keep secrets, passwords, API keys, and sensitive personal data out of MEMORY.md and memory files.

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
  • 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
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
MEMORY.md is a routing table, not a summary. If you're tempted to write a paragraph in MEMORY.md, it belongs in a topic file instead.

**Dreaming-managed entries.** From OpenClaw 2026.8.1, dreaming is on by default and promotes qualified items into MEMORY.md. Its entries carry trailing markers such as `<!-- trigger: … -->`, `<!-- importance: N -->`, and a `Source: path#Lx-Ly` reference, and the deep phase may rewrite them during consolidation. Treat those entries as machine-managed: never edit, reword, or delete them by hand, and do not count them toward `routing_table_max_kb`. If a promoted entry duplicates something a topic file already holds, leave the entry alone and make sure the topic file is the richer of the two. If dreaming entries push the whole file toward the bootstrap budget, tell the user and offer two choices: keep dreaming and accept a larger MEMORY.md, or set `plugins.entries.memory-core.config.dreaming.enabled: false` so this skill's distillation is the only promotion path. Do not change that setting yourself.

**Security note:** MEMORY.md is injected into the model context of every main session. Never put secrets, API keys, passwords, or sensitive PII in MEMORY.md or any file it points to. Store credentials in environment variables or `.env` files (excluded from memory). Active Constraints entries such as "do not raise X" are acceptable; they are behavioral directives, not sensitive data.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
MEMORY.md is a routing table, not a summary. If you're tempted to write a paragraph in MEMORY.md, it belongs in a topic file instead.

**Dreaming-managed entries.** From OpenClaw 2026.8.1, dreaming is on by default and promotes qualified items into MEMORY.md. Its entries carry trailing markers such as `<!-- trigger: ... -->`, `<!-- importance: N -->`, and a `Source: path#Lx-Ly` reference, and the deep phase may rewrite them during consolidation. Treat those entries as machine-managed: never edit, reword, or delete them by hand, and do not count them toward `routing_table_max_kb`. If a promoted entry duplicates something a topic file already holds, leave the entry alone and make sure the topic file is the richer of the two. If dreaming entries push the whole file toward the bootstrap budget, tell the user and offer two choices: keep dreaming and accept a larger MEMORY.md, or set `plugins.entries.memory-core.config.dreaming.enabled: false` so this skill's distillation is the only promotion path. Do not change that setting yourself.

**Security note:** MEMORY.md is injected into the model context of every main session. Never put secrets, API keys, passwords, or sensitive PII in MEMORY.md or any file it points to. Store credentials in environment variables or `.env` files (excluded from memory). Active Constraints entries such as "do not raise X" are acceptable; they are behavioral directives, not sensitive data.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/migration-v2-to-v3.md (reported line 45)May include surrounding context.

md
1. Create `memory/topics/` directory
2. For each active project, create `memory/topics/<project-name>.md`
3. Move project-specific content from MEMORY.md to the topic file
4. Replace MEMORY.md content with one-line pointers to topic files
5. Repeat for contacts if desired

## Rollback

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

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

md
2. Propose: list how many files would move, and whether any date already has a note at `memory/YYYY-MM-DD.md`. Get approval before touching anything.
3. Move each `memory/daily/YYYY-MM-DD.md` to `memory/YYYY-MM-DD.md`. If the workspace is a git repository, use `git mv` so history follows the file. If a root note for the same date already exists, append the `memory/daily/` content to the root note under a `## Migrated from memory/daily/` heading rather than overwriting either one, then delete the source.
4. Leave `memory/daily/` in place if it still holds anything else; remove it once empty, with confirmation.
5. Update any pointers in MEMORY.md, topic files, or AGENTS.md that reference `memory/daily/`. If AGENTS.md tells the agent to read `memory/daily/YYYY-MM-DD.md` at startup, tell the user that line is now wrong and show the replacement; do not edit AGENTS.md without approval.
6. Re-run `/hierarchical_agent_memory status` to confirm the newest daily note is at the root.

Nothing is loaded that was not loaded before: older notes remain on-demand through `memory_search`, and only today's and yesterday's notes are preloaded, and only on a fresh session.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file states that the full preset uses automated distillation cron jobs, and elsewhere explains that OpenClaw reads and writes files such as memory/YYYY-MM-DD.md. Because this is behavior that affects user data and the workspace filesystem, the skill description should explicitly warn users that enabling these presets will create and modify files automatically.

Content

No source excerpt is available for this finding.