Back to skill

Security audit

memory-index

Security checks for vulnerabilities and agentic risk

Overview

This memory-management skill has no executable code, but it asks agents to persist, reuse, delegate from, and automatically clean local memory files without enough user control.

Review before installing. This skill is intended to manage long-term agent memory, so it will naturally touch local memory files, but it should be changed to require explicit opt-in, scoped memory roots, path validation, backups or quarantine before cleanup, and clear rules that memory files are data rather than higher-priority instructions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:103
Finding
Unsafe Deletion and Modification of Persistent Memory## Vulnerability Details **File Location**: `SKILL.md`, lines 103-110 **Vulnerability Type**: Uncontrolled persistent-data deletion **Risk Level**: High **Relevant source instructions, rendered in English:** ```markdown ### Stage 4: Task Termination and Distillation 1. Status modification: Change the task label from ACTIVE to ARCHIVED and move it from MEMORY_INDEX_ACTIVE.md to MEMORY_INDEX_ARCHIVED.md. 2. Memory distillation: Open the corresponding Layer 3 task file and delete all lengthy and useless process logs, including scratchpads and minor bug trial-and-error records. 3. Token release: Minimize the archived file so that future retrieval consumes as little context as possible. ### System Maintenance - Heartbeat orphan reconciliation: During idle heartbeat cycles, periodically compare physical files under /memory/topics/* with the ACTIVE index and register or clean up unregistered orphan files. ``` ### Technical Analysis The Skill authorizes an Agent to delete historical process data and “clean up” files that are not registered in the active index. It does not define ownership checks, canonical path validation, a retention period, backup requirements, soft deletion, transactional updates, or mandatory user confirmation. Absence from an index is not sufficient evidence that a file is disposable. A legitimate file may be temporarily unindexed because of interrupted updates, concurrent Agent activity, index corruption, manual user changes, or migration between states. The instruction to delete allegedly unnecessary process history also removes information that may be required for auditing, incident investigation, or recovery. The earlier cold-start workflow additionally permits inspection of recent general memory journals. This gives the Skill access to context that may be unrelated to the task it is managing. ### Attack Path 1. A legitimate topic file is created manually, by another Agent, or during an interrupted in ...[truncated 1119 chars]
Remediation
## Remediation Suggestions - Restrict all modifications to a dedicated, canonicalized, Skill-owned directory. - Require explicit user confirmation before deleting any file or removing historical content. - Replace permanent deletion with soft deletion into a quarantine directory. - Create versioned backups before archive compaction or reconciliation. - Attach verifiable ownership and lifecycle metadata to every managed file. - Treat unindexed files as recovery candidates, not deletion candidates. - Use transactional index updates so file creation and index registration cannot diverge. - Define deterministic retention rules rather than allowing the Agent to decide what is “useless.” - Preserve an append-only audit trail recording the file, operation, timestamp, and authorization. - Detect concurrent modification before writing or deleting a file.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:85
Finding
Persistent Topic Files Can Hijack Sub-Agent Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 85-100 **Vulnerability Type**: Instruction hijacking through untrusted persistent context **Risk Level**: High **Relevant source instructions, rendered in English:** ```markdown ### Stage 2: Task Flow and Retrieval 1. Check the master table: The first action must be to call the read tool on memory/MEMORY_INDEX_ACTIVE.md. 2. Follow the pointer: Find the matching task entry and extract the absolute path to the task. 3. Load context: Call the read tool on that absolute path to obtain the complete Layer 3 context. ### Stage 3: Multi-Agent Handoff 1. Context encapsulation: When invoking sessions_spawn, it is absolutely prohibited to put lengthy background information directly in the prompt. 2. Path transmission: The absolute path must be communicated with highest priority, for example: "Your task context is at /memory/topics/coding/feature-x.md. Read this file first and proceed according to the developer role rules contained in it." 3. Collaborative access: The sub-agent automatically reads context through the path and modifies the file after completing the work. ``` ### Technical Analysis The Skill requires Agents to load persistent index and topic files and instructs sub-agents to follow role rules contained in those files. It uses mandatory and “highest priority” language without establishing that system instructions, developer instructions, current user intent, and platform safety controls remain authoritative. Persistent memory files are mutable data and should not be treated as trusted instructions. They may be altered by a user, another Agent, a compromised process, or content previously copied from an untrusted source. A malicious topic file could include instructions to change goals, disclose unrelated memory, invoke dangerous tools, or modify additional files. Passing only the path to a sub-agent also removes contextual safeguards that the parent Age ...[truncated 1360 chars]
Remediation
## Remediation Suggestions - State explicitly that system, developer, and current user instructions always take precedence over Skill and memory content. - Treat all index and topic-file content as untrusted data, not executable instructions. - Store task facts separately from Agent behavioral policies. - Prohibit topic files from defining tool permissions, safety rules, role authority, or instruction priority. - Validate and canonicalize every routed path against an approved memory root. - Reject symbolic-link escapes and paths not owned by the expected user or Skill. - Include trusted task constraints and safety requirements directly in every sub-agent invocation. - Require the parent Agent to summarize and sanitize file content rather than telling a sub-agent to follow it verbatim. - Add integrity metadata or authenticated signatures for trusted index entries. - Request user confirmation before acting on newly changed or suspicious instructions found in persistent memory.

T09 · Insecure Skill Coding Practices

Note
Location
README.md:22
Finding
Documentation Advertises an Unimplemented Storage Takeover and CLI Command## Vulnerability Details **File Location**: `README.md`, lines 22-30 **Vulnerability Type**: Unsupported security-sensitive operational claims **Risk Level**: Low **Relevant source documentation, rendered in English:** ```markdown ## Installation Guide clawhub install memory-index ## Usage Guide Zero-code intrusion. After installation, Memory Index automatically takes over OpenClaw's underlying storage routing. To manually trigger full memory hot/cold conversion and archiving, execute: openclaw memory-index archive ``` The complete package manifest contains only package metadata: ```json { "name": "memory-index", "version": "1.0.0", "description": "A three-layer physically isolated memory system for OpenClaw", "author": "OpenClaw Community", "keywords": [ "memory", "token-saver", "routing" ] } ``` ### Technical Analysis The package contains no executable source files, package scripts, binary registration, dependencies, or plugin configuration. Consequently, the repository does not implement the documented automatic storage-routing takeover or the `openclaw memory-index archive` command. This is primarily a trust and deployment-integrity weakness. Users may believe storage is being archived or protected when no implementation exists. They may also invoke a command whose implementation, if resolved from another installed component or extension, was not supplied or reviewed as part of this package. No malicious command implementation, remote download, dependency, or install hook was found in the audited project. ### Attack Path 1. A user installs the documentation-only package and trusts the automatic-takeover claim. 2. The user assumes that memory routing or archival protection is active when it is not. 3. The user invokes the documented archive command. 4. The command either fails or is resolved by software outside this audited package. 5. If an unrelated ...[truncated 604 chars]
Remediation
## Remediation Suggestions - Remove the automatic-takeover and archive-command claims until they are implemented. - If CLI behavior is intended, provide an auditable implementation and explicitly register the command. - Document the exact files, permissions, and storage locations affected by installation and archival. - Add tests demonstrating command registration, archival behavior, failure handling, and rollback. - Avoid claiming automatic protection unless installation verifies that the required integration is active. - Pin and audit any future dependencies and avoid runtime retrieval of unreviewed code. - Clearly distinguish documentation-only Agent instructions from executable OpenClaw plugins.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Missing User Warnings

High
Confidence
98% confidence
Finding
The maintenance workflow authorizes automatic reconciliation, including cleanup of 'orphan' memory files, without requiring user visibility, confirmation, or a safe recovery mechanism. That is dangerous because it can silently delete or alter persistent user data based on the skill's own heuristics, causing data loss and breaking trust.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README states that the skill will automatically take over OpenClaw's underlying storage routing with 'zero code intrusion' and no warning about what data is intercepted, persisted, or re-routed. In an agent-memory component, silent storage interception changes data-handling behavior and can expose sensitive conversation content, project data, or retention behavior without informed user consent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill directs the agent to create, edit, and maintain persistent memory files as part of normal operation, but it never requires obtaining explicit user consent or notifying the user that data will be stored and modified on disk. This creates a privacy and transparency risk because users may unknowingly have task details retained across sessions and have files changed without approval.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The package description is written entirely in Chinese, which can constitute a language/locale policy issue when the skill does not offer any user opt-in or explain that it is intended only for a Chinese-speaking audience. For a general package manifest, this may exclude users or downstream tooling expectations without documented justification.

Vague Triggers

Medium
Confidence
90% confidence
Finding
This plain-text file describes the skill in general promotional terms but provides no explicit trigger phrases, invocation conditions, or exclusion criteria. Because the description is broad and lacks scope boundaries, it could support unintended activation or unclear routing in systems that infer triggers from descriptive text.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The README is entirely written in Chinese and does not indicate any option for users to choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly documented and justified.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The document requires each topic file to declare an ownership role/persona tag such as `[CTO]` or `[产品经理]`, and later uses these labels to govern agent behavior. This imposes a behavioral/persona constraint through natural-language policy rather than offering the user a choice, which may conflict with organizational policies against forced mode selection without opt-in.

Static analysis

No suspicious patterns detected.