T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:94
- Finding
- Plaintext Retention of Complete Conversations and User Preferences## Vulnerability Details **File Location**: `SKILL.md:94-113` **Additional Locations**: `SKILL.md:31-40`, `SKILL.md:190-195`, `examples/daily-workflow.sh:42-47` **Vulnerability Type**: Unprotected storage of potentially sensitive conversation data **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:94-113`: ```markdown ### Step 2: Daily Workflow **Every day**, the AI should: 1. **Write to `memory/YYYY-MM-DD.md`** - Summary of today's work - Decisions made - Tasks completed 2. **Backup conversation to `AI-memory-backup/backup-YYYYMMDD.md`** - Full transcript - Important context - User preferences learned 3. **Update relevant `topic-memory/` folders** - Add new documents to projects - Update decision records - Consolidate knowledge ``` Supporting implementation guidance from `examples/daily-workflow.sh:42-47`: ```bash # Dimension 2: Backup conversation echo "💬 Dimension 2: Conversation Backup" echo "To backup today's conversation:" echo " 1. Copy entire chat transcript" echo " 2. Save to: AI-memory-backup/backup-${YEAR}${MONTH}${DAY}.md" echo " 3. Include: user messages, AI responses, key decisions" echo "" ``` The declared data scope in `SKILL.md:31-40` includes: ```markdown ### Dimension 2: Conversation Stream ``` ```markdown **Purpose**: Full context preservation, searchable dialogue history **Update frequency**: Per conversation **Content**: Every word exchanged, including user messages and AI responses ``` ### Technical Analysis The Skill explicitly directs the agent or user to retain every exchanged message, important context, and learned user preferences in ordinary Markdown files. It provides no controls for identifying or redacting credentials, authentication tokens, personal information, confidential business data, or other secrets before persistence. The workflow also lacks explicit consent checks, restrictive file permissions, encryption, retention limits, secure deletion procedures, and isolati ...[truncated 1891 chars]
- Remediation
- ## Remediation Suggestions 1. Store concise, user-approved summaries by default instead of complete transcripts. 2. Require explicit opt-in before retaining full conversations or inferred preferences. 3. Add automated redaction for passwords, API keys, access tokens, private keys, financial details, and personal information. 4. Warn users never to place secrets in persistent memory and provide a review step before writing files. 5. Create storage with owner-only permissions, such as mode `0600` for files and `0700` for directories. 6. Encrypt sensitive transcript data at rest using keys managed outside the workspace. 7. Establish configurable retention periods and secure deletion procedures. 8. Exclude memory directories from version control, public archives, and cloud synchronization by default. 9. Treat restored transcript text as untrusted data, not executable instructions, and clearly separate quoted conversation content from agent configuration or persistent rules. 10. Document how users can inspect, export, redact, and delete retained data.
