The quickest way to keep Devin from ever seeing production PII is to turn on data masking on the connection it queries through, before you connect the agent at all. Done in that order, the first query Devin runs already comes back redacted, and the raw values never enter the agent's context.
This is a fast first-connection walkthrough. The goal is a working masked connection you can verify in one query, then trust for real work without second-guessing it.
The first masked connection with data masking on
hoop.dev is an open-source Layer 7 access gateway. Devin reaches the database through it, and masking runs on the return path, redacting before results leave the gateway.
- Run the hoop.dev agent next to your database and register it as a connection.
- Configure a DLP provider such as Presidio so the gateway can classify fields like email, phone, and card number.
- Enable masking on the connection.
- Connect Devin through the connection and run
SELECT id, email FROM users LIMIT 1. - Confirm the email returns redacted while the id returns normally.
If the email comes back as [redacted], masking is working and you can let the agent loose on real queries. You verified the control before you trusted it, which is the right order. The provider setup is covered on the hoop.dev site.
Why masking has to live on the connection
The instant a raw email or token reaches Devin, it is in a process you do not control and may be forwarded to a model or written to a scratch file. Masking that happens later cannot un-send that value. The only point that actually protects the data is the boundary the result crosses on its way to the agent.
- Masking runs at the protocol layer on the streaming result, so redaction happens before the row leaves the gateway.
- Classification uses the configured DLP provider, not a fragile regex you maintain by hand and forget to update.
- The session is recorded too, so you can confirm what ran and that it was masked.
hoop.dev acts on the query results Devin receives over the connection. It does not read the model prompt or completion; it redacts the data, which is where the exposure is. The agent can reason about a redacted value just fine; what it cannot do is leak one it never received.
