How a Single Kubernetes YAML File Could Give an Attacker Control of a GCP Organization

Security researchers warn that misconfigured GitOps controllers can centralize risk, turning a developer convenience into a catastrophic vulnerability.

By LineZotpaper
Published
Read Time2 min
A GitOps setup intended to eliminate dangerous cloud credential sprawl in Google Cloud Platform (GCP) can inadvertently create an even greater security risk, according to a report from security firm Varonis. If a malicious actor compromises the single service account used by Google Kubernetes Config Connector (KCC), they can gain near-unlimited access to the entire organization's cloud infrastructure.

The core problem, as described by Varonis, lies in the architecture of GitOps controllers like KCC. These controllers are designed to remove the need for individual developers to possess cloud credentials. Instead, developers submit YAML configuration files to a shared Git repository. A controller running inside a Kubernetes cluster reads those files and creates or updates cloud resources on the developers' behalf.

The advantage is clear: developers have no access to cloud credentials, and the platform team manages only a single service account. This solves the problem of "secret sprawl," where dozens of credentials leak through copied files, Git repositories, and forgotten laptops.

However, Varonis points out that this solution concentrates all the power in one place. To manage infrastructure across multiple projects, folders, or an entire organization, the KCC service account is often granted broad, organization-level roles such as roles/owner or roles/resourcemanager.organizationAdmin.

A developer who submits a simple YAML file declaring an IAMPolicyMember resource can, through the controller, grant any permission to any account. For instance, a request to grant a service account the roles/storage.objectViewer role on a project looks innocent enough. But because KCC authenticates with organization-level privileges, a compromised controller or a malformed YAML file could be used to escalate privileges and take over the entire cloud organization.

"Every namespace shares KCC's single organization-level identity," Varonis notes in its analysis, highlighting how a compromise of the single Kubernetes interface could be catastrophic.

§

Analysis

Why This Matters

  • Concentrated risk defeats the purpose of credential minimization. A setup designed to reduce the attack surface by eliminating dozens of developer keys creates a single, high-value target.
  • The attack is trivial to execute. A single malicious or misconfigured YAML file committed to the repository could be enough to grant an attacker full administrative control of the GCP organization.
  • Detection is difficult. Because the action appears to originate from the authorized KCC service account, it may blend in with normal administrative activity and be missed by security monitoring tools.

Background

Google Kubernetes Config Connector (KCC) is a Kubernetes add-on that allows users to manage GCP resources declaratively using YAML configuration files. It is part of a broader GitOps movement, where infrastructure is treated as code and kept in version control. The goal is to automate cloud management and enforce security by removing direct human access to credentials. However, this pattern requires careful privilege separation — something that is often missed when operators give the controller broad organization-level roles for convenience.

Key Perspectives

[Security Experts (Varonis)]: The tightening of credential management at the developer level has shifted the risk. "The credential sprawl problem is solved," but it creates a centralized point of failure. Organizations must apply the principle of least privilege to the KCC service account itself. [Platform Engineers/DevOps Teams]: The appeal of a single service account is strong — it simplifies management and audit trails. Restricting the controller's permissions might break automation that spans multiple projects. [Critics/Skeptics]: Some argue that the risk exists in any system where a controller has broad privileges. The real failure is in the implementation — giving a controller an owner role is a known anti-pattern. Properly configured, with fine-grained access and resource scoping, the risk can be mitigated.

What to Watch

  • Changes to GCP IAM policies. Teams should monitor who is granted roles like roles/resourcemanager.organizationAdmin and whether the KCC service account is scoped to specific projects.
  • Adoption of Workload Identity Federation. Google Cloud offers alternatives to long-lived service account keys, such as federated identities. Watch for guidance from Google on using these with KCC to remove the single key entirely.
  • Security audits of Git repositories. The YAML files in the repo are now essentially API calls to the cloud. A compromised repository becomes a direct vector to the cloud control plane.

Sources

Zotpaper

Written by software from the reporting listed above, scored by an automated standards desk, and published without a person reading it first. If something here is wrong, tell the editor and it will be put right.