Skip to content

CSPACE-SA-01: Workload SA cannot be impersonated to bypass attestation

Property Value
Severity high
Platform GCP Confidential Space (AMD SEV-SNP)
Lifecycle stage deploy
Mode Passive: read-only cloud API calls.

What it checks

It passes when:

  • No principal can impersonate the workload SA.

Example failures:

  • … principal(s) can impersonate the workload SA: …. They can mint tokens as the SA and reach KMS/GCS with no attestation.
  • allAuthenticatedUsers can impersonate the workload SA (tokenCreator) — mint tokens as the SA and reach KMS/GCS with no attestation.

How to fix

  • Remove serviceAccountTokenCreator / serviceAccountUser / workloadIdentityUser grants on the workload SA except where strictly required, and never to broad/public principals.
  • Remove serviceAccountTokenCreator/User grants on the workload SA.

After the fix, scan again: the check should report PASS.

When it is not assessed

SKIP:

  • Need --gcp-instance, --gcp-zone, and --gcp-project; skipping check.

ERROR:

  • Could not read SA IAM policy: …

Scan inputs

The untrust scan options this check reads:

Option Description
--gcp-instance Confidential VM instance name.
--gcp-project GCP project ID.
--gcp-zone Zone of the Confidential VM.

Permissions

The cloud API calls this check makes, read from the scanner's source:

Cloud API call Permission Access
Google Cloud compute.instances.get compute.instances.get read
Google Cloud iam.projects.serviceAccounts.getIamPolicy iam.serviceAccounts.getIamPolicy read

See Required permissions for every check on this platform.

  • Runtime detection DET-C10 (GCP Confidential Space): Long-lived key created on the workload service account
  • Runtime detection DET-C14 (GCP Confidential Space): Workload Confidential VM's service account changed
  • Runtime detection DET-C7 (GCP Confidential Space): Impersonation granted on a service account outside the identity pool

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).