Menu

1 / 2

How I built a sub-millisecond prompt-injection scanner in Rust (and why it only warns)

DEV Community: rust·Juan Carlos Isaza·5 days ago
#rRhPF3VI
#devtorust#devto#dev#detector#tool
Reading 0:00
15s threshold

How I built a sub-millisecond prompt-injection scanner in Rust (and why it only warns)

An AI coding agent is a program that reads untrusted text and then acts. That one

sentence is the whole security problem. Every web page it fetches, every repo it

reads, every tool result it ingests is a place an attacker can put an instruction

meant for the agent instead of for you.

I built guecha — two small Rust

hooks for Claude Code — to catch the part of that problem a machine can catch,

and to be honest about the part it can't. This is how it works, and the three

design decisions I'd defend.

The attack has three layers

Layer 1 — Perception. Hide the instruction in text the model reads but a

human reviewer doesn't.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.