Back to skill

Security audit

Memory Bridge

Security checks for vulnerabilities and agentic risk

Overview

This persistent memory skill is clear about its purpose, but it stores and reloads personal conversation context in plaintext with weak consent, privacy, and cleanup controls.

Install only if you want Chinese-language persistent memory and are comfortable with local Markdown files storing personal context across sessions. Do not put passwords, API keys, private keys, financial data, or sensitive personal details in these memory files; review and delete the workspace memory files regularly if you use it.

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
templates/MEMORY.md:3
Finding

Persistent Memory Poisoning Through Untrusted Conversation Content

Content
View full analysis

Vulnerability Details

File Location: templates/MEMORY.md:3-10; related behavior is defined in templates/memory/SESSION-STATE.md:3-4, templates/memory/working-buffer.md:3-4, and SKILL.md:101-125
Vulnerability Type: Persistent storage and automatic reloading of untrusted instructions
Risk Level: Medium

md
<!-- This is the only file automatically loaded in a new session; keep it minimal -->
<!-- Detailed content is stored under memory/ and .learnings/ and is read when needed -->

- **Name:**
- **Preferences:**
- **Current task:** `memory/current-handoff.md`
- **Key records:** `memory/entities.md`
- **Lessons/errors:** `.learnings/`

Related persistence directives include:

md
> WAL protocol: write before answering
> Record every important item provided by the owner here before replying
md
> When context usage is at least 60%, record each conversation here
> After context compression, read this file first

Technical Analysis

The skill directs the agent to persist user-supplied preferences, corrections, tasks, entities, lessons, and conversation summaries. These records are subsequently loaded automatically or conditionally into later agent sessions.

The design does not define a trust boundary between stored data and executable agent instructions. It also does not require instruction neutralization, schema validation, escaping, provenance tracking, or confirmation before behavioral content is persisted. Consequently, an attacker-controlled statement can be stored as a preference, lesson, task, or contextual summary and later interpreted as an operative instruction rather than untrusted reference data.

This creates a cross-session prompt-injection surface. Although the project contains no executable payload or direct system-level persistence mechanism, persisted natural-language directives can continue to influence agent behavior after the ori ...[truncated 1488 chars]

Remediation
View remediation

Remediation Suggestions

  1. Store memory in a strict structured schema rather than unrestricted free-form text.
  2. Treat every recalled entry as untrusted reference data and explicitly prohibit stored content from overriding system, developer, security, or tool-use rules.
  3. Reject or quarantine entries containing role changes, policy overrides, commands, tool instructions, credential requests, or attempts to alter future agent behavior.
  4. Separate factual memory from behavioral preferences and require explicit user confirmation before saving behavioral directives.
  5. Record provenance, creation time, source session, and approval status for each memory entry.
  6. Require confirmation before following task references or loading potentially instruction-bearing records.
  7. Provide per-entry inspection, editing, expiration, and deletion controls.
  8. Apply retention limits and periodically remove stale or unverified entries.
  9. When presenting recalled information to the model, wrap it in a clearly delimited block labeled as untrusted data that must not be executed as instructions.

T09 · Insecure Skill Coding Practices

Warning
Location
templates/memory/SESSION-STATE.md:3
Finding

Overbroad Plaintext Retention of User and Conversation Data

Content
View full analysis

Vulnerability Details

File Location: templates/memory/SESSION-STATE.md:3-11; related collection behavior appears in templates/memory/working-buffer.md:3-10 and templates/USER.md:3-7
Vulnerability Type: Insecure persistent storage of potentially sensitive conversation data
Risk Level: Medium

md
# Session State (WAL Log)

> WAL protocol: write before answering
> Record every important item provided by the owner here before replying

---

## Recent Records

<!-- Format: time | type | content -->
<!-- Types: correction / term / preference / decision / draft modification / concrete value -->

The working-buffer template further directs:

md
# Working Buffer

> When context usage is at least 60%, record each conversation here
> After context compression, read this file first

---

## Records

<!-- Format: a one- or two-sentence summary of what the owner said and what I replied -->

Technical Analysis

The templates direct the agent to retain important user information and, under the working-buffer rule, summaries of every conversation after a context threshold is reached. The retained categories include preferences, decisions, draft changes, concrete values, user-profile information, and conversation content.

No controls are specified for secret detection, personal-data minimization, encryption, restrictive filesystem permissions, retention periods, automatic expiration, or per-entry consent. Sensitive information disclosed during normal interaction could therefore be written to plaintext workspace files and remain available after the originating session.

This is an insecure data-handling practice rather than demonstrated exfiltration. The audited project contains no network endpoint or code that transmits the stored information externally.

Attack Path

  1. A user provides sensitive information during a conversation, such as a credential, p ...[truncated 1203 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit opt-in before enabling persistent conversation memory.
  2. Never persist passwords, API keys, access tokens, private keys, authentication cookies, financial data, or other designated sensitive information.
  3. Add automated secret and personal-data detection before every write, with redaction or write rejection as the default behavior.
  4. Replace the instruction to record every conversation with narrowly scoped, user-approved summaries.
  5. Apply restrictive filesystem permissions so memory files are accessible only to the intended account.
  6. Encrypt sensitive persisted data at rest using keys stored separately from the workspace.
  7. Define short retention periods for session logs and working buffers, followed by secure automatic deletion.
  8. Provide clear inspect, export, edit, and delete controls for all retained information.
  9. Inform users what categories are stored, why they are stored, and how long they remain.
  10. Exclude memory files from shared repositories, telemetry, logs, and unprotected backups by default.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs automatic loading of persistent memory files and presenting retained personal/contextual information back to the user without an adequate privacy warning or explicit opt-in. This creates a meaningful privacy risk because sensitive user data may be stored and surfaced across sessions unexpectedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide states that persistent memory files under the user's home workspace will be automatically read in future sessions, but it does not warn users not to place secrets, credentials, or sensitive personal data there. In an agent-skill context, automatically ingesting prior-session files increases the chance of unintended disclosure to the model or to downstream tools if those files are later surfaced, summarized, or transmitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill description, trigger phrases, and example user-facing prompts are presented only in Chinese, including the activation phrases the user is expected to say. There is no indication that the user can choose another language or that the locale restriction is intentional and justified for a region-specific use case.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match ordinary requests about memory or asking the AI to remember something, which can cause the skill to activate without clear user intent. In this skill, accidental activation is more dangerous because activation leads to persistent file reads/writes and cross-session retention of user data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The first-activation flow directs the AI to create directories and copy templates into the user's workspace, but does not provide a clear warning that the filesystem will be modified. Silent or poorly disclosed file creation can violate user expectations and establish persistent state that later affects model behavior.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill directs the AI to persist and later surface user identity, preferences, task state, and past mistakes across sessions, with weak minimization and no clear consent boundaries. Because the workflow automatically reads those files at session start, any stored sensitive material can be unexpectedly exposed or influence subsequent interactions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The conversation rules require routine logging of preferences, corrections, teachings, and notable entities into persistent files, which expands the amount of personal and contextual data accumulated over time. This increases privacy risk and can create a durable profile of the user without clear boundaries, review, or deletion controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all user-facing instructions and labels exclusively in Chinese, which can impose a language requirement on users without opt-in. The policy specifically calls for flagging language or locale constraints unless the skill offers a choice or clearly justifies the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file explicitly mandates Chinese-language interaction and a 'write-before-reply' behavior without any indication of user consent or runtime opt-in. This can override user preferences and system behavior, creating prompt-control issues and causing the agent to persist conversation data in memory before responding, which can also amplify privacy and safety risks in downstream use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire template is written in Chinese, including the title and section prompts, with no indication that the user can choose another language or that the file is intended only for a Chinese-language context. This creates a natural-language locale policy issue because the skill appears to impose a specific language by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file instructs operation in Chinese and says the agent should read this file first after context compression, which can bias behavior without explicit user consent. This creates a prompt-level control channel that may override user language preference and influence subsequent responses in ways the user did not request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The deletion guidance tells users to remove MEMORY.md and related directories to clear memory, but it omits any warning that this will permanently erase stored context and may remove information the user intended to keep. While not an exploit by itself, destructive file-operation instructions without backup caution can lead to accidental data loss.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file title and instructional comment are presented in Chinese, which imposes a specific language on users by default. The policy allows locale or language constraints only when users are given a choice or when the constraint is clearly justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template uses Chinese headings and instructions throughout, which imposes a specific language on users. The file does not indicate that Chinese is optional, configurable, or required for a justified region-specific purpose.

Content

No source excerpt is available for this finding.