T09 · Insecure Skill Coding Practices
- Location
SKILL.md:143- Finding
Sensitive Health and Nutrition Data Stored in Predictable Plaintext Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 143-225
Vulnerability Type: Plaintext storage of sensitive user data
Risk Level: MediumThe Skill instructs the Agent to persist body measurements, menstrual-cycle information, allergies, dietary preferences, nutrition targets, and meal history in unencrypted JSON files at predictable locations.
text ## User Profile Storage When the user wants persistence, store profile data locally: ```text ~/nutrition-data/profile.jsonUse this structure:
json { "sex": "female", "age": 29, "height_cm": 168, "weight_kg": 62, "body_fat_percent": 25, "activity_level": "moderate", "goal": "fat_loss", "cycle": { "average_length_days": 28, "last_period_start": "2026-06-01" }, "allergies": [], "intolerances": [], "disliked_foods": [], "dietary_preferences": [] }Before writing or updating local files, explain what will be stored and ask for confirmation.
Daily Food Log
Store daily logs locally by date:
text ~/nutrition-data/daily-logs/YYYY-MM-DD.jsonUse this structure:
json { "date": "2026-06-28", "target": { "calories": 1650, "protein": 120, "carbs": 150, "fat": 50, "fiber": 30 }, "meals": [ { "id": "m1", "type": "breakfast", "time": "08:15", "items": [ { "name": "oats, dry", "amount_g": 40, "calories": 156, "protein": 6.8, "carbs": 26.4, "fat": 2.8, "fiber": 4.1 } ], "total": { "calories": 156, "protein": 6.8, "carbs": 26.4, "fat": 2.8, "fiber": 4.1 }, "feeling": null, "feeling_time": null } ], "water_ml": 1200, "water_target_ml": 2100, "summary": { "calories": 1 ...[truncated 2047 chars]- Remediation
View remediation
Remediation Suggestions
- Make session-only handling the default and persist data only after explicit, field-specific consent.
- Explain which fields will be stored, their destination, retention period, and deletion procedure before writing.
- Minimize persisted data and omit cycle, allergy, and other health-related fields unless they are necessary for a requested feature.
- Create
~/nutrition-datawith owner-only permissions such as0700, and create each record with permissions such as0600. - Encrypt sensitive records using an OS-backed key store or another established secret-management facility; do not store encryption keys beside the records.
- Use atomic file creation and updates to prevent temporary or partially written copies from receiving weaker permissions.
- Define automatic retention limits and provide a command or workflow that securely deletes individual logs and the complete profile.
- Warn users that filesystem backups and synchronization tools may copy the records beyond the original device.
- Validate that storage paths remain inside the intended user-owned directory and do not follow attacker-controlled symbolic links.
