T09 · Insecure Skill Coding Practices
- Location
SKILL.md:95- Finding
API Key Exposure Through Chat and Plaintext Shell Configuration
- Content
View full analysis
To use Drillr I need an API key. From any browser (your phone is > fine): > > 1. Open https://drillr.ai/developer/keys > 2. Sign in — **Google sign-in is the quickest**; email/password also > works > 3. Tap "Create API key" → give it a name (e.g. "my-agent") → copy > the `drl_...` string > 4. Paste it back to me here. The key is shown only once. > > After I confirm it works, you can delete your message. ``` ```markdown **Rules:** - Never echo the full key back to the user - Never write the key into conversation logs, prompts, or scratchpads - Never commit it to any file other than `~/.config/drillr/config.json` ``` From `SKILL.md:179-180`: ```markdown > 3. Add `export DRILLR_API_KEY=drl_...` to your shell rc > (`~/.zshrc` / `~/.bashrc`) and restart the shell ``` The same chat-based credential collection and shell configuration instructions are duplicated in `examples/user-onboarding-script.md`. ### Technical Analysis The indirect onboarding flow explicitly instructs users to paste a long-lived bearer API key into a chat conversation. This conflicts with the Skill's own rule prohibiting API keys from being written into conversation logs. Once submitted, the credential may be retained in server-side chat history, agent traces, model-provider logs, telemetry, backups, notification previews, or connected integrations. Telling the user to delete the message after validation does not guarantee removal from those secondary storage systems. Anyone able to read one of those systems could recover the credential. The direct onboarding flow also recommends putting the key in `.zshrc` or `.bashrc`. Shell startup files a ...[truncated 1790 chars]- Remediation
View remediation
