T09 · Insecure Skill Coding Practices
- Location
SKILL.md:19- Finding
Plaintext Secret Storage Misrepresented as AES-256 Encryption
- Content
View full analysis
~/.agent-env/secrets/OPENAI_KEY chmod 600 ~/.agent-env/secrets/OPENAI_KEY ``` ### Technical Analysis The documented command writes the API key directly to a regular file without performing encryption. The subsequent `chmod 600` operation restricts ordinary filesystem access to the file owner, but it does not provide AES-256 encryption or any other form of encryption at rest. The project contains no encryption implementation, encryption-key management, operating-system keychain integration, or decryption workflow supporting the advertised security property. This discrepancy can cause users to treat plaintext credential files as encrypted secret storage. ### Attack Path 1. A user follows the documented command and writes a production API key to `~/.agent-env/secrets/OPENAI_KEY`. 2. The key remains present in plaintext on the filesystem. 3. An attacker compromises the user account, reads a backup, accesses the disk through a privileged process, or obtains the file through another local information-disclosure flaw. 4. The attacker reads and reuses the API key against the associated service. ### Impact Assessment An attacker who can access the file can obtain the complete credential with the same service privileges granted to that credential. Depending on the API key, this could permit unauthorized API use, access to confidential data, resource modification, or consumption of paid service quotas. The filesystem permission reduces exposure to other unprivileged local users but does not protect against compromise of the owning account, privileged processes, backup exposure, or offline disk access. ]]>- Remediation
View remediation
