A data‑science contractor leaves the company, but a CI job they built continues to spin up Postgres queries on behalf of an autonomous AI agent. The job uses a hard‑coded database user and password that were checked into source control months ago. No one reviews the agent’s activity, and the credential never rotates. When the contractor’s access is revoked, the agent still runs, pulling customer data into downstream pipelines. The organization assumes the agent is covered by the original access review, yet the review never saw the agent’s requests, the queries it issued, or the data it returned.
Most teams address the problem by moving the credential into a secret manager and assigning a service account with a narrower role. The service account is tied to an identity provider, and the CI pipeline authenticates via OIDC tokens. This step limits the scope of what the agent can do, but the request still travels directly to Postgres. The database sees a regular client connection, the token is validated upstream, and the query executes without any visibility into who approved it, what data was returned, or whether the operation complied with policy. The access review process remains blind to the agent’s runtime behavior.
Why access reviews matter for autonomous agents
Access reviews are intended to verify that every identity that can touch a system still needs that privilege. Autonomous agents break that model because they act without a human in the loop. An agent can generate thousands of queries, shift data between tables, or export rows to external storage, all while appearing as a single service account. If the review only checks the static permissions granted to the account, it misses the dynamic risk introduced by the agent’s logic, frequency, and data paths.
Three gaps appear when autonomous agents are left unchecked:
- Blind execution. The database logs show a user name, but they do not reveal the business context that triggered each query.
- Missing approval trail. High‑risk operations, such as dropping tables or exporting large result sets, are performed without any human sign‑off.
- Insufficient evidence for auditors. When regulators ask for proof that access reviews covered all activity, the organization can only produce static role definitions, not the actual usage patterns of the agent.
Placing enforcement in the data path
To close those gaps, the enforcement point must sit where the traffic actually passes. Identity and token validation (the setup) decide who may start a session, but they do not observe the commands that flow through the connection. Only a gateway that proxies the client‑to‑Postgres link can inspect each query, mask sensitive columns, require just‑in‑time approval for risky statements, and record the full session for replay.
