Back to controls

Ensure default Service account is not used for Project access in Kubernetes Clusters

GKE nodes should use a dedicated IAM service account with only the permissions required for cluster operations. Using the Compute Engine default service account for node access increases blast radius if a node or workload is compromised.

Category

Controls

Medium

Applies to

Google Cloud

Coverage

1 queries

Asset types

1 covered

Overview

GKE nodes should use a dedicated IAM service account with only the permissions required for cluster operations. Using the Compute Engine default service account for node access increases blast radius if a node or workload is compromised.

Rationale

Google documents that GKE uses node service accounts for system tasks such as logging and monitoring. The safer pattern is to create a dedicated node service account, grant only the required roles, and keep workload access separate through Workload Identity Federation for GKE where possible.

Remediation guidance

Using Command Line

Create a dedicated node service account:

export PROJECT_ID=$(gcloud config get-value project)
export NODE_SA_NAME=gke-node-sa

gcloud iam service-accounts create $NODE_SA_NAME   --display-name="GKE Node Service Account"

export NODE_SA_EMAIL="$NODE_SA_NAME@$PROJECT_ID.iam.gserviceaccount.com"

Grant the minimum roles GKE documents for node operation:

gcloud projects add-iam-policy-binding $PROJECT_ID   --member="serviceAccount:$NODE_SA_EMAIL"   --role="roles/container.defaultNodeServiceAccount"

gcloud projects add-iam-policy-binding $PROJECT_ID   --member="serviceAccount:$NODE_SA_EMAIL"   --role="roles/logging.logWriter"

gcloud projects add-iam-policy-binding $PROJECT_ID   --member="serviceAccount:$NODE_SA_EMAIL"   --role="roles/monitoring.metricWriter"

gcloud projects add-iam-policy-binding $PROJECT_ID   --member="serviceAccount:$NODE_SA_EMAIL"   --role="roles/monitoring.viewer"

Create a replacement node pool that uses the dedicated account:

gcloud container node-pools create secure-pool   --cluster=[CLUSTER_NAME]   --location=[LOCATION]   --service-account="$NODE_SA_EMAIL"

Drain workloads to the new node pool, then remove the old pool that used the default service account.

Better platform fix

Pair this with Workload Identity Federation for GKE so application Pods do not need to inherit broad node identity permissions.

References

  1. https://cloud.google.com/kubernetes-engine/docs/how-to/service-accounts

Service-wide remediation

Recommended when many resources are affected: standardize dedicated node service accounts and stop using the Compute Engine default service account for new clusters and node pools.

Bake the dedicated node service account into your cluster and node-pool modules, then enforce the standard through reviews and IaC.

Operational rollout

  1. Create the dedicated node service account and validate required GKE permissions.
  2. Roll out replacement node pools using that identity.
  3. Migrate workloads and decommission node pools that still use the default service account.

Query logic

These are the stored checks tied to this control.

Default Service account is not used for Project access in Kubernetes Clusters

Connectors

Google Cloud

Covered asset types

Cluster

Expected check: eq []

{gkeClusters(where:{nodePools_SOME:{nodeConfig:{serviceAccount:"default"}}}){...AssetFragment}}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon