T09 · Insecure Skill Coding Practices
Warning
- Location
- setup.md:12
- Finding
- Plaintext Persistence of Sensitive Health and Behavioral Data## Vulnerability Details **File Location**: `setup.md:12-14`, `setup.md:20-31`, `memory-template.md:1-3`, and `memory-template.md:20-39` **Vulnerability Type**: Sensitive information stored in plaintext without defined access controls **Risk Level**: Medium ### Vulnerable Code Snippets From `setup.md:12-14`: ```markdown 1. Read `~/Clawic/data/fasting/config.yaml` if it exists. Apply its values. 2. For anything absent, use the defaults in the Configuration table of `SKILL.md` — do not ask. 3. Read `~/Clawic/data/fasting/log.md` for the active fast and history, and `memory.md` for prior context (goal, schedule, symptom history). Absence is fine; proceed without comment. ``` From `setup.md:20-31`: ```markdown Write to config or memory **only** when the user states a preference in the course of the work — never as a preflight questionnaire. - User names a protocol, window, strictness, or units → update the matching key in `~/Clawic/data/fasting/config.yaml`. - User rules on a gray-zone item ("gum doesn't count for me") → record it under strictness rulings; it overrides the `tracking.md` table for that item from then on. - User reveals a goal, religious observance, measuring device, or training pattern → record it under the matching preference area (goal, observance, metrics, training, tone). - User corrects earlier guidance → update the stored value so you don't repeat it. If the user has said nothing, store nothing. ## What Memory Holds See `memory-template.md` for the file formats. Track their goal, typical schedule, symptom history and what resolved it, and which framing they respond to — but only from what they actually reveal. ``` From `memory-template.md:1-3`: ```markdown # Memory Template — Fasting Files under `~/Clawic/data/fasting/`: `config.yaml` (declared preferences, keys from the SKILL.md Configuration table), `log.md` (the fast log), `memory.md` (observed context). Config is what the user de ...[truncated 3083 chars]
- Remediation
- ## Remediation Suggestions 1. Require explicit, informed user consent before persisting symptom history, religious observance, schedules, or other sensitive context. 2. Minimize stored data. Keep only fields required for active fasting calculations and avoid free-form health-history notes by default. 3. Create `~/Clawic/data/fasting/` with user-only permissions, such as mode `0700`, and create data files with mode `0600`. 4. Validate that existing files are not symbolic links and are owned by the current user before reading or writing them. 5. Use atomic writes with securely created temporary files in the same protected directory. 6. Provide configurable retention periods and automatic pruning of old logs and symptom history. 7. Provide a clear command or documented process for viewing, exporting, and permanently deleting all stored data. 8. Consider encryption at rest for sensitive context when the host platform offers secure key storage. 9. Document whether backup or synchronization software may copy these files and allow users to disable persistence entirely. 10. Separate minimally necessary operational state from optional sensitive memory so users can retain fast timing without retaining health or observance history.
