An AI coding agent that can push code straight into a production Kubernetes cluster is a single point of catastrophic failure.
SOC 2 auditors treat this risk as a failure to enforce security, confidentiality, and processing integrity. Teams often expose a service‑account token to the agent, store it in a CI secret store, and let the agent invoke kubectl or the Kubernetes API directly. The token is long‑lived, scoped to the entire cluster, and never rotated. Because the request bypasses any gateway, every command the agent runs executes with full cluster privileges, and no central system records what was changed, who approved it, or whether sensitive data was exposed. If the agent is compromised, an attacker can enumerate pods, read secrets, and alter workloads without leaving a trace.
Even when organizations adopt a least‑privilege service account for the agent, the fundamental problem remains: the request still travels straight to the Kubernetes API server. The API server authenticates the token, but it does not provide a place to enforce runtime policies such as command‑level approval, inline masking of secret values in API responses, or session replay. Auditors looking for SOC 2 evidence will find a gap – the control environment can prove identity, but it cannot prove what the agent actually did, nor can it demonstrate that sensitive data was protected during the interaction.
SOC 2 requirements for AI coding agents
SOC 2 focuses on five Trust Service Criteria: security, availability, processing integrity, confidentiality, and privacy. For AI coding agents that interact with Kubernetes, the most relevant criteria are:
- Security: Restrict access to the minimum necessary and log every privileged action for review.
- Confidentiality: Protect secrets returned by the API from unauthorized exposure.
- Processing integrity: Ensure that only authorized code changes are applied and detect any deviation.
Auditors expect concrete evidence that these controls are enforced at the point where the request is made, not only at the identity provider. They look for immutable logs of each session, records of any just‑in‑time approvals, and proof that sensitive fields were masked before they could be captured in logs.
Why the data path must host the controls
Identity federation and scoped service accounts constitute the setup layer. They decide who the request is and whether it may start, but they cannot, on their own, guarantee that the request will be inspected, approved, or recorded. The only place to enforce the controls required by SOC 2 is the data path – the network hop that carries the request from the agent to the Kubernetes API.
When a gateway sits in that hop, it becomes the sole authority that can:
