A contractor who was recently offboarded still has a CI pipeline that invokes GitHub Copilot to generate SQL against a production PostgreSQL cluster. The pipeline runs nightly, and the generated statements are sent directly to the database using a static service‑account password stored in the repository. No one sees the exact queries, no approval step exists, and the credentials never change, even after the contractor leaves.
When an AI coding agent like Copilot is granted production access, it inherits the same risks as any human with a privileged credential: it can unintentionally expose personally identifiable information, run destructive DDL, or create queries that bypass business‑logic constraints. Because the agent’s output is code, the risk surface expands – a single suggestion can translate into dozens of statements that touch sensitive tables. Organizations that treat production data as a high‑value asset need a way to see exactly what an AI writes, to hide columns that should never leave the database, and to require a human sign‑off before dangerous operations are executed.
Production access, in this context, means that every piece of code generated by GitHub Copilot that touches a live PostgreSQL instance is subject to the same guardrails that protect human engineers. The guardrails include real‑time query inspection, inline masking of confidential fields, just‑in‑time (JIT) approval for high‑risk commands, and immutable session logs that can be replayed for audit or forensic analysis.
Most teams today solve the problem by creating a service account, giving it a long‑lived password, and configuring the CI job to use that credential. The identity that launches the job is often a generic CI token, which satisfies the authentication requirement but provides no visibility into which AI‑generated statements actually reach the database. The request still travels straight to PostgreSQL, bypassing any point where policy could be enforced. Even if the CI system integrates with an OIDC provider, the token only decides whether the job may start; it does not mediate the data path.
Enter hoop.dev. hoop.dev is a Layer 7 gateway that sits between the AI agent (or the CI job that invokes it) and the PostgreSQL target. It authenticates callers via OIDC/SAML, holds the database credential itself, and inspects every wire‑protocol message before it reaches the server. Because hoop.dev is the only place the traffic passes, it can apply the full suite of production‑access controls.
How hoop.dev enforces production access for GitHub Copilot
When the CI job asks Copilot to generate a query, the resulting SQL is sent to hoop.dev instead of directly to PostgreSQL. hoop.dev validates the caller’s token, maps the identity to a set of permissions, and then evaluates the query against a policy engine. If the statement attempts to read or write a column marked as sensitive, hoop.dev masks the value in the response so that downstream logs never contain raw data. If the query includes a DDL operation, hoop.dev routes it to a human approver and blocks execution until the approval is recorded. Every command – successful or blocked – is captured in a session record that can be replayed later.
Because hoop.dev holds the database password, the AI agent never sees the credential. The agent only presents a short‑lived OIDC token, which hoop.dev verifies before allowing any traffic. This separation means that revoking the token instantly cuts off access without having to rotate the database password.
In practice, hoop.dev provides four concrete outcomes that satisfy production‑access requirements:
