Automation & Agents · 25 Nov 2026 · 20:20 CET
A Stranger Broke Our AI Agent’s Guardrails. Here Is What It Taught Us

Publisher preview · OZZZER analysis pending editorial review.
PUBLISHER ARTICLE PREVIEW
From the original article
A few weeks ago we published a technical walkthrough on a problem we see in almost every AI project we take on: how to stop an AI agent from reading data it shouldn’t. The short version was that you give the agent its own database role, grant it only the columns it needs, pin every query to one customer with row-level security, and write a test that tries to leak data.
It’s the pattern we recommend, and we tested every snippet before publishing.
The same day, a developer we had never met left a comment. He had rebuilt the whole setup from the article, seeded it with two test customers, and run our tests. They passed. Then he tried to break it, and found three separate ways to read one customer’s data while logged in as another.
He was right about all three. We reproduced each one before changing anything, fixed the article, and credited him at the top. But the bugs themselves matter less than what they say about how most teams are approaching AI agent security right now, ourselves included.
The most common mistake in “chat with your data” features is treating instructions to the model as access control. A system prompt that says “only answer questions about the current customer” is a request. Models follow it most of the time, and then a cleverly worded question, a confusing document or a prompt injection gets past it.
OWASP’s list of the top risks for LLM applications has a name for the underlying problem: excessive agency, meaning an AI system that has been given more permissions than its job requires. Their advice is the same advice security engineers have given for decades. Limit what the component can do, and enforce the limit somewhere the component cannot talk its way past.
It’s the same instinct behind the argument that AI agents need job descriptions, not better prompts: an agent’s authority should be defined outside the model, not inside it.
For an agent that queries a database, that somewhere is the database itself. Our article put the limits there, and we still got it wrong in three places. That’s the part worth learning from.
We granted the AI role read access to two tables, orders and products. We switched on row-level security for orders. We never switched it on for products.
Source
Unite.AI · 25 Nov 2026 · 20:20 CET
Open the original at Unite.AI ↗