T09 · Insecure Skill Coding Practices
- Location
README.md:24- Finding
Diary Entries Stored in Plaintext at a Predictable Hardcoded Path
- Content
View full analysis
Vulnerability Details
File Location:
README.md:24-29andREADME.md:113-126; corroborated bySKILL.md:18-20andSKILL.md:75-88
Vulnerability Type: Plaintext storage of sensitive personal information in a fixed, developer-specific location
Risk Level: MediumVulnerable Code Snippets
README.md:24-29:markdown ### Storage Location By default, diaries are stored at:D:\Nancy\MyWork\WorkBuddyWorkSpace\diary\my-diary.json
text README.md:113-126:markdown ## Data Format Diary entries are stored in JSON format: ```json { "version": "1.0", "entries": [ { "id": "1700000000000", "content": "Diary content here...", "created_at": "2026-03-15 14:30:00" } ] }text ### Technical Analysis The skill directs the AI agent to store personal diary content as ordinary JSON at a fixed, predictable filesystem path. No encryption, restrictive file permissions, operating-system-backed secret storage, path isolation, or confidentiality checks are specified. Diary entries may contain highly sensitive personal information. A predictable plaintext file allows any local user or process that already has sufficient filesystem access to locate and read the complete diary without interacting with the skill. A process with write access could also alter, inject, or delete entries. The hardcoded developer-specific path additionally creates portability and data-separation problems if the skill is installed in another environment without first being reconfigured. This finding does not establish remote access or privilege escalation. Exploitation depends on an attacker or untrusted local process already having permission to access the configured file or its parent directory. ### Attack Path 1. A user invokes the skill to record one or more diary entries. 2. The agent creates or updates `D:\Nancy\MyWork\WorkBuddyWorkSpace\diary\my-diary.json`. ...[truncated 1281 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the hardcoded developer-specific path with a configurable, per-user application-data directory obtained from the operating system.
- Create the diary directory and file with permissions restricted to the current user. On Windows, apply an ACL that excludes unrelated users; on Unix-like systems, use directory mode
0700and file mode0600. - Encrypt diary contents at rest using authenticated encryption. Store encryption keys through an operating-system-backed facility such as Windows DPAPI, macOS Keychain, or a suitable Linux secret service rather than embedding keys in the skill.
- Validate that the resolved storage path remains inside the approved application-data directory before every read, write, or delete operation.
- Use atomic writes through a protected file in the same directory, followed by an atomic replacement, to reduce corruption and unsafe temporary-file exposure.
- Define handling for malformed or tampered JSON and avoid overwriting the original file until validation succeeds.
- Document the sensitivity of diary data, the storage location, permission requirements, backup behavior, and a secure deletion procedure.
- Consider requiring explicit user approval before displaying complete diary contents when the operating environment may be shared.
