T09 · Insecure Skill Coding Practices
- Location
config.json:4- Finding
Hardcoded Groq API Credential in Distributed Configuration
- Content
View full analysis
/config.json'))['groqApiKey'])") curl -s https://api.groq.com/openai/v1/audio/transcriptions \ -H "Authorization: Bearer $GROQ_API_KEY" \ -F file="@/tmp/douyin_audio.mp3" \ -F model="whisper-large-v3" \ -F language="zh" \ -F response_format="verbose_json" ``` Storing credentials in plaintext configuration violates secret-management best practices. Removing the key in a later revision is insufficient if it remains in repository history, package caches, logs, or previously distributed copies. ### Attack Path 1. An attacker downloads or otherwise gains read access to the Skill package. 2. The attacker opens `config.json`. 3. The attacker extracts the plaintext `groqApiKey`. 4. The attacker sends authenticated requests directly to Groq using the stolen bearer credential. 5. Requests consume the legitimate owner's quota and may continue until the key is revoked. ### Impact Assessment The exposed credential can grant unauthorized access to the Groq API under the associated account. Potential consequences include: - Unauthorized A ...[truncated 475 chars]- Remediation
View remediation
