T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:19
- Finding
- Sensitive Health Profile Data Stored Without Explicit Filesystem Protections## Vulnerability Details **File Location**: `SKILL.md`, lines 19–26 and 96–126 **Vulnerability Type**: Plaintext storage of sensitive personal and health-related data **Risk Level**: Medium ### Vulnerable Code ```markdown ## Data Storage All ClawCoach data is stored in `~/.clawcoach/` as JSON files. Create this directory if it does not exist. Files: - `~/.clawcoach/profile.json` — user profile and preferences - `~/.clawcoach/food-log.json` — meal log entries - `~/.clawcoach/daily-totals.json` — cached daily macro totals ``` The stored profile is instructed to include sensitive personal and health-related fields: ```json { "name": "...", "age": 30, "gender": "male", "height_cm": 180, "weight_kg": 82, "goal_weight_kg": 78, "goal_type": "lose_weight", "activity_level": "moderately_active", "daily_calories": 2150, "daily_protein_g": 148, "daily_fat_g": 60, "daily_carbs_g": 235, "restrictions": ["none"], "allergies": ["none"], "dislikes": [], "persona": "savage_roaster", "setup_complete": true, "setup_date": "2026-02-22" } ``` ### Technical Analysis The skill directs the agent to persist the user's identity, age, gender, body measurements, weight goals, dietary restrictions, allergies, and nutrition targets in ordinary JSON files. It does not require restrictive permissions for the storage directory or files, encryption at rest, secure atomic file creation, or verification of resulting ownership and permissions. Consequently, access controls depend entirely on the host's existing umask and filesystem configuration. In an environment with permissive defaults, shared home-directory access, insecure backups, or broadly authorized local processes, the data may be readable by parties beyond the intended user. Plaintext JSON also makes the information directly intelligible if the files are disclosed. This is an insecure data-storage practice rather th ...[truncated 1691 chars]
- Remediation
- ## Remediation Suggestions 1. Create `~/.clawcoach/` with mode `0700` and verify that it is owned by the current user. 2. Create profile, log, and cache files with mode `0600`, independent of the ambient umask. 3. Use secure atomic writes: create a same-directory temporary file with restrictive permissions, write and flush the content, then atomically rename it to the destination. 4. Refuse to write through symbolic links and verify that existing paths are regular files owned by the expected user. 5. Clearly disclose before collection that the information will be retained as local plaintext unless encryption is enabled. 6. Offer encryption at rest using an operating-system credential store or a user-controlled key, especially for allergy, body-measurement, and meal-history data. 7. Provide a non-persistent mode and allow users to omit or delete individual fields. 8. Define retention and secure-deletion behavior for profile, meal-log, cache, reset, and reconfiguration operations. 9. Avoid including these files in cloud synchronization or backups by default, or clearly warn users when the storage directory is located within a synchronized or shared environment.
