Forget the threat-actor narrative for a second. The plain operational risk is this: an AI coding agent that can query your production database can read a lot of data, and that data flows into a context you do not fully control, then potentially onward. Whether it leaves through a malicious instruction, a buggy task, or an over-broad query, the mechanism is the same. Data exfiltration by AI coding agents starts with how much the agent can read and where it can send it.
The operational take skips the taxonomy of attacks and goes to the lever you control: the connection between the agent and the data. Bound what the agent can pull and you bound the exfiltration, whatever the cause.
The three things that decide exposure
- How much it can reach. A broad standing credential lets the agent query far more than any task needs, so the readable surface is enormous.
- What comes back in the clear. If full sensitive values land in the agent's context, every one of them is now exposure, even before anything leaves.
- Whether anyone can see the pull. If the agent's reads are not recorded at a boundary, a large or unusual extraction looks like normal work.
Notice that none of these are about detecting intent. They are about limiting reach, limiting what returns, and seeing what happened. All three live on the connection, not in the model.
Bound it at the connection
The control surface for exfiltration is the path between the agent and the data store. An identity-aware access gateway sits exactly there. Route the agent's database and infrastructure connections through hoop.dev and three things change at once. Access is just-in-time and scoped, so the agent can read only what the task needs, not the whole schema. Sensitive fields are masked in results on connections that support it, so values the agent does not need never reach its context in the clear. Every query is recorded at the gateway, so a large or unusual pull is visible and reconstructable. To be exact about scope: hoop.dev governs the infrastructure connection, not the model. It does not read the prompt or output. It controls what data the agent can pull and what comes back, which is where exfiltration is won or lost.
A concrete before-and-after
Before: the agent holds a standing read credential on the whole database, queries freely, and full customer records, names, emails, payment fields, land in its context, with the only log being the agent's own. A single bad task or injected instruction can read and forward all of it.
