Observatory defense blueprint · ATO.M0007
Canary Token Injection & System-Prompt / PII Egress DLP
Plant non-semantic canary tokens inside system prompts and sensitive contexts while running streaming NER/entropy DLP scanners to halt secret, PII, and prompt-leakage exfiltration.
Control blueprint overview
- Control ID
ATO.M0007- Framework
- Observatory defense blueprint
- Stack layers
- Monitoring/Canary · Input/Output Classifier
- Techniques addressed
- 0
- OWASP LLM Top 10
- NIST AI RMF
- Reference URI
https://observatory.silvauren.com/catalog/mitigations/ato-m0007/
Control mechanism
Embeds unique high-entropy canary identifiers inside system prompts and high-value internal context headers, then inspects streaming model outputs and tool parameters using Microsoft Presidio, secret-entropy regexes, and exact/fuzzy canary matchers. Triggers instant stream termination and incident alerting if memorized PII, API keys, or confidential prompt fragments appear.
Implementation steps
- Embed rotating, deployment-scoped canary tokens inside non-public system prompt blocks and staging RAG bait documents.
- Inspect streamed LLM tokens with sliding-window buffers for canary matches, high-entropy API keys (`sk-`, `ghp_`, `AKIA`), and PII entities (Presidio).
- Redact or terminate responses immediately when confidential system-instruction chunks or unmasked secrets surface in outputs.
- Verify DLP coverage against encoded/reversed/base64-transformed secret exfiltration probes (`system_prompt_extraction`, `encoding_cipher`).
What this control stops
- Direct and translated verbatim leakage of confidential system prompts and routing rules (AML.T0069.002).
- Accidental emission of raw customer PII, SSNs, or memorized training secrets in assistant replies (AML.T0137.003).
- Unmasked API credentials accidentally retrieved from RAG documents or environment dumps leaking to users (AML.T0055, AML.T0082).
Known bypass conditions & residual risk
- Character-by-character, acrostic, Caesar-cipher, or semantic paraphrasing extraction of system prompts without hitting literal token matches.
- Out-of-band exfiltration inside encrypted or custom-encoded tool parameters never routed through text-output DLP.
- Reconstructed secrets split across multiple separate conversation turns.
Latency, usability & false-refusal trade-offs
Latency: +5-15 ms per chunked stream buffer window (higher if LLM-based semantic leak detection is enabled). | False-Refusal Risk: Low-to-medium if coding assistants legitimately discuss synthetic example keys or documentation snippets unless test-pattern allowlists exist. | Operational Cost: Low-to-medium CPU regex/NER scanning overhead at the response gateway.