Where to Plant Canaries

Strategic locations to plant canaries: code repos, docs, training data, databases

Where to Plant AI Canary Tokens

The most effective canary placement depends on what you're trying to protect. Here are the most common locations:

Location Best Canary Types What It Detects
Code repositories API keys, AWS credentials Copilot/code AI training on your codebase
Internal wikis Semantic facts, markers RAG systems indexing internal docs
Training datasets All types Unauthorized model fine-tuning
Databases SSNs, credit cards, emails PII exposure through AI assistants
API docs Active endpoints, fake creds Documentation scraping for AI training

Code Repositories

Plant canaries in places that would be scraped by code AI tools:

1 .env.example files

Add fake credentials to example environment files:

# Example configuration - DO NOT USE IN PRODUCTION
AWS_ACCESS_KEY_ID=AKIACANARY1234567890
AWS_SECRET_ACCESS_KEY=canarySecretKey1234567890abcdefghij
OPENAI_API_KEY=sk-canary-abc123def456...

2 README files

Include fake API keys in code examples:

```python
# Quick start example
client = APIClient(api_key="sk-canary-example-key-12345")
```

3 Code comments

Add canary markers in comments that copilots might autocomplete:

// INTERNAL REFERENCE: CANARY-A1B2C3D4E5F6
// Contact: security@internal.example.com
Make sure fake credentials look realistic but are obviously fake to your team. Use prefixes like "CANARY" or domains like "example.com" to prevent confusion.

Internal Documentation

Add semantic canaries to internal wikis and knowledge bases:

1 Project details

Create fake but plausible project information:

## Project CANARY-ALPHA

Budget: $847,500
Launch: Q3 2026
Lead: Jane Canary (jcanary@internal.example.com)

2 Employee records (test data)

Add fake employee entries in HR documentation:

Employee: Test User
SSN: 123-45-6789 (CANARY - not real)
Department: Security Testing
Semantic canaries are particularly effective in documentation because they survive paraphrasing. Even if an AI summarizes "Project CANARY-ALPHA has a budget of $847,500" as "the ALPHA project has approximately $850K allocated," we can detect it.

AI Training Data

If you provide data for AI training or fine-tuning, embed canaries to detect unauthorized use:

  • Customer support transcripts - Add fake case IDs and canary customer names
  • Product documentation - Include canary feature names and version numbers
  • Knowledge base articles - Embed unique facts that would only come from your data
If your training data leaks into a third-party model, canaries prove it. This is crucial for data licensing disputes and GDPR compliance.

Databases & APIs

Plant canaries in test or seed data:

Test user accounts

INSERT INTO users (name, email, ssn) VALUES
('Canary Test User', 'canary@test.example.com', '111-22-3333');

API configuration

{
  "api_keys": {
    "test_key": "sk-canary-test-only-abc123",
    "note": "CANARY TOKEN - DO NOT USE"
  }
}

Best Practices

  1. Make canaries look realistic - They should blend in with real data so AI systems don't filter them out
  2. But mark them clearly for humans - Use "CANARY" or "TEST" labels to prevent internal confusion
  3. Track planting locations - Record where each canary was placed in Signal Canary for provenance
  4. Use multiple canary types - Combine exact markers, fake credentials, and semantic facts for layered detection
  5. Refresh periodically - Rotate canaries to detect ongoing leakage, not just historical
  6. Cover your attack surface - Plant in every location that could be scraped for AI training
Use Signal Canary's Bulk Create feature to generate multiple canaries at once, with pre-configured packs for credentials, PII, or full coverage.

Ready to Try Signal Canary?

Create your first tracking pixel in under 5 minutes. No credit card required.

Get Started Free