InfernoFirewall combines ML-driven fast decisions, client protection, DLP, accounting, tool-call safety and policy guardrails in one gateway. It learns from traffic and incidents, then tightens only what it can prove — keeping the fast path under 10 ms.
Most AI guardrails are a model judging a model — the judge can be fooled, and you never know which requests it waved through. InfernoFirewall inverts it: the ML layer emits facts, and a Cedar policy engine decides. Because ML facts only appear inside forbid conditions, the allowed set can only shrink. The bound you can state before deployment is the product.
// ML can shrink the set. It can never widen it. @forbid @verdict("step_up") forbid(principal, action == Action::"send_email", resource) when { context.injection_score >= 0.8 }; // Before a bundle ships: invariants proven over every request the // schema allows (cvc5), and a semantic diff with real counterexamples. // A loosening needs a named human. Tightenings can ship without one.
Semantic diff and invariants. Prove statements like "no prod principal can ever call shell_exec" or "nothing labeled secret reaches an external sink" — the SMT solver answers before the policy ships, with counterexample requests when it doesn't hold.
Agent-first, not text moderation. The real risk is an agent taking a harmful action because untrusted content steered it. Every tool call is an untrusted proposal until policy permits it.
Three tiers. Compiled patterns + schema + Cedar in under 1 ms on every event; a calibrated compact classifier < 6 ms on CPU; an LLM judge only when the classifier is uncertain and the action is high-impact.
Every decision is a hash-chained record — inputs, bundle hash, rules fired, scores, approver. Checkpoints are signed with Ed25519, and a verifier CLI exits 1 on any edit or gap. Replay reproduces every verdict; what-if runs a candidate policy over history.
Provenance per session. Anything a tool returned is untrusted for the rest of the session, and it flows to summaries, memory and child agents. Policy decides what taint means; it clears only through an audited declassification step.
Single use, re-decided on release. An approval is tied to the canonical arguments hash — approving $100 never releases $1000. Approver authority is itself a policy, and no approval can override a hard deny.
Against MCP rug pulls. Descriptions and schemas are hashed and pinned at approval. Change them upstream and the tool disappears until re-approval; tool text that contains injection instructions is blocked at sync.
By construction. Deadline exceeded, stage error, panic, unparseable JSON, lost session state: tool calls are always denied. Only plain chat text can opt into failing open.
Providers are sinks. The whole request — history included — is scanned, and each backend is decided by its trust class: self-hosted, private or public. Secrets never leave; personal data stays inside commercial APIs.
Co-evolution with a guard. Blocks and red-team findings are mined into candidate rules; anything the analyzer proves to be a tightening can auto-ship, anything looser requires a named human approver in the audit trail.
Adopt without disruption. Run the firewall over real traffic, record what it would have blocked or held, and enforce when the false-positive budget is provably acceptable.
Four configurations, always reported together: no firewall, static policy only, classifier only, combined — attack success, benign task success, approval burden and latency. We publish what is measured and label what is synthetic.
A single in-process pipeline handles every event type and ends in one decision. The control plane is never on the request path.
The harness reports four configurations side by side so a drop in attacks can't be a blanket denial in disguise. Numbers below are from the last run — synthetic scenarios on a scripted model, published with the method so they can be checked. No public suite has been run with a real model yet; latency figures are design targets pending reference hardware.
| Metric | no firewall | static policy only | classifier only | combined |
|---|---|---|---|---|
| Attack success (44 scripted attacks) | 100% | 0% | 0% | 0% |
| Benign tasks completed (48 sessions) | 100% | 64.6% | 68.8% | 54.2% |
| Step-ups per 100 sessions | 0 | 60.9 | 0 | 7.6 |
| Added latency p99, gateway stages | 1.0 ms | ≤ 2.5 ms | ≤ 10 ms | ≤ 5.0 ms |
| Adaptive red-team: variants evaded | 32/32 | 0/32 | 9/32 after 5 rounds | 0/32 |
The same honesty as the design doc: the hard guarantees come from the policy and flow layers; the ML layer improves precision with statistical, not absolute, bounds — and it can only tighten.
Every mode shares the same pipeline, policy engine and audit chain, so a guarantee proven once applies to every mode. Each mode states exactly what it sees and what it can stop.
| Mode | Sees | Can stop | Status |
|---|---|---|---|
| AI gateway | All prompts, responses, proposed tool calls | Requests; responses; tool calls by rewriting the response | Built |
| MCP gateway | Tool calls and results for routed servers | Execution of routed tools; pinned, scanned tool lists | Built |
| Web console | Live decisions, sessions, policy, approvals | Cedar-role-gated changes, audited before they happen | Built |
| SDK middleware | In-process tool calls | In-process tool calls | Planned |
| Provider-compatible proxy | Same as AI gateway, for catalog hosts | Same; other endpoints on those hosts refused | Built |
| Network modes | AI-destination flows (DNS/SNI), TLS-inspected when allowed | Whole destinations; tool calls in inspected responses | Later phases |
Self-hosted today: a single Rust binary and Postgres, Docker Compose for the quick start. Design partners run real agents in shadow mode before enforcing anything. Deny by default, prove the ceiling, then open the gates with the diff.