DEV Community

A K
A K

Posted on

I built a deterministic <0.1ms AI prompt-injection firewall (and seeded an open $5.00+ USDC bounty)

Most LLM guardrails (like Llama Guard or NeMo) add 500ms–1500ms of latency per call. For real-time autonomous AI agents, that delay kills the user experience.

I built CanaryGuard: a deterministic heuristic firewall that inspects inputs in <1ms line-rate before passing them to the model context.

What it Catches

  • Chat-template delimiter smuggling ([INST], <|im_start|>, <<SYS>>)
  • Concealed unicode obfuscation (zero-width spaces \u200B, bidi overrides)
  • Hidden HTML/DOM injection (display:none, opacity tricks)
  • Asset exfiltration & wallet drain commands

Open Red-Team Challenge

To test how far deterministic rules hold up against real jailbreaks, I seeded an on-chain $5.00+ USDC bounty vault on Base & Solana. If your payload slips past strict mode with status clean, you win the vault.

👉 Test your payloads in the live simulator:
https://canaryguard-402.onrender.com/bounty.html

(Now includes a Sanitizer Mode toggle to see before/after text scrubbing live).

Curious to hear what injection payloads you can use to break it!

Top comments (0)