Back to skill

Security audit

Extract Memories

Security checks for vulnerabilities and agentic risk

Overview

This memory-extraction skill clearly says it saves conversation details, but it can do so automatically and broadly enough that users should review it before installing.

Install only if you are comfortable with the agent automatically saving selected conversation details to persistent memory. Prefer using it manually with a preview/confirmation workflow, and avoid it for chats containing secrets, private account details, sensitive URLs, or instructions that should not influence future sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:25
Finding

Untrusted Conversation Content Can Be Persisted into Long-Term Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25–40, 50–63, 92–114, and 166–193
Vulnerability Type: Persistent memory poisoning through unsanitized conversation extraction
Risk Level: High

Vulnerable Code Snippets

markdown
Step 1 — Determine the scope of the current conversation
         Read the latest messages from the current session and determine the start and end
         ↓
Step 2 — Identify content worth extracting
         Scan messages and identify: user decisions / user preferences / project constraints / external-system references
         ↓
Step 3 — Classify into four types
         Assign each item a type (user/feedback/project/reference)
         feedback must include Why + How to apply
         ↓
Step 4 — Check topics/ for duplicates
         grep existing topics and confirm no duplicate before writing
         ↓
Step 5 — Write to a topic file (APPEND, do not overwrite)
         Format: frontmatter + body
         ↓
Step 6 — Update the MEMORY.md index
         Add a one-line pointer (≤150 characters)
markdown
Read the latest messages from the current session without limiting the number of messages, ensuring that the complete conversation is covered.
markdown
| External-system reference | URL, tool, account, path | "It is in Linear" |
markdown
## Step 5 — Write to a topic file

**Format (frontmatter)**:

```yaml
---
name: Name
description: One-sentence description used to determine relevance
type: user / feedback / project / reference
---
Body content

**Why:** Reason, required for feedback/project
**How to apply:** When it applies, required for feedback/project

Write mode: APPEND; do not overwrite existing content.

Step 6 — Update the MEMORY.md index

Append a pointer to the end of MEMORY.md:

text
- [Name](topics/filename.md) — one-sentence hook (≤150 characters)
text

```mark
...[truncated 3430 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit user confirmation before writing any extracted item to persistent memory. Present a preview that includes the exact content, classification, destination file, and rationale.
  2. Treat all conversation-derived text as untrusted data. Reject or quarantine content containing commands, imperative instructions, attempts to alter agent policy, tool-use directives, encoded payloads, or requests to ignore higher-priority instructions.
  3. Apply a strict schema that permits factual preferences, decisions, and references but prohibits executable or policy-like instructions. Store structured fields rather than unrestricted prose wherever possible.
  4. Record provenance for every entry, including session identifier, source message, timestamp, author, extraction method, and approval status. Future agents should be instructed to treat entries as claims rather than authoritative system instructions.
  5. Limit extraction to the active task and a bounded message window instead of reading an unlimited conversation history.
  6. Exclude secrets, authentication material, account identifiers, private URLs, and sensitive filesystem paths by default. Add secret and personal-data detection before persistence.
  7. Separate reference data from behavioral instructions and ensure retrieved memories cannot supersede system, developer, security, or current user instructions.
  8. Provide deletion, expiration, rollback, and review mechanisms. Avoid unconditional append-only storage for entries that have not been validated.
  9. Perform deduplication only after safety validation; duplicate detection must not be treated as a security control.
  10. Disable automatic heartbeat and conversation-end persistence by default, or restrict automatic operation to generating an uncommitted draft that requires approval.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The extraction criteria explicitly include external system pointers such as URLs, tools, accounts, and paths for long-term storage. These identifiers can expose internal systems, account references, repository locations, or operational details that materially increase security and privacy risk if the memory files are later accessed, synced, or leaked.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill auto-triggers on generic conversation-ending phrases like 'bye' or '再见', which can occur casually without the user intending persistent storage. Because the skill writes extracted content to memory files, this broad trigger can cause silent retention of sensitive user data without a clear, fresh consent signal.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Heartbeat-based triggering allows the skill to invoke memory extraction without a direct user action in the current interaction. This creates a background persistence mechanism that can save conversation details unexpectedly, increasing the risk of storing sensitive information without awareness or approval.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill description and primary trigger phrases are defined in Chinese, and the prescribed success output is also fixed in Chinese. The file does not indicate that output language should follow the user's preference or provide any language opt-in, which can violate language-choice policy for general-purpose skills.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says the skill will extract key memories into files, but it does not clearly warn users that conversation content may be automatically persisted to disk and indexed. Users may not understand that ordinary dialogue, including potentially sensitive details, will be retained beyond the session.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is designed to proactively read conversation context and persist extracted details into topic files and an index, creating long-term storage of user-provided information. Even without overtly malicious intent, this expands data retention and can capture sensitive material that was only meant for transient conversational use.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction to read an unrestricted number of recent messages broadens the scope of data collection beyond what is necessary for a single explicit request. This increases the chance that unrelated or sensitive content from the session is retained in memory files without the user realizing the full extent of what was processed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The output section mandates a specific Chinese confirmation and Chinese section headings such as '已为您提炼本轮记忆' and '提炼结果'. There is no instruction to adapt the response language to the user's locale or prior conversation language, so the skill imposes a language choice without opt-in.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatic extraction at conversation end or on heartbeat creates silent persistence of user data without a fresh request at the time of writing. In context, this is more dangerous because the skill's core function is long-term retention, so autonomous triggers turn a convenience feature into a covert data collection mechanism.

Content

No source excerpt is available for this finding.