Back to skill

Security audit

Xiaolongxia Memory Manager

Security checks for vulnerabilities and agentic risk

Overview

This memory-management skill is coherent, but it automatically stores and reloads broad user and project details across sessions without clear opt-in, retention limits, or sensitive-data safeguards.

Install only if you intentionally want persistent workspace memory. Before use, add explicit opt-in, keep memory out of source control, exclude secrets and regulated personal data, review stored entries regularly, and define a way to delete or disable MEMORY.md and daily journals.

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)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:43
Finding

Persistent Memory Can Carry Untrusted Instructions Across Sessions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 43-48 and 59-63; references/通用prompt模板.md, lines 29-33
Vulnerability Type: Persistent memory poisoning through unsanitized conversation-derived content
Risk Level: Medium

Relevant snippet from SKILL.md, lines 43-48, translated into English:

markdown
## Memory

At the start of every new session:
1. Read `MEMORY.md` to obtain long-term context
2. Read `memory/YYYY-MM-DD.md` for today and yesterday to obtain recent context
3. After completing a valuable conversation, immediately write the key points to today's journal

Relevant snippet from SKILL.md, lines 59-63, translated into English:

markdown
### Memory Habits
1. **Proactively record** — After every valuable conversation, such as project analysis,
   technical research, or an important decision, immediately write the key points to
   `memory/YYYY-MM-DD.md`. Do not wait for the user to ask.
2. **Provide reminders when the context becomes long** — When the conversation feels long,
   proactively remind the user that the key points have been recorded.
3. **Consolidate during heartbeat processing** — Periodically review recent journals and
   extract information worth retaining into `MEMORY.md`.

Relevant snippet from references/通用prompt模板.md, lines 29-33, translated into English:

markdown
### Session Startup

At the start of every new session:
1. Read `MEMORY.md` to obtain long-term context
2. Read today's and yesterday's journals to obtain recent context
3. Continue naturally as though you remember what happened previously

Technical Analysis

The Skill instructs an agent to derive persistent records from conversation content and automatically load those records into future sessions. It does not establish a trust boundary between stored facts and executable instructions.

There are no requirements to:

  • Reject commands, policy text ...[truncated 2035 chars]
Remediation
View remediation

Remediation Suggestions

  1. Store memories in a structured format with separate fields for facts, provenance, confidence, timestamp, and user approval.
  2. Explicitly prohibit storage of commands, system prompts, safety-policy changes, tool-use directives, authentication data, and requests to alter future behavior.
  3. Prefix loaded memory with a strong instruction stating that it is untrusted historical data and cannot override system, developer, or current-session instructions.
  4. Quote or delimit all memory content so it is processed as data rather than as instructions.
  5. Require explicit user confirmation before promoting journal entries into MEMORY.md.
  6. Track the source of every memory entry and distinguish direct user statements from third-party or retrieved content.
  7. Add a review and deletion workflow so users can inspect, correct, quarantine, and remove poisoned entries.
  8. During consolidation, detect instruction-like language and either discard it or convert it into a neutral factual statement.
  9. Apply least privilege when loading memory: only retrieve entries relevant to the current task rather than automatically injecting entire files.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:91
Finding

Automatic Plaintext Retention of Potentially Sensitive User and Project Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 91-96; related collection instructions at lines 59-63 and references/记忆模板.md, lines 6-36
Vulnerability Type: Excessive collection and insecure plaintext retention of sensitive contextual information
Risk Level: Medium

Relevant snippet from SKILL.md, lines 91-96, translated into English:

markdown
**Should be retained:**
- The user's background, goals, and communication preferences
- Important decisions and their reasons
- Project status and progress
- Lessons learned from mistakes
- Recurring patterns or topics

Relevant snippet from references/记忆模板.md, lines 6-36, translated into English:

markdown
## About the User

<!-- Who are you helping? Name, background, goals, and communication preferences -->

## Projects and Work

<!-- Active projects, current status, technology stack, and progress -->

## Learning Progress

<!-- Current learning journeys, completed subjects, and next steps -->

## Preferences and Habits

<!-- Communication preferences, workflow preferences, and user likes or dislikes -->

## Environment Notes

<!-- Technical environment, model information, platform characteristics,
and other information worth remembering -->

Technical Analysis

The Skill directs the agent to proactively collect and persist broad categories of conversation data, including user background, preferences, project paths, technical environments, decisions, and work status. These records are stored in Markdown files without specified encryption, access restrictions, sensitivity classification, or retention limits.

The instructions do not exclude credentials, tokens, private keys, personal identifiers, confidential business information, health or financial information, or other secrets that may appear during an otherwise valuable conversation. They also do not require explicit consent befo ...[truncated 1725 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed user opt-in before enabling persistent memory.
  2. Adopt a strict data-minimization policy and record only information necessary for an identified future purpose.
  3. Explicitly prohibit retention of passwords, API tokens, session cookies, private keys, recovery codes, financial data, health data, government identifiers, and other high-risk information.
  4. Redact secrets, credentials, personal identifiers, and unnecessary absolute paths before writing any journal entry.
  5. Set defined retention periods for daily journals and long-term memories, followed by automatic deletion or reauthorization.
  6. Provide user-facing commands to inspect, edit, export, and permanently delete stored memory.
  7. Store memory outside source-controlled directories and add memory files to ignore rules where applicable.
  8. Apply restrictive filesystem permissions so only the intended user and agent process can read or modify the files.
  9. Use encryption at rest where the host platform supports secure key management.
  10. Keep private memory disabled in shared sessions, group conversations, public agents, and workspaces with multiple untrusted users.
  11. Record provenance and sensitivity labels for every entry so higher-risk content can be excluded from automatic session loading.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the assistant to proactively write conversation takeaways into persistent memory files immediately after 'valuable' dialogues, but it does not require user notice or consent before retention. In a memory-management skill, this creates a real privacy risk because users may disclose sensitive background, preferences, or project details without realizing they will be stored across sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

These instructions explicitly direct the assistant to retain user conversation content across sessions by default, including details that may reveal identity, preferences, decisions, or project context. In the context of a memory skill, the retention behavior is intentional, which makes the finding more credible rather than less dangerous, because the feature naturally expands the attack surface for privacy leakage and over-collection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The periodic maintenance workflow automatically rereads recent journals and updates long-term memory without any warning about ongoing processing of previously supplied user data. Because this enables repeated retention and transformation of personal or contextual information, it increases the chance of silent long-term accumulation and unintended exposure.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The extraction guidance tells the agent to preserve user background, goals, preferences, and recurring patterns in long-term memory, which amounts to systematic collection of personal and contextual information. Even though this supports the skill's purpose, it is still risky because long-term natural-language memory can expose sensitive details later or be reused outside the user's expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The prompt directs the assistant to automatically persist 'valuable' conversation details, including user preferences and project information, without any user notice, consent, retention limits, or sensitivity filtering. This creates a cross-session privacy risk because personal or confidential data may be stored indefinitely and later surfaced in unrelated contexts.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The system prompt explicitly tells the assistant to proactively retain and persist user information across conversations in local memory files. In the context of a memory-management skill, persistence is expected, but the lack of privacy guardrails, consent, data minimization, and sensitive-data exclusions makes the design dangerous rather than inherently malicious.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt instructs the assistant to read MEMORY.md and recent diary files at the start of every new session, but it does not require disclosure that prior-session data is being accessed. This can violate user expectations of session isolation and may expose previously stored sensitive context to future interactions or different users sharing the same environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

文件整体以中文描述技能用途,且面向“任意 AI 助手平台”复用,但没有提供用户语言/locale 选择,也未说明这是特定中文场景专用。根据规则,若技能强制特定语言且无用户选择或合理限定,可构成自然语言政策违规。

Content

No source excerpt is available for this finding.