T09 · Insecure Skill Coding Practices
Warning
- Location
- references/memory-templates.md:48
- Finding
- Persistent plaintext storage of personal and operationally sensitive data without explicit local access controls<![CDATA[ ## Vulnerability Details **File Location**: `references/memory-templates.md:48-70`, `references/memory-templates.md:122-150`, and `SKILL.md:749-762` **Vulnerability Type**: Plaintext sensitive-data storage with insufficient access-control guidance **Risk Level**: Medium ### Vulnerable Code ```markdown ## USER.md ```markdown # USER.md - About Your Human - **Name:** [Full Name] - **What to call them:** [Preferred name] - **Role:** [Job title / context] - **Email:** [Email] - **Timezone:** [e.g. America/Chicago] ## Context [1-2 paragraphs: who they are, what they care about, working style] ## Communication Preferences - [Preference 1] - [Preference 2] ## Current Goals - [Goal 1] - [Goal 2] ## Never Assume - [Hard constraint 1] - [Hard constraint 2] ``` ``` ```markdown ## MEMORY.md ```markdown # MEMORY.md - Long-Term Memory > ⚠️ MAIN SESSION ONLY. Do not load in group chats or shared contexts. ## Identity & Self-Knowledge [AGENT_IDENTITY] YYYY-MM-DD: [Founding fact about the agent] ## About [User Name] [ENTITY] YYYY-MM-DD: [User Name] — [role, key context, relationship] [PREFERENCE] YYYY-MM-DD: [User Name] prefers [communication style] ## Key Decisions [DECISION] YYYY-MM-DD: [What was decided and why] ## Lessons Learned [LESSON] YYYY-MM-DD: [What went wrong and the fix] ## Important Facts [FACT] YYYY-MM-DD: [Stable truth about the system or world] ## Episodes [EPISODE] YYYY-MM-DD: [What happened, outcome, significance] ``` ``` The setup instructions create the corresponding files without assigning restrictive permissions: ```bash touch ~/myagent/SOUL.md touch ~/myagent/IDENTITY.md touch ~/myagent/USER.md touch ~/myagent/AGENTS.md touch ~/myagent/MEMORY.md touch ~/myagent/TOOLS.md touch ~/myagent/memory/$(date +%Y-%m-%d).md touch ~/myagent/memory/decisions.md ``` ### Technical Analysis The Skill deliberately stores names, email addresses, working schedules, preferences, client context, decisions, lessons, and operational facts ...[truncated 2464 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Create the workspace and sensitive files with restrictive permissions: ```bash install -d -m 700 ~/myagent install -d -m 700 ~/myagent/memory ~/myagent/scripts ~/myagent/reference install -m 600 /dev/null ~/myagent/SOUL.md install -m 600 /dev/null ~/myagent/IDENTITY.md install -m 600 /dev/null ~/myagent/USER.md install -m 600 /dev/null ~/myagent/AGENTS.md install -m 600 /dev/null ~/myagent/MEMORY.md install -m 600 /dev/null ~/myagent/TOOLS.md install -m 600 /dev/null ~/myagent/memory/decisions.md ``` 2. Where `install` is unavailable, set `umask 077` before creating files and verify permissions afterward. 3. Add a mandatory prohibition against storing passwords, API keys, session tokens, private keys, recovery codes, or raw credential material in memory files. 4. Store only the minimum personal information required for the agent's declared function. Make fields such as email, working hours, and organizational context optional. 5. Add retention and deletion controls for daily notes, stale entity records, and superseded personal information. 6. Provide a default `.gitignore` covering `USER.md`, `MEMORY.md`, daily notes, decision logs, health data, and other private workspace state. 7. Warn users about cloud synchronization and backup exposure. Recommend encrypted storage when memory includes regulated, financial, client, or health-related information. 8. Add a setup verification step that fails or warns when sensitive files are group-readable or world-readable. ]]>
