Secret Detection
Catches AWS keys, GitHub PATs, Stripe keys, JWTs, Anthropic/OpenAI API keys, database connection strings, and 15+ 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 before Claude reads it ✅ |
Paste AKIAIOSFODNN7EXAMPLE in prompt ❌ | Blocked before the API call is made ✅ |
| Tool result contains user@email.com ❌ | PII detected and blocked ✅ |
echo $API_KEY with live key ❌ | Env var value scanned and blocked ✅ |
UserPromptSubmit and PreToolUse cover both directions of riskInstall with two commands inside a Claude Code session:
# 1. Register the marketplace
/plugin marketplace add coo-quack/sensitive-canary
# 2. Install the plugin
/plugin install sensitive-canary@coo-quackAfter installation, restart Claude Code and the hooks are active. No additional configuration needed.
Just use Claude Code as usual. sensitive-canary runs in the background and automatically scans at three points:
When sensitive data is detected, the action is blocked and the terminal shows what was found. To intentionally allow it, add [allow-secret] or [allow-all] to your prompt.
See installation guide → for manual setup options.
| Category | Examples |
|---|---|
| Cloud credentials | AWS Access Key, GCP service account key |
| Source control | GitHub PAT, GitHub fine-grained token, GitLab PAT |
| AI services | Anthropic API key, OpenAI API key / project key |
| Communication | Slack token, Slack webhook, Discord webhook, Telegram bot token |
| Payment | Stripe secret/restricted key, credit card numbers (Luhn-validated) |
| Email services | SendGrid API key, Mailgun key, Mailchimp key |
| Auth tokens | JWT, database connection strings |
| PII | Email address, US SSN, US/JP phone, Japanese postal code, private IPv4 |