T09 · Insecure Skill Coding Practices
- Location
SKILL.md:88- Finding
ElevenLabs API key exposed through terminal and automation logs
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 88-91
Vulnerability Type: Secret exposure through insecure diagnostic instructions
Risk Level: Mediumbash echo $ELEVENLABS_API_KEYTechnical Analysis
The documented configuration check prints the complete ElevenLabs API key to standard output. This does not merely verify whether the variable exists; it discloses its value to the terminal and any system that captures process output.
The key may consequently be retained in CI logs, cron output, terminal recordings, support transcripts, screenshots, or centralized logging services. Although no code in the project transmits the key to an attacker, the documented practice unnecessarily expands the number of locations in which the credential can appear.
Attack Path
- A user follows the setup instructions and runs the documented command.
- The full API key is printed to standard output.
- Terminal output is recorded, uploaded to a logging platform, copied into a support request, or exposed to another local user.
- An attacker with access to that output extracts the key.
- The attacker submits authenticated requests to ElevenLabs using the victim's account and quota.
Impact Assessment
An attacker who obtains the key can exercise the ElevenLabs API privileges assigned to that credential. The likely scope includes consuming paid quota, generating synthetic audio, and accessing other API functionality available to the account. This finding does not provide operating-system privilege escalation by itself, but it compromises the confidentiality and integrity of the associated external service account.
- Remediation
View remediation
Remediation Suggestions
Replace the value-printing command with a presence-only check:
bash if [ -n "${ELEVENLABS_API_KEY:-}" ]; then echo "ELEVENLABS_API_KEY is configured" else echo "ELEVENLABS_API_KEY is missing" fiAdditionally:
- Never print even a partially masked key unless diagnostics genuinely require it.
- Configure CI and logging systems to redact the variable.
- Rotate any key that may already have appeared in retained logs.
- Recommend storing the credential in the platform's secret manager rather than persistent shell configuration where possible.
