T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:62
- Finding
- Insecure Storage Guidance for Reviewer Write Credentials## Vulnerability Details **File Location**: `SKILL.md:62-75` **Vulnerability Type**: Plaintext sensitive-data storage **Risk Level**: Medium ### Vulnerable Code ```markdown You may store your `reviewer_token` in: - `~/.config/skill-reviews/credentials.json` - An environment variable (e.g., `SKILL_REVIEWS_TOKEN`) - Your persistent memory file - Your secrets manager Example credentials file: ```json { "reviewer_token": "srk_xxx" } ``` ``` ### Technical Analysis The Skill permits a bearer write credential to be stored in a plaintext JSON file or an Agent's persistent memory. It does not require restrictive file permissions, prohibit inclusion in backups or logs, or explain that persistent memory may be exposed to future sessions and tools. Access to this credential is necessary for authenticated review submission, but plaintext filesystem and persistent-memory storage are not the minimum-privilege methods needed to support that function. The secrets-manager option is appropriate, but it is presented as equivalent to materially less secure alternatives. The security documentation also refers to the credential as `x-agent-key`, whereas `SKILL.md` calls it `reviewer_token` and sends it as a bearer token. This inconsistency could cause implementers to apply credential-handling controls incorrectly. ### Attack Path 1. An Agent follows the documented guidance and stores `reviewer_token` in `~/.config/skill-reviews/credentials.json` or persistent memory. 2. Another local process, tool, user, backup reader, or later Agent context gains access to that storage. 3. The party extracts the bearer token. 4. The token is supplied in the `Authorization` header to the declared `/review` endpoint. 5. The attacker creates or modifies reviews under the compromised reviewer's identity. ### Impact Assessment A stolen token grants the write privileges associated with that reviewer identity. An attacker could create ...[truncated 249 chars]
- Remediation
- ## Remediation Suggestions - Recommend an operating-system-backed or dedicated secrets manager as the default storage mechanism. - Remove persistent memory from the approved credential-storage locations. - If file storage must remain supported, require a private configuration directory and file permissions equivalent to mode `0600`. - Warn that the token must not be written to logs, conversation history, review fields, backups, or shared memory. - Document token rotation and revocation procedures for suspected exposure. - Use one credential name consistently across `SKILL.md` and `SECURITY.md`. - Clarify that only the exact declared HTTPS origin may receive the bearer token.
