T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:145
- Finding
- Indiscriminate Persistent Storage of Conversation and Personal Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:145-186` **Related Locations**: `SKILL.md:224-228`, `assets/ONBOARDING.md:36-79`, `assets/USER.md:5-35`, `assets/MEMORY.md:5-44` **Vulnerability Type**: Excessive plaintext retention of conversation data **Risk Level**: Medium ### Vulnerable Code ```markdown **The Law:** You are a stateful operator. Chat history is a BUFFER, not storage. `SESSION-STATE.md` is your "RAM" — the ONLY place specific details are safe. ### 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 **The urge to respond is the enemy.** The detail feels so clear in context that writing it down seems unnecessary. But context will vanish. Write first. **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 ``` The associated templates also persist names, relationships, goals, birthdays, anniversaries, deadlines, projects, and other user context. ### Technical Analysis The Skill mandates persistent writes whenever a message contains broad classes of information, including proper nouns, identifiers, dates, numbers, and URLs. After the context threshold is reached, it expands retention to every exchange. There is no sensitivity classification, secret redaction, all ...[truncated 1980 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make persistent conversation memory explicitly opt-in. 2. Replace the broad “write every specific value” rule with a narrow allowlist of task-state fields. 3. Prohibit storage of passwords, API keys, access tokens, private keys, financial data, health data, session cookies, and authentication URLs. 4. Apply secret detection and redaction before every memory write. 5. Do not log every exchange based solely on context utilization. 6. Ask for consent before retaining personal or third-party relationship information. 7. Define automatic expiration and deletion policies for working buffers and daily notes. 8. Restrict memory-file permissions to the owning user. 9. Provide commands to inspect, export, correct, and delete retained information. 10. Keep task continuity state separate from personal-profile data and credentials. ]]>
