T09 · Insecure Skill Coding Practices
- Location
SKILL.md:20- Finding
Sensitive family health records are stored in an unprotected plaintext JSON file
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:20,SKILL.md:46-47, and sensitive-data schema atSKILL.md:52-140
Vulnerability Type: Plaintext storage of sensitive medical and identifying information
Risk Level: MediumVulnerable Code Snippets
SKILL.md:20:markdown This skill directs the assistant to read from and write to a single local file (`health-data.json`) in the user's working directory. It does not instruct the assistant to use email tools, browser automation, web search, or any external service. The skill itself ships no executable code, runs no background processes, makes no network calls, and has no telemetry. The assistant should not transmit any health data outside the local tracker file unless the user explicitly asks for that (e.g., asking for a printable summary to share with a doctor).SKILL.md:46-47:markdown ## Data Persistence All data is stored in `health-data.json` in the skill's data directory.Representative sensitive fields from
SKILL.md:52-140:json { "family": [ { "id": "unique-id", "name": "Emma", "relationship": "daughter", "dateOfBirth": "2018-05-12", "bloodType": "", "allergies": [ { "allergen": "Penicillin", "reaction": "Hives", "severity": "moderate", "diagnosed": "2020-03-15", "notes": "" } ], "medications": [ { "name": "Zyrtec", "dosage": "5mg", "frequency": "daily", "prescribedBy": "Dr. Patel", "startDate": "2024-09-01", "refillDate": "2026-04-15", "pharmacy": "CVS on Main", "notes": "Seasonal allergies, spring through fall" } ], "insurance": { "carrier": "Blue Cross", "planType": "PPO", "groupNumber": "", "memberIdLast4 ...[truncated 2747 chars]- Remediation
View remediation
Remediation Suggestions
- Define one unambiguous application-private storage location rather than using the current working directory.
- Create the data file with owner-only permissions, such as mode
0600on POSIX systems, and verify ownership and permissions before every read or write. - Encrypt health records at rest with an authenticated encryption algorithm. Store the encryption key in the operating system keychain or another dedicated secrets facility, not beside the data file.
- Warn users and require confirmation before storing data in shared, synchronized, temporary, or version-controlled directories.
- Recommend adding
health-data.jsonand related temporary or backup files to version-control ignore rules. - Use atomic writes through a securely created temporary file in the same protected directory, then replace the destination to avoid partially written or broadly accessible copies.
- Document secure backup, export, retention, and deletion procedures.
- Minimize retained data and provide controls to delete individual records or the entire tracker.
- Ensure generated summaries and exports inherit similarly restrictive permissions and require user review before disclosure.
