T09 · Insecure Skill Coding Practices
- Location
SKILL.md:20- Finding
Plaintext Persistence and Overbroad Loading of Sensitive Volunteer Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:20-126
Vulnerability Type: Plaintext sensitive-data storage and excessive data loading
Risk Level: MediumVulnerable Code Snippet
text All event data is stored in a structured JSON file called `event-data.json` in the skill's data directory. This file is the single source of truth.json { "ministryTeams": [ { "id": "team-id", "name": "Worship Team", "leadName": "Mike Roberts", "leadContact": "555-222-3333", "members": ["volunteer-id-1", "volunteer-id-2"], "ownsEvents": ["event-id"], "notes": "Rotates every other Sunday" } ], "volunteerRoster": [ { "id": "vol-id", "name": "Sarah Johnson", "contact": "555-111-2222", "skills": ["snacks", "childcare"], "teams": ["team-id"], "blackoutDates": ["2026-07-01", "2026-07-08"], "preferences": "Mornings only. Allergic to nuts (relevant for snack roles).", "recentAssignments": [ { "event": "VBS 2026", "role": "Snack coordinator", "date": "2026-06-15" } ], "burnoutScore": 2 } ] }text ### Persistence Rules - **Read first.** Always load `event-data.json` before responding. - **Write after every change.** Any time data is added, updated, or removed, write immediately. - **Create if missing.** If the file doesn't exist, create it with empty arrays on first use. - **Never lose data.** Merge updates with existing records. Don't overwrite fields the user didn't mention.Technical Analysis
The skill directs the agent to store all event and roster information in a single JSON file. The documented schema includes names, telephone numbers, church or team affiliations, availability dates, assignment history, and health-related constraints such as allergies.
No corresponding controls are defined for restrictive file permissions, encryption at rest, consent before storing ...[truncated 2560 chars]
- Remediation
View remediation
Remediation Suggestions
-
Apply data minimization
- Load only the event, volunteer, vendor, or team records required for the current request.
- Avoid placing the entire database in the active model context.
- Separate operational event data from contact and health-related fields.
-
Protect data at rest
- Require owner-only permissions for the data directory and JSON file, such as mode
0700for the directory and0600for the file on supported systems. - Use authenticated encryption for sensitive fields when the deployment threat model requires protection from local file disclosure.
- Store encryption keys in the operating system credential store, not beside the encrypted data.
- Require owner-only permissions for the data directory and JSON file, such as mode
-
Introduce authorization controls
- Verify that the current operator is authorized before displaying roster-wide, contact, availability, or health-related information.
- Default to redacted contact details in summaries.
- Restrict bulk export and cross-team queries.
-
Obtain consent and limit collection
- Confirm before persisting personal contact or sensitive constraint data.
- Record only information necessary for scheduling.
- Avoid free-form notes for sensitive information when a less revealing structured flag is sufficient.
-
Define lifecycle controls
- Establish retention periods for completed events, assignment histories, and stale volunteer records.
- Provide selective record deletion and secure export procedures.
- Ensure backups receive protections equivalent to the primary datastore.
-
Reduce secondary exposure
- Prohibit sensitive values from being written to telemetry, debug logs, exception output, or model traces.
- Redact unrelated records before constructing prompts or responses.
- Add tests confirming that a request about one event cannot reveal records belonging to unrelated events or teams.
-
