T09 · Insecure Skill Coding Practices
- Location
memory-template.md:3- Finding
Predictable Plaintext Storage of Sensitive Mental-Health Records
- Content
View full analysis
Vulnerability Details
File Location:
memory-template.md:3-48(related storage instructions also appear inSKILL.md:22-32,SKILL.md:49-52,SKILL.md:120-122, andsetup.md:42-49)
Vulnerability Type: Sensitive information stored in plaintext without defined access controls
Risk Level: MediumVulnerable Code Snippet
markdown Create `~/anxiety/memory.md` with this structure: ```markdown # Anxiety Memory ## Status status: ongoing version: 1.0.0 last: YYYY-MM-DD integration: pending | complete | paused | never_ask ## Active Mode mode: track | reduce | recover primary_goal: secondary_goal: ## Baseline Snapshot typical_trigger_windows: common_body_signals: peak_intensity_range: usual_episode_duration: ## Trigger and Behavior Patterns top_triggers: avoidance_patterns: safety_behaviors: helpful_coping: ## Active Plan plan_start: this_week_focus: next_check_in: current_exposure_step: ## Escalation Preferences urgent_contact_flow: preferred_language_in_crisis: professional_support_status: ## Notes - Confirmed patterns - Failed tactics to avoid repeating - Open questions for therapy or medical follow-up --- *Updated: YYYY-MM-DD*text The broader storage design additionally creates predictable Markdown files for anxiety events, thought records, trigger maps, exposure outcomes, and weekly reviews under `~/anxiety/`. ### Technical Analysis The Skill directs the agent to persist highly sensitive mental-health information in ordinary Markdown files at a fixed, predictable path. The instructions do not require owner-only permissions, encryption at rest, protection from indexing or backups, retention limits, or secure deletion. User confirmation before writing is a useful consent control, but it does not protect the resulting records after creation. Depending on the host's default umask and filesystem configuration, files may be accessible ...[truncated 1601 chars]- Remediation
View remediation
Remediation Suggestions
- Create
~/anxiety/with owner-only permissions equivalent to0700. - Create all record files with owner read/write permissions equivalent to
0600, without relying solely on the host's default umask. - Verify existing permissions before every write and refuse or warn when the directory is writable or readable by unintended principals.
- Offer encrypted storage using a platform credential vault or a user-controlled encryption key.
- Provide a session-only mode that does not persist records and make it the recommended option for users who do not need longitudinal tracking.
- Clearly disclose that plaintext files may be indexed, synchronized, or included in backups before obtaining write consent.
- Minimize stored content, especially crisis preferences and detailed thought records, to information strictly necessary for future support.
- Define configurable retention periods and provide explicit deletion, export, and secure cleanup workflows.
- Avoid storing records in cloud-synchronized directories unless the user explicitly opts in after receiving a privacy warning.
- Create
