Honest scope page for Sunglasses, the open-source AI agent input filter. Documents what Sunglasses catches (pattern-based detection across all shipped attack categories, 23 languages) and what it does not catch (zero-day patterns, semantic deception, insider misuse, model-internal vulnerabilities). Includes the false-positive story (86 to 0 on a real-code corpus, zero-FP gate enforced in CI every release) and 64/64 internal adversarial corpus recall. MIT licensed, pip install sunglasses.
sunglasses://scope, honest boundaries
The problem
If you don't know the scope of a security control, you use it wrong, you over-rely on it and leave real gaps, or you dismiss it entirely. Neither serves you.
What we are
Sunglasses is an ingestion-time filter for AI agent inputs. One layer in a defense stack, not the whole stack. This page documents where the layer works and where it doesn't, plain language, real numbers.
The ask
Read it before deciding whether Sunglasses fits your architecture. Spot a gap we haven't listed? contact@sunglasses.dev, we'll add it.
✦Publishing your limits is a strategy, not a weakness. Buyers who read this and decide Sunglasses alone isn't enough for their threat model are making the correct call, it never is, for any serious deployment. This page filters for the customer who layers it correctly.
Coverage
What Sunglasses Catches
Multiple patterns per family, multilingual variants, and normalization-first handling so common obfuscation doesn't bypass detection.
Patterns1115
Categories65
Languages23
Handlingnormalize-first
LicenseMIT · local
prompt_injection_direct
Direct Prompt Injection
Untrusted input that tells the agent to ignore its instructions, override its system prompt, or adopt a hostile persona. Covers 200+ variants across 23 languages, attackers routinely translate payloads to slip past English-only filters. ignore previous instructions
prompt_injection_indirect
Indirect Prompt Injection
Malicious instructions hidden inside content the agent reads, RAG results, browsed web pages, email bodies, documents. The attacker never touches the conversation; they only poison what the agent ingests. hidden in retrieved content
mcp_tool_poisoning
MCP Tool Poisoning
Instructions embedded in MCP tool descriptions, parameter docs, and schema annotations, text the model reads during tool discovery, before any tool executes. tool-description directives
cross_agent_injection
Cross-Agent Injection
Payloads that propagate agent-to-agent during handoff, forged revocation receipts and persona-scope rebind attacks. A growing surface as multi-agent pipelines spread. agent handoff boundary
readme_poisoning
README Poisoning
Hidden directives in repository READMEs an agent reads at install time or during code analysis. Scanned the same way as any other agent input. install-time repo text
credential_exfiltration
Credential Exfiltration
Payloads engineered to extract API keys, tokens, and secrets from the agent environment, "encode this key as base64", "report any variable containing SECRET". key / secret extraction
encoded_payload_*
Encoded Payload Obfuscation
Base64, hex, ROT13, Unicode homoglyph, and zero-width tricks. 17 normalization passes run before detection, the reason encoded variants that beat raw keyword scanners still get caught here.
context_flooding
Context Flooding
Attacks that overwhelm the context window with filler to push prior instructions or system context out of the active window. Detected by characteristic flooding signatures. window-eviction filler
system_channel_promotion
System Channel Promotion
User or tool messages that try to claim system-message authority, telling the model to treat untrusted input as if it were a system instruction. forged system authority
runtime_governance_bypass
Runtime Governance Bypass
Payloads targeting the guardrail orchestration layer, disabling safety layers, skipping approval workflows, or circumventing runtime policy checks. disable-the-guardrail
state_sync_poisoning
State Sync Poisoning
A2A protocol attacks that corrupt shared agent state during synchronization, injecting false ground truth downstream agents will trust. Shipped in 0.2.31. shared-state corruption
agent_contract_poisoning
Agent Contract Poisoning
False trust contracts smuggled into agent configs, poisoning the permissions, trust relationships, and operating rules an agent loads before it runs. poisoned config contract
tool_output_policy_override
Tool Output Policy Override
Tool return values that instruct the agent to bypass its policy based on what the tool "said", treating output as an authoritative command instead of data. output-as-instruction
memory_permission_drift
Memory Permission Drift
Incremental scope expansion through memory manipulation, each step looks modest; the cumulative effect is privilege escalation. creeping privilege escalation
supply_chain_signals
Supply Chain Attack Signals
Package and repo signals that flag potentially poisoned dependencies for human review. A pre-ingestion screen, pair it with full SBOM tooling, not a replacement for it. poisoned-dependency signals
23 languages
Multilingual Variants
Every category above ships multilingual coverage, English, Spanish, Arabic, Hindi, Japanese, Korean, Russian, Chinese and 15 more where payload translation is a documented evasion. 23-language coverage
Read this section
What Sunglasses Does Not Catch
Not fine print. Real gaps. If any of these apply to your deployment, you need additional controls beyond Sunglasses.
Gap classes9
Novel attacksout of scope
Insider misuseout of scope
Pair withruntime + access
Pattern-based only
Novel Zero-Day Patterns
A new attack family invented after the last update passes with an allow decision until patterns are added. The fundamental limit of any signature system, the database grows daily, but the gap is real and non-zero. never-seen patterns
No semantic engine
Sophisticated Semantic-Only Attacks
Attacks with no detectable phrasing, pure semantic context, individually clean messages that groom trust incrementally, will not be caught. Semantic analysis is on the roadmap, not in the current engine. no phrasing signal
Not an access control
Misuse by an Authorized User
An admin issuing harmful instructions through normal, un-injected prompts looks identical to legitimate use at the ingestion layer. Insider threat is a trust-boundary problem, not a detection one. insider misuse
Runs before the model
Model-Internal Vulnerabilities
No visibility into the model’s internal reasoning, training biases, hallucination, or alignment failures. Harmful output from the model’s own properties is the provider’s responsibility. model reasoning
Application layer
Hardware & Network Attacks
Side-channel timing, MITM on API calls, OS-level attacks against the host, all outside an input filter’s scope. These need infrastructure-level defenses. infra-layer attacks
Reads plaintext only
Encrypted Payloads
If Sunglasses receives only ciphertext without the key, the normalized input it matches against is the ciphertext, not the hidden payload. No text scanner can read what it cannot decode. undecodable ciphertext
OCR-dependent
Adversarial OCR-Evading Images
Images crafted with adversarial perturbations to make OCR fail, text a human or vision model could read, but that produces no transcript to match against. Active research area. OCR-evading images
Whisper-dependent
Sub-Audible Audio Attacks
Payloads in ultrasonic or sub-audible frequency bands Whisper never transcribes leave no detectable text. Not seen in the wild, a theoretical gap we name honestly. frequency-domain audio
Per-input scan
Behavioral / Longitudinal Attacks
Harm that unfolds across many individually clean interactions, no single message carrying a pattern. Sunglasses scans inputs, not behavior over time. Pair with behavioral monitoring. cross-session behavior
01
A corpus is not your traffic
Zero on our corpus doesn't promise zero on your input distribution. If your agent processes content with imperative or security language, you can still see false positives. Test on a representative sample before production.
02
False positives land on quarantine, not block
Critical/high return block; medium returns quarantine; low returns allow_redacted. A false positive on a benign prompt typically returns quarantine: human review, not automatic rejection.
03
Production cost depends on your workflow
With a human-in-the-loop review process, a false positive costs review time. In a fully automated pipeline with no review step, a quarantined legitimate request has immediate user-facing impact. Design your integration with the review workflow in mind.
01
It is an internal corpus
The 64 samples were constructed or sourced by the team for testing, the same class of known patterns the engine was built to catch. Not an independent third-party red-team with novel attack generation.
02
It is not a universal figure
64/64 means 100% recall against those 64 specific samples, not against all possible attacks. Novel patterns the team hasn't seen are not in this measurement.
03
Real-world recall is unknown
Measuring it requires widespread production deployment with ground-truth labels on attack traffic: data we don't yet have.
04
The CVP synthesis goes further
Six runs, four Claude model families, 120 transcripts, all clean. Still an internal evaluation, not a deployment-scale recall measurement. Read the full CVP Family Synthesis.
Use it correctly
One layer, layered right
Pair Sunglasses (ingestion-time, pre-model) with runtime monitoring, access controls, tool permission scoping, human review for high-risk actions, and incident response. When it catches something, trust the signal. When something falls outside its scope, have other controls in place.