Back to skill

Security audit

Triple Memory Lake

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local memory aggregator, but it broadly copies private Claude Code session history into persistent storage without clear consent, minimization, redaction, or retention controls.

Install only if you intentionally want a local long-term memory lake and are comfortable duplicating Claude Code session logs and OpenClaw agent metrics into the skill directory. Before using the sync scripts, review the source paths, limit them to approved projects, exclude secrets or confidential sessions, and avoid treating generated pattern files as trusted instructions without human review.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sync-claude-code.py:11
Finding

Unfiltered Collection and Persistent Storage of Claude Code Session Logs

Content
View full analysis
last_sync: dest = TARGET_DIR / project_dir.name shutil.copy2(project_dir, dest) synced_count += 1 ``` The same broad collection behavior is also documented in `SKILL.md:91-92`: ```bash # Claude Code cp ~/.claude/projects/*/sessions/*.jsonl memory/sources/claude-code/ ``` ### Technical Analysis The synchronization process recursively searches every project beneath `~/.claude/projects` and copies each matching session file into the Skill's memory directory without: - Restricting collection to explicitly approved projects. - Selecting only fields required for pattern analysis. - Detecting or redacting credentials, tokens, personal information, source code, or other secrets. - Applying retention or deletion policies. - Enforcing restrictive destination permissions. - Limiting input file size. - Preserving project-scoped destination paths. Claude Code session logs may include user messages, source code, command output, filesystem contents, and credentials accidentally entered into a conversation. Copying complete JSONL files creates an additional plaintext repository of that information. The destination uses only `project_dir.name`. Session files f ...[truncated 1709 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
scripts/pattern-miner.py:17
Finding

Persistent Memory Poisoning Through Unsanitized Session Content

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The description emphasizes integration/unification of OpenClaw, Claude Code, and self-improving agent memories into a single knowledge lake. This code does not perform integration logic between those systems; instead, it analyzes already-present files under a local memory/sources directory, extracts error and workflow patterns, and writes markdown summaries and an index. While this may operate on a unified memory store, its primary purpose is pattern mining and report generation, which is materially narrower and different from the declared integration function.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description emphasizes a quad-layer memory integration system unifying OpenClaw, Claude Code, and self-improving agent memories into a single knowledge lake. However, this code chunk only invokes three other scripts: one for Claude Code sync, one for self-improving sync, and one for pattern mining. There is no evidence here of OpenClaw being synced or integrated, nor of any direct creation of a unified knowledge lake. Additionally, the code introduces pattern mining, which is not clearly stated in the description. Because the observed behavior only partially overlaps with the declared purpose and omits a key declared integration target while adding another capability, this is a material mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad multi-source memory integration system, but the supplied code chunk performs a much narrower task: it copies updated Claude Code JSONL session files into a target directory and records a last-sync timestamp. There is no evidence of OpenClaw integration, self-improving agent memory handling, or any actual unification logic beyond importing one source into a folder. This is a material description-to-behavior mismatch in primary purpose and covered capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The declared description suggests a broad integration layer across several memory systems and sources, but the provided code chunk performs a much narrower function: incremental synchronization of metrics.json files from one source directory into one target directory. It does not show any handling of Claude Code memories, OpenClaw memory unification beyond reading one agent directory, or a combined knowledge lake across multiple layers. The code’s primary purpose is a single-source metrics sync job, which is materially narrower than the declared purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill instructs shell/file operations such as copying logs into the memory lake, but it declares no explicit tool scope or permissions boundary. That increases the chance an agent will execute broader filesystem or shell actions than users expect, especially when handling local history and memory artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Most of the natural-language instructions and labels in the file are Chinese, which effectively forces a specific language for users. The policy allows locale constraints only when they are optional or clearly justified, but this file provides neither a language choice nor a documented reason for the restriction.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly promotes storing user preferences, daily logs, and long-term memory artifacts, which encourages ongoing accumulation of user-provided data without any visible minimization, consent, or retention controls. In a memory-management context this makes the issue more dangerous, because persistent profiling and historical aggregation are core behaviors rather than incidental side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill tells the agent to copy Claude Code session logs and metrics into a persistent memory store without warning that those files may contain secrets, prompts, personal data, or proprietary content. This creates a realistic privacy and secret-spillage risk because sensitive local artifacts are duplicated into another repository-like location where retention and further reuse become more likely.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Copying full Claude Code session logs into long-term storage materially increases data retention risk because those logs can include user conversations, commands, file paths, credentials, tokens, or confidential project details. Once centralized in the memory lake, the data becomes easier to search, reuse, leak, or accidentally expose across future agent tasks.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/sync-all.py (reported line 12)May include surrounding context.

python
SKILL_DIR = Path(__file__).parent.parent

def run_script(name):
    result = subprocess.run(
        ["python3", name],
        cwd=SKILL_DIR / "scripts",
        capture_output=True,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a "quad-layer memory system integration" that unifies OpenClaw, Claude Code, and self-improving agent memories into a single knowledge lake. This file only reads from the local Claude Code projects directory and copies matching JSONL files into a local target folder, with no logic for OpenClaw, other memory sources, or cross-system unification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script silently copies Claude Code session logs, which may contain sensitive prompts, code, secrets, or other conversation data, into a secondary 'memory lake' directory without any notice, consent gate, or data minimization. Duplicating these logs increases the attack surface and retention footprint, especially because this skill is explicitly designed as a cross-memory aggregation mechanism, making sensitive data easier to accumulate and reuse unintentionally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script persists a .sync_state.json file to track the last synchronization time, which modifies local state outside transient execution. While the function docstring names the action, there is no user-facing warning or disclosure that persistent state will be created in the target directory.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python code performs file-write operations by creating or overwriting destination JSON files under the memory/sources/self-improving directory. Although the script has brief docstrings and a final summary print, it does not disclose before the write occurs that files will be created or overwritten, which is the kind of user-impacting behavior this rule asks to warn about.

Content

No source excerpt is available for this finding.