Testing Provenance-Based Controls Against Indirect Prompt Injection in AI Agents

https://hackernoon.imgix.net/images/8abYqpMLHMQ6ETI8MW69J2qJBl73-pi83b9q.png

Most defenses against prompt injection are built around one question: does this text look malicious?

I spent a weekend betting that's the wrong question — and built a small tool that never reads the attacker's words at all. It caught attacks the "smart" detectors missed. It also, with total confidence, blocked every single legitimate action a real user would want to take.

Half a win is still half a loss. But the loss is the part worth writing about, because it points at a problem the entire industry is currently circling and nobody has cleanly solved. Here's the whole thing — the idea, the code, the results table I'm slightly embarrassed by, and what it actually taught me.

First, why prompt injection is such a nasty little problem

If you've built anything with an AI agent, you already know the shape of this. Your agent isn't just chatting. It's doing...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more