T02 · Agent Memory Poisoning
- Location
references/01-layered-storage.md:196- Finding
Persistent Instruction Injection Through Automatically Loaded Memory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a disclosed local memory-management skill, but it needs review because it can persist behavior-shaping memory and its secret-file scanner can miss some plaintext credentials.
Review this before installing if you will let it write persistent agent memory. Use it only in a workspace where you control the memory files, inspect behavioral rules before they are auto-loaded, avoid storing real secrets in SECRET.md, and do not rely on the included scanner as the only credential-safety control until the Markdown-line bypass is fixed.
references/01-layered-storage.md:196Persistent Instruction Injection Through Automatically Loaded Memory
scripts/secret_control.py:54Plaintext Credential Detection Bypass Through Ignored Markdown Lines
scripts/migrate_secret.py:107Time-of-Check to Time-of-Use Race in Secret Migration
Handling SECRET.md, scanning for credential patterns, and enforcing chmod 0600 are materially different from ordinary memory-organization tasks and affect sensitive assets. In this skill context, that makes the mismatch more dangerous because users invoking a memory skill may not realize they are authorizing operations over credential stores and file permissions.
Handling SECRET.md, scanning for credential patterns, and enforcing chmod 0600 are materially different from ordinary memory-organization tasks and affect sensitive assets. In this skill context, that makes the mismatch more dangerous because users invoking a memory skill may not realize they are authorizing operations over credential stores and file permissions.
Handling SECRET.md, scanning for credential patterns, and enforcing chmod 0600 are materially different from ordinary memory-organization tasks and affect sensitive assets. In this skill context, that makes the mismatch more dangerous because users invoking a memory skill may not realize they are authorizing operations over credential stores and file permissions.
Handling SECRET.md, scanning for credential patterns, and enforcing chmod 0600 are materially different from ordinary memory-organization tasks and affect sensitive assets. In this skill context, that makes the mismatch more dangerous because users invoking a memory skill may not realize they are authorizing operations over credential stores and file permissions.
The presence of self-rewrite behavior is materially risky because the skill is explicitly designed to modify agent memory and self-referential state, including growth-journal, user, and relationship artifacts. Even though the eval mentions guardrails and excludes SOUL.md, self-modification mechanisms can amplify errors, persist poisoned inputs, or entrench manipulated beliefs if activation, evidence gating, or rollback controls fail.
"id": 2,
"category": "primary-path",
"prompt": "记忆巩固怎么执行?我要跑一次每日巩固",
"expected_output": "Describes the four-phase consolidation flow (Phase 0 safety guard / snapshot backup, Phase 1 fact consolidation / scan+score+promote, Phase 2 self-rewrite / growth-journal+user+relationship update, Phase 3 validation and rollback). References the consolidation manual.",
"files": [
"references/03-consolidation-guard.md",
"references/09-consolidation-manual.md"
The manifest describes a mentor skill for layered agent memory management, consolidation, promotion, rollback, indexing, and retrieval planning using local files and optional semantic retrieval. This script instead scans and rewrites a SECRET.md file, validates secret-migration plans, and replaces plaintext secrets with secret:// locators, which is a separate secret-handling capability not justified by the memory-system description.
The file begins with a Chinese heading ('版本历史') even though the rest of the changelog includes mixed English terminology, and there is no indication that Chinese is optional or required for a specific regional/compliance reason. This creates a natural-language locale policy concern because the skill documentation implicitly imposes a language choice without user opt-in.
The skill advertises operational capabilities involving local files, optional retrieval, and deployment workflows, but it declares no explicit tool scope or permissions. For an agent skill, missing scope boundaries can cause the host to grant broader-than-necessary access or make reviewers unable to verify whether file, shell, or network operations are intended, increasing the risk of unauthorized filesystem changes or data exposure.
The file consistently mandates Chinese-language interaction in its natural-language instructions and descriptions, but does not state that this skill is region-specific or provide user opt-in for language selection. This can violate organizational language/locale policy when skills are expected to be usable without forcing a specific language.
Phrases like "主动探索与认知拉伸", "自我认知演化", "Agent 反思自己", and similar conceptual language are ambiguous and may match broad reflective or advisory discussions rather than deliberate requests to run a memory-management skill. In a skill that can initialize, repair, consolidate, roll back, or retrieve memory, ambiguous activation expands the chance of unintended execution and unsafe state changes.
The trigger phrases "记住这条" and "记一下" are broad, everyday expressions that can appear in normal conversation without any explicit intent to invoke this skill. Because this skill performs memory operations, accidental activation could cause unintended recording, consolidation, or other stateful actions that affect agent memory and privacy.
This markdown template uses Chinese-only headings and instructions, which imposes a specific language on users. The file does not indicate that the language is optional, configurable, or limited to a justified region-specific context.
This markdown template is written entirely in Chinese and provides no indication that language selection is optional or tied to a justified region-specific use case. That can constitute a language/locale policy violation because it implicitly requires use of a specific language without user opt-in.
The file's visible user-facing content is entirely in Chinese, including the title and template labels, with no indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-language context. This creates a natural-language policy concern because it implicitly enforces a specific locale without opt-in.
The user-facing policy text in lines L3-L5 is written only in Chinese, which imposes a specific language for understanding the skill file without offering any language choice or opt-in. The rules require flagging language or locale policy violations when a skill forces a specific language without user choice or clear justification.
The file is entirely written in Chinese and defines core identity instructions in that language without any indication that language selection is optional or user-driven. This can violate a language/locale policy requiring user choice or opt-in rather than imposing a fixed language.
The entire template is written in Chinese and does not indicate that users may choose another language or locale. Under the policy, language constraints should be optional or clearly justified; this file provides neither.
Lines L03-L05 state user-facing positioning guidance entirely in Chinese and describe the file as material for users/readers, but there is no indication that Chinese is optional or that the skill is region-specific. This creates a natural-language policy concern because it imposes a specific language on user-facing content without opt-in.
The eval at this location uses a broad, natural-language trigger phrase that is likely to appear in ordinary conversation, which can cause the skill to activate when the user is merely chatting rather than intentionally invoking memory operations. In a skill that can write to persistent memory, unintended activation increases the risk of unauthorized recording, misrouting, or state changes based on ambiguous user input.
This generic activation phrase is dangerous because it can be satisfied by many unrelated user requests, causing the skill to trigger outside its intended scope. Since this skill governs persistent agent memory and related workflows, accidental invocation can lead to inappropriate memory writes, secret-handling paths, or transactional recovery flows being entered without clear user consent.
Urgent everyday wording like this is especially collision-prone because users commonly say 'quickly remember this' or similar phrases in ordinary dialogue. In the context of a self-evolving memory skill, such vagueness can silently convert casual statements into persisted memory entries, making the risk higher than in a read-only assistant skill.
The entire skill specification is written in Chinese and includes prescribed user-facing trigger phrases and operational instructions only in Chinese, with no indication that the user may choose another language. This creates a natural-language locale constraint without opt-in or justification, which matches the policy-violation category for language or locale restrictions.
The entire skill document is written in Chinese and presents the protocol and file conventions exclusively in that language, with no indication that users may choose another language or that the skill is limited to a Chinese-language context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.
This markdown file presents all instructions and examples exclusively in Chinese, and it does not indicate that the user opted into that language or that the skill is limited to a Chinese-speaking context. Under the language/locale policy rule, forcing a specific language without opt-in is a natural-language policy concern.
The entire skill document is written in Chinese and provides no indication that users may choose another language or that the locale restriction is intentional for a region-specific use case. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
No suspicious patterns detected.