T02 · Agent Memory Poisoning
- Location
- SKILL.md:147
- Finding
- Excessive Persistent Capture of Conversations and Personal Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:147-175`, `SKILL.md:181-210`, `assets/AGENTS.md:11-17`, and `assets/ONBOARDING.md:31-75` **Vulnerability Type**: Excessive persistent memory collection and automatic reuse **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:147-175`: ```markdown ### Trigger — SCAN EVERY MESSAGE FOR: - ✏️ **Corrections** — "It's X, not Y" / "Actually..." / "No, I meant..." - 📍 **Proper nouns** — Names, places, companies, products - 🎨 **Preferences** — Colors, styles, approaches, "I like/don't like" - 📋 **Decisions** — "Let's do X" / "Go with Y" / "Use Z" - 📝 **Draft changes** — Edits to something we're working on - 🔢 **Specific values** — Numbers, dates, IDs, URLs ### The Protocol **If ANY of these appear:** 1. **STOP** — Do not start composing your response 2. **WRITE** — Update SESSION-STATE.md with the detail 3. **THEN** — Respond to your human ``` `SKILL.md:181-210`: ```markdown **Purpose:** Capture EVERY exchange in the danger zone between memory flush and compaction. ### How It Works 1. **At 60% context** (check via `session_status`): CLEAR the old buffer, start fresh 2. **Every message after 60%**: Append both human's message AND your response summary 3. **After compaction**: Read the buffer FIRST, extract important context 4. **Leave buffer as-is** until next 60% threshold ... **The rule:** Once context hits 60%, EVERY exchange gets logged. No exceptions. ``` `assets/AGENTS.md:11-17`: ```markdown Before doing anything: 1. Read `SOUL.md` — who you are 2. Read `USER.md` — who you're helping 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context 4. In main sessions: also read `MEMORY.md` Don't ask permission. Just do it. ``` `assets/ONBOARDING.md:31-75`: ```markdown ### 1. Identity **What should I call you?** **What's your timezone?** ### 2. Communication **How do you prefer I communicate? (direct/detailed/brief/casual)** **Any pet peeves I should avoid?** ### 3 ...[truncated 3087 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make persistent memory opt-in and clearly explain what categories of data will be stored. 2. Replace complete exchange logging with structured, minimal task summaries. 3. Add mandatory redaction for passwords, API keys, tokens, private keys, session cookies, authorization headers, financial data, and sensitive identifiers. 4. Do not persist external content verbatim. Store only a neutral summary marked as untrusted data. 5. Separate memory data from instruction-bearing files so stored content cannot become executable agent policy. 6. Introduce configurable retention periods and automatic expiration. 7. Provide commands to inspect, edit, export, and permanently delete retained information. 8. Apply restrictive filesystem permissions to memory files and exclude them from source control and shared indexing. 9. Require confirmation before storing sensitive personal details, relationship information, or complete conversations. 10. Remove absolute language such as “EVERY exchange” and “No exceptions”; permit the agent to skip sensitive or irrelevant content. ]]>
