Secret Detection
Catches AWS keys, GitHub PATs, Stripe keys, JWTs, Anthropic/OpenAI API keys, database connection strings, Replicate/Hugging Face/Groq/xAI tokens, DigitalOcean/Square/Sentry/Linear tokens, and 20+ more credential types.
A security plugin that prevents unintended data leaks from Claude Code. Automatically detects and blocks AWS keys, tokens, email addresses, credit card numbers, and more before they are sent to the API.
Claude Code is a powerful development tool, but file reads and command executions can inadvertently send secrets and personal information to the Anthropic API. API keys in .env files, tokens embedded in config files, credentials pasted into the terminal β once sent to the API, they leave your machine.
Sensitive Canary intercepts them before they are sent, preventing unintended data leaks.
| Without Sensitive Canary | With Sensitive Canary |
|---|---|
cat .env β full contents sent to Claude β | Blocked by name by default before Claude reads it β |
| Paste a live AWS key in a prompt β | Blocked before the API call is made β |
Read customers.csv full of email addresses β | PII detected before Claude sees the file β |
echo $API_KEY with live key β | Env var value scanned and blocked β |
UserPromptSubmit and PreToolUse cover both directions of risk| Category | Examples |
|---|---|
| Cloud credentials | AWS Access Key, GCP API key |
| Source control | GitHub PAT, GitHub fine-grained token, GitLab PAT |
| AI services | Anthropic API key, OpenAI API key / project key, Replicate, Hugging Face, Groq, OpenRouter, xAI, Perplexity |
| Communication | Slack token, Slack webhook, Discord webhook, Telegram bot token |
| Payment | Stripe secret/restricted key, Square access token, credit card numbers (Luhn-validated) |
| Email services | SendGrid API key, Mailgun key, Mailchimp key |
| Cloud / IaaS | DigitalOcean PAT, Supabase PAT |
| SaaS / Dev tools | Mapbox, Sentry, Atlassian, Linear, Postman |
| Auth tokens | JWT, database connection strings |
| PII | Email, US SSN, phone (8 countries), national IDs (7 countries), postal codes, IP addresses |