When Devin runs queries against BigQuery, every request, response, and approval is captured in a reliable audit trail that can be replayed on demand. Teams can answer compliance questions, investigate anomalies, and prove that AI‑generated data accesses were authorized, all without slowing down the developer workflow.
AI coding agents like Devin are attractive because they can write and execute SQL on behalf of engineers in seconds. The trade‑off is that they often operate under a single service account that has broad read and write permissions. Without a dedicated control point, every query is indistinguishable from a human‑initiated request, and no reliable record exists of who triggered it, what data was returned, or whether an approval step was required.
Common mistakes amplify this risk. First, teams reuse the same credential for all AI agents, assuming that limiting network access is sufficient. Second, they rely on BigQuery’s native audit logs, which capture only high‑level events and omit the actual query text, making it impossible to trace the exact data flow. Third, they forget to mask sensitive columns, so downstream analysts can inadvertently see PII or secret keys returned by an AI‑generated query.
Why a non‑human identity alone is not enough
Moving Devin to a dedicated service account or a short‑lived OIDC token is a step in the right direction. It tells the identity provider who is making the request, and it can enforce least‑privilege scopes. However, the request still travels directly to BigQuery, bypassing any enforcement layer that could log the full query, mask protected fields, or pause execution for a human approval. In that configuration the audit trail is either missing or incomplete, and the organization cannot guarantee that every data access was reviewed.
Introducing a gateway as the enforcement point
hoop.dev provides a Layer 7 gateway that sits between Devin and BigQuery. The gateway receives the OIDC‑issued token, validates the identity, and then proxies the connection to the database. Because the gateway is the only path the traffic can take, it can record each session, apply inline masking, and route risky queries to an approval workflow before they reach BigQuery. In practice, hoop.dev creates the audit trails that were missing in the direct‑connect model.
When Devin initiates a query, hoop.dev captures the full SQL statement, the request timestamp, and the identity that presented the token. It streams the response back to Devin while simultaneously writing a detailed log entry. Those entries form a searchable, replayable audit trail that can be exported to SIEMs or retained for compliance reporting. Because the gateway holds the database credentials, the AI agent never sees them, reducing credential sprawl.
