SELVAGE

Verify it yourself
← back to the demo

Don’t take our word for it. Read the code that makes the decision.

The demo runs the Selvage enforcement kernel directly in your browser. There is no server round-trip for the allow/block decision — which means you can inspect it, set a breakpoint in it, and try to break it. Here’s how to check it for yourself, in about ten minutes.

The claim, stated precisely

Even when a prompt injection fully hijacks the agent, the unauthorized transaction it attempts is blocked at the execution boundary — because it doesn’t match what the user approved. Selvage does not claim to stop the injection.
defense-in-depth for OWASP LLM06 · Excessive Agencynot LLM01 · Prompt Injection.

The setup

You approve a cart at checkout — specific items, specific quantities, one total. That approved, priced cart is frozen as the contract. Every submitted transaction is bound to it across three dimensions — item set · per-item quantity · total. Any deviation on any dimension is classified committed_terms_differ_from_approved and blocked before the provider commit.

Verify it — each step stands alone

  1. Confirm no server is involved.~30s

    Open DevTools → Network. Run any attack. You’ll see zero requests to a Selvage backend — the only traffic is web fonts. The decision is computed locally, in code you can read.

  2. Read the actual decision logic.~2 min

    DevTools → Sources. Search the page bundle for bindPreCommit and compareTerms. The block is a structured comparison of the submitted transaction against the approved terms — not a keyword match on the injection text. Look for anywhere the kernel reads the injection string: you won’t find it, because it doesn’t.

  3. Breakpoint it.~2 min

    Set a breakpoint in bindPreCommit. Submit an attack. Inspect the two term sets — approved vs. submitted. Watch the mismatch on item_set / lines / total produce the block. There is no branch keyed on the words “injection” or “attack.”

  4. Break it yourself.open-ended

    In Break it yourself, submit any transaction you like — add items, inflate quantities, override the total — and paste any injection text you can invent. Confirm two things:

    • Only the exact approved cart executes. Everything else is blocked.
    • The injection text box changes nothing. The boundary never reads it. That’s the whole point: enforcement is on the transaction, not the prose.
  5. Prove the boundary is what’s stopping it.~30s

    Toggle Selvage OFF and submit the same altered transaction. It now reaches the provider (the commit counter increments). Toggle ON, submit again — blocked. The only variable is Selvage. This is the control that separates “the boundary blocked it” from “nothing was going to happen anyway.”

  6. Reproducibility.any time

    Re-run any case. Same inputs → same decision, every time. The enforcement is deterministic, not probabilistic.

What this does — and doesn’t — establish

✓ What it proves

The enforcement is a mechanical, local comparison of the submitted transaction against the user-approved terms — running in code you can read, breakpoint, and break, with a falsifiable ON/OFF control. Not a scripted animation, not a keyword filter.

What it deliberately doesn’t claim

It does not stop the injection. The agent is still fooled — the demo shows that plainly. Selvage stops the unauthorized action, not the injection.

This client-side build ships the kernel to your browser so you can audit it. In production the kernel signs server-side — see signed receipts → for how a hidden-kernel decision stays verifiable.

the demo runs the @selvage/core kernel · deterministic the demo → · signed receipts → · a ziola project