Threat Model
What agent-firewall defends against
-
Prompt injection via untrusted content: malicious instructions hidden in emails, web pages, documents, or API responses that trick an AI agent into performing unintended tool calls.
-
Obfuscated attacks: base64-encoded, leetspeak, space-separated, or zero-width-character-obfuscated injections.
-
Judge spoofing: attempts to dictate the LLM judge's verdict or escape the
<untrusted_text>fence.
What it does NOT defend against
-
Direct user attacks: if the user themselves are the attacker, the firewall cannot help (the user controls the confirm callback).
-
Multi-turn attacks: sophisticated attacks that spread the injection across multiple messages are harder to detect with single-text scanning.
-
Novel attack patterns: purely semantic attacks with no lexical signals may evade the regex rules. The LLM judge helps here but is not perfect.
-
Non-English attacks: rule coverage is English-only. The LLM judge may catch non-English attacks, but this is model-dependent.
-
Adversarial examples: carefully crafted inputs designed to evade specific detection methods.
Trust boundaries
┌─────────────────────────────┐
│ Trusted Zone │
│ User ↔ Agent ↔ Firewall │
│ │
│ The firewall trusts: │
│ - Its own rules │
│ - The policy configuration │
│ - The confirm callback │
└───────────┬─────────────────┘
│
│ untrusted content flows in
▼
┌─────────────────────────────┐
│ Untrusted Zone │
│ Emails, web pages, docs, │
│ API responses, user files │
└─────────────────────────────┘
Assumptions
- The AI agent correctly marks tool outputs as untrusted when they contain external content.
- The policy thresholds are appropriately set for the deployment context.
- The LLM judge (when used) is not itself compromised.