Skip to content

Getting Started ​

Get Sensitive Canary protecting your Claude Code session in under a minute.

Install ​

Install with two commands inside a Claude Code session:

bash
# 1. Register the marketplace
/plugin marketplace add coo-quack/claude-code-marketplace

# 2. Install the plugin
/plugin install sensitive-canary@coo-quack

The hooks are active in every session started after the install. A session that was already running keeps going without them — it will say the plugin is enabled and check nothing — so restart before relying on it, and confirm with the check in Installation.

For alternative installation methods (pnpm global, manual git clone), see the Installation page.

What Happens ​

Just use Claude Code as usual. Sensitive Canary runs in the background and automatically scans at three points:

  • On prompt submission — checks your input for secrets and PII before it reaches the API
  • On file read — checks file names and contents before Claude reads them
  • On command execution — checks Bash commands and environment variable values for secrets

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.

Allow Tags ​

TagEffect
[allow-secret]Allow secrets through for this prompt
[allow-pii]Allow PII through for this prompt
[allow-all]Bypass all sensitive-canary checks for this prompt

Tags apply only to the message they appear in, and do not persist across turns. For PreToolUse hooks a tag stops applying once a tool result is recorded after it — so tool calls Claude issues together, before any of their results come back, are all covered by one tag. Include the tag again for later calls in the same request.

Configuration ​

Category filtering ​

Set SENSITIVE_CANARY_CATEGORIES in the env block of your Claude Code settings.json to limit which rule categories are active:

json
{
  "env": {
    "SENSITIVE_CANARY_CATEGORIES": "secret"
  }
}
ValueEffect
secretScan for secrets only — PII rules are disabled
piiScan for PII only — secret rules and the name-based .env/.env.* block are disabled
secret,pii / allScan everything (default)

This persistent filter is applied before allow tags. A typical use is setting secret when PII rules are too noisy against test fixtures.

Custom rules ​

All 109 detection rules are defined in JSON. You can add your own or override built-in ones by creating a config file:

bash
mkdir -p ~/.config/sensitive-canary

Then create ~/.config/sensitive-canary/config.json:

json
{
  "rules": [
    {
      "id": "custom-api-key",
      "description": "My Service API Key",
      "regex": "MYSVC-[A-Za-z0-9]{32}",
      "category": "secret"
    }
  ]
}

The plugin reads this file at startup. Rules with the same id as a built-in rule replace it; new ids are appended. See Detection Rules → Custom Rules for the full field reference and examples.

Next Steps ​

Released under the MIT License.