T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:48
- Finding
- Insecure Guidance to Store a Groq API Key in Plaintext## Vulnerability Details **File Location**: `SKILL.md:48-58`, `SKILL.md:134-138`, and `README.md:6-13` **Vulnerability Type**: Plaintext sensitive credential storage **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:48-58`: ```markdown **Add to your TOOLS.md:** ```markdown ### Proxy Settings - HTTP Proxy: http://127.0.0.1:7890 ### Voice Recognition (FREE Groq Whisper) - API Key: gsk_your_key_here - Model: whisper-large-v3 - Language: zh (or your preferred language) - Requires Proxy: Yes (if in restricted region) ``` ``` `SKILL.md:134-138`: ```markdown ## Privacy & Security - ✅ Audio processed by Groq's API (not stored permanently) - ✅ API key stored locally in your TOOLS.md - ✅ No data sent to third parties ``` `README.md:6-13`: ```markdown 1. **Get FREE API Key**: https://console.groq.com/ (30 seconds, no credit card) 2. **Add to TOOLS.md**: ```markdown ### Voice Recognition (FREE Groq Whisper) - API Key: gsk_your_key_here - Model: whisper-large-v3 - Language: zh - Proxy: http://127.0.0.1:7890 (if needed) ``` ``` ### Technical Analysis The setup instructions explicitly direct users to place a live Groq bearer token in `TOOLS.md`. A documentation or project configuration file is not an appropriate secret store. Such files may be read by AI agents, included in prompts or diagnostic output, copied into backups, shared with collaborators, or accidentally committed to source control. The shell implementation itself correctly reads the credential from the `GROQ_API_KEY` environment variable. Consequently, the documentation conflicts with the safer credential interface already implemented by `transcribe.sh`. The privacy statement that no data is sent to third parties is also inaccurate in context: the script uploads selected audio to Groq for processing. This can cause users to underestimate the external disclosure of audio content and the ...[truncated 1323 chars]
- Remediation
- ## Remediation Suggestions 1. Remove all instructions that tell users to place API keys in `TOOLS.md` or other project documentation. 2. Document `GROQ_API_KEY` as the supported credential mechanism, matching the existing shell implementation: ```bash export GROQ_API_KEY="gsk_replace_with_real_key" ./transcribe.sh recording.ogg en ``` 3. Recommend an operating-system secret manager, CI/CD secret store, or protected runtime environment variable for persistent configuration. 4. If a local environment file is supported, provide only a placeholder such as `.env.example`, add `.env` and `TOOLS.md` to `.gitignore`, and require restrictive permissions such as `chmod 600 .env`. 5. Warn users never to commit, paste into prompts, log, or share live bearer tokens. 6. Add secret scanning to repository and release workflows to detect Groq key patterns before publication. 7. Advise users to revoke and rotate any key previously stored in a shared or committed file and to review account usage for unauthorized requests. 8. Correct the privacy documentation to state explicitly that audio is transmitted to Groq as an external service provider. Avoid unsupported assurances about retention and link to Groq's current privacy and data-retention terms.
