turbot/steampipe-mod-gcp-compliance

Control: Ensure default Service account is not used for Project access in Kubernetes Engine clusters

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.disable_gke_default_service_account

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_compliance.control.disable_gke_default_service_account --share

SQL

This control uses a named query:

select
self_link resource,
case
when node_config ->> 'ServiceAccount' = 'default' then 'alarm'
else 'ok'
end as status,
case
when node_config ->> 'ServiceAccount' = 'default' then title || ' default service account is used for project access.'
else title || ' default service account is not used for project access.'
end as reason
, location as location, project as project
from
gcp_kubernetes_cluster;

Tags