More Info:

It is recommended to configure your instance to not use the default Compute Engine service account because it has the Editor role on the project.

Risk Level

High

Address

Security

Compliance Standards

CISGCP, CBP, HITRUST, SOC2, NISTCSF, PCIDSS

Triage and Remediation

Remediation

Sure, here are the step-by-step instructions to remediate the misconfiguration “VM Instances Should Not Use Default Service Account” for GCP using GCP console:

  1. Open the GCP console and navigate to the Compute Engine page.

  2. Select the VM instance that is using the default service account.

  3. Click on the “Edit” button at the top of the page.

  4. Scroll down to the “Cloud API access scopes” section.

  5. Click on the “Set access for each API” link.

  6. Uncheck the box next to “Allow default access to all Cloud APIs”.

  7. Select the specific API access scopes that are required for the VM instance.

  8. Click on the “Save” button at the bottom of the page.

  9. Repeat steps 2-8 for all VM instances that are using the default service account.

By following these steps, you will remediate the misconfiguration “VM Instances Should Not Use Default Service Account” for GCP using GCP console.