T09 · Insecure Skill Coding Practices
Warning
- Location
- setup.md:7
- Finding
- Persistent Plaintext Storage of Sensitive Travel and Booking Data<![CDATA[ ## Vulnerability Details **File Location**: `setup.md:7-13`, `setup.md:24-25`, `memory-template.md:4-18`, and `memory-template.md:42-45` **Vulnerability Type**: Plaintext sensitive-data storage without explicit access-control or data-minimization safeguards **Risk Level**: Medium ### Vulnerable Code From `setup.md:7-13`: ```markdown ### 1. Create Memory Structure ```bash mkdir -p ~/portugal ``` ### 2. Initialize Memory File Create `~/portugal/memory.md` using the template from `memory-template.md`. ``` From `setup.md:24-25`: ```markdown ### 4. Save to Memory Update `~/portugal/memory.md` with their answers. ``` From `memory-template.md:4-18`: ```markdown - **Planning stage:** [researching / booked / traveling / completed] - **Last updated:** YYYY-MM-DD ## Trip Details - **Dates:** - **Duration:** - **Regions:** [Lisbon / Porto / Algarve / Douro / Sintra / Azores / Madeira / Alentejo] - **Travelers:** [solo / couple / family / group] - **Kids:** [yes (ages) / no] ## Preferences - **Travel style:** [foodie / beach / culture / adventure / relaxed / nightlife] - **Budget:** [budget / mid-range / luxury] - **Dietary:** [none / vegetarian / vegan / gluten-free / seafood-only / other] - **Mobility:** [full / limited / wheelchair] ``` From `memory-template.md:42-45`: ```markdown ## Bookings Made | What | Where | Date | Confirmation | |------|-------|------|--------------| | | | | | ``` ### Technical Analysis The Skill directs the agent to create a persistent file under `~/portugal/` and populate it with user-provided information. The template includes exact travel dates and destinations, children's presence and ages, dietary restrictions, mobility information, and booking confirmation values. The setup procedure uses `mkdir -p` but does not explicitly establish owner-only permissions for the directory or memory file. Actual accessibility therefore depends on the host's umask, ownership, filesystem configuration, backup policy, and access gran ...[truncated 2000 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require explicit user consent before creating persistent memory or saving personal trip information. 2. Remove the `Confirmation` field and instruct the agent never to store booking references, authentication data, payment information, passport details, or credentials. 3. Minimize stored data by using approximate travel periods and broad preferences unless exact values are necessary. 4. Create storage with owner-only permissions, for example: ```bash install -d -m 700 "$HOME/portugal" install -m 600 /dev/null "$HOME/portugal/memory.md" ``` 5. Verify permissions before every read or write and refuse to use a file that is accessible to unintended users. 6. Provide user-facing commands or instructions to inspect, redact, and delete stored memory. 7. Establish a retention policy that removes completed-trip information after a defined period. 8. Warn users that home-directory backup or synchronization services may replicate the file. 9. If sensitive itinerary details must be retained, use an appropriate encrypted storage mechanism rather than an ordinary Markdown file. ]]>
