Back to skill

Security audit

long-term-memory

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent long-term memory tool, but it deserves review because it can persist and reinject sensitive user or project information without enough scoping, consent, or prompt-injection safeguards.

Review before installing. Use this only in a local, single-user context where long-term memory is acceptable. Do not store secrets, credentials, private personal data, or confidential business details unless you add controls for consent, deletion, project isolation, and redaction. Treat injected memory as untrusted historical notes, not instructions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T02 · Agent Memory Poisoning

Error
Location
scripts/memory_engine.py:390
Finding

Persistent Prompt Injection Through Unsanitized Long-Term Memory

Content
View full analysis
= 0: project = content[max(0, idx - 10):idx + 10].strip() break store.remember(content, tags=[tag, "auto_captured"], importance=imp, source="auto", session_id=session_id, project=project[:50]) ``` Retrieved memory is then inserted verbatim into context intended for an LLM: ```python def build_context_injection(task: str = "", max_tokens: int = 1500) -> str: """Build a context block for injection into LLM prompts""" store = MemoryStore() if task: related = store.search(task, limit=5, min_importance=3) else: related = store.get_recent(limit=8) if not related: return "" lines = [] for m in related: when = datetime.fromtimestamp(m.created_at).strftime("%m-%d") tags = ",".join(m.tags[:3]) lines.append(f"- [★{m.importance}][{tags}]({when}) {m.content[:200]}") result = "## Context from Long-Term Memory\n" + "\n".join(lines) est = len(result) * 1.5 if est > max_tokens: result = result[:int(max_tokens / 1.5)] + "\n...(truncated)" return result ``` ### Technical Analysis The Skill is designed to retain facts, preferences, decisions, and project context across sessions. However, automatic capture accepts text from the current interaction and stores matching se ...[truncated 2614 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:6
Finding

Unpinned Dependencies and Mutable External Model Retrieval

Content
View full analysis
=2.2.0 # Option B: API-based (for professional version) # openai>=1.0.0 # Utilities numpy>=1.24.0 json5>=0.9.0 ``` Local embedding mode loads a model by mutable repository identifier without pinning a revision or verifying an artifact hash: ```python def _init_local(self): try: from sentence_transformers import SentenceTransformer self._model = SentenceTransformer("all-MiniLM-L6-v2") self.dim = 384 except ImportError: raise RuntimeError("sentence-transformers not installed. pip install sentence-transformers") ``` ### Technical Analysis Version constraints using `>=` allow package managers to install later releases that were not audited with this Skill. There is no lockfile or hash-verified requirements file to guarantee reproducible installation. The model is also identified only by name. If it is not already cached, `SentenceTransformer` may contact an external model registry and download model files. No immutable repository revision, expected digest, approved host, or offline-only option is enforced in code. This is not evidence that the current named packages or model are malicious. The risk arises because the effective dependency and model artifacts can change after the Skill itself has been reviewed. This also explains the static scanner’s network-related concern: the code contains no explicit HTTP request or sensitive-data upload, but model initialization can initiate an external download. The default configuration uses simple embedding mode, so model retriev ...[truncated 1679 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Known Vulnerable Dependency: sqlite-vec==0.1.0 — 2 advisory(ies): CVE-2024-46488 (Heap-based Buffer Overflow in sqlite-vec); CVE-2024-46488 (Heap-based Buffer Overflow in sqlite-vec)

Critical
Category
Supply Chain
Confidence
98% confidence
Finding

sqlite-vec==0.1.0 is explicitly pinned to a version reported as affected by CVE-2024-46488, a heap-based buffer overflow. In a long-term-memory skill that stores and retrieves persistent semantic memory, this is especially dangerous because the vulnerable library sits in a core storage/query path and may be reachable through crafted data or queries, potentially leading to crashes, memory corruption, or code execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly stores facts, decisions, user preferences, and project context across sessions but provides no warning that sensitive personal, business, or secret data may be retained persistently. Users and integrators may therefore enable it without informed consent, creating privacy, confidentiality, and compliance risks.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
### `scripts/memory_engine.py` — Core engine

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The auto-capture feature scans free-form text for decisions, facts, preferences, and project details, which can easily include credentials, personal data, internal plans, or other unintended sensitive content. Because capture is automated, users may not realize what is being stored, making over-collection and long-term leakage more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The default configuration enables automatic capture and context injection, meaning user-supplied content may be persistently stored and later resurfaced without explicit notice or consent. In a long-term memory skill, this is especially risky because the captured content may include sensitive personal, business, or authentication-related information that persists across sessions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill can capture user-provided details such as contact information, preferences, and project facts, store them long-term, and later reinject them into prompts/context. That creates a direct natural-language data leakage channel: sensitive information from one interaction can be surfaced in unrelated future tasks, exposed to downstream models/tools, or written to disk as part of context generation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents shell execution and persistent local storage behavior but does not declare any explicit tool scope or permission boundaries. This makes it easier for an agent runtime to invoke file-writing and shell-capable actions without clear least-privilege constraints, increasing the chance of unsafe execution or unintended persistence.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description claims suitability for 'all AI scenarios' while the skill performs persistent cross-session memory capture and retrieval. Such broad framing encourages activation in contexts where long-term storage is inappropriate, including sensitive, regulated, or multi-tenant environments.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented auto-capture behavior encourages broad collection from arbitrary conversational text, including facts, preferences, problems, and project context. In practice this increases the chance of storing sensitive or irrelevant information that can later be surfaced in unrelated contexts, causing confidentiality and privacy harm.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The AGENTS.md integration instructs the agent to persist user-shared information and session summaries across sessions as a normal operating rule. Without consent checks, data minimization, or sensitivity filtering, this creates a natural-language retention channel that can leak private context into later sessions or other tasks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill supports semantic search and vector retrieval, but the code only defines an Embedder class and cosine_similarity helper without storing embeddings or using them in search ranking. The actual search path in search/_fts_search relies on FTS5 and LIKE matching, so the advertised retrieval behavior is not implemented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

Several natural-language elements in comments, trigger keywords, demo data, and output assumptions are explicitly centered on Chinese/CJK usage, including the tokenizer comment and Chinese-only auto-capture triggers. This suggests the skill behavior is tailored to a specific language without offering a user language choice or documenting the locale restriction as an opt-in constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The forget method permanently deletes memories from the database, and the CLI directly invokes it from a provided memory ID. The code prints only the result after deletion and does not prompt for confirmation or warn that the operation is destructive and may be irreversible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code writes the generated context block to a predictable file on disk without explicit disclosure. Because that context is assembled from prior memories, it can contain sensitive user or project data that becomes available to other local users, tools, backups, or later processes beyond the immediate prompt flow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description presents automatic capture as a core capability of the memory middleware, implying it happens during normal agent operation. In code, auto-capture only occurs when cli_auto is explicitly invoked with provided text; there is no hook, background process, or middleware integration that automatically observes sessions or agent exchanges.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/setup.py (reported line 51)May include surrounding context.

python
"context_inject": True,
        "context_max_tokens": 2000,
        "session_history_days": 30,
        "installed_at": __import__("time").strftime("%Y-%m-%d %H:%M:%S"),
        "workspace": str(workspace),
    }
    with open(data_dir / "config.json", "w", encoding="utf-8") as f:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The test persists and prints user-identifying and preference data such as a named individual, communication preferences, workspace details, and investment-related notes. In a long-term-memory skill, normalizing storage and retrieval of personal context without disclosure, minimization, or sanitization increases privacy risk and can propagate sensitive data into logs, prompts, or downstream systems across sessions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.