Check ID:
Provider: GCP
Service:
Severity: MEDIUM
Categories:
Resource type:
compute_instance_default_service_account_in_use_with_full_api_accessProvider: GCP
Service:
computeSeverity: MEDIUM
Categories:
identity-accessResource type:
compute.googleapis.com/InstanceWhat this check verifies
Compute Engine VM instances using the default service account with thecloud-platform scope (Allow full access to all Cloud APIs) are identified. GKE nodes are excluded.
Risk
With full API scope, any code on the VM can obtain tokens and, combined with the service account’s roles, call broad Google Cloud APIs. This enables privilege escalation, data exfiltration, unauthorized config changes, and service disruption, impacting confidentiality, integrity, and availability.Recommendation
Use a custom, least-privileged service account per VM and avoid the default account. Restrict Cloud API scopes-prefer minimal or per-API scopes, notAllow full access to all Cloud APIs. Enforce least privilege and separation of duties, and regularly review roles to remove excessive permissions.
Remediation
- Terraform
- Dashboard steps
References
- https://cloud.google.com/iam/docs/granting-changing-revoking-access
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/ComputeEngine/default-service-accounts-with-full-access-in-use.html
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = compute_instance_default_service_account_in_use_with_full_api_access. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GCP checks