More Info:

Instances should not be configured to use the default service account with full access to all cloud APIs. The principle of least privilege should be used to prevent potential privilege escalation.

Risk Level

High

Address

Security

Compliance Standards

CISGCP, CBP

Triage and Remediation

Remediation

To remediate the misconfiguration “VM Instances Should Not Use Default Service Accounts With Full Access To Cloud APIs” for GCP using GCP console, follow these steps:

  1. Go to the Google Cloud Console and select the project that contains the VM instances with default service accounts.

  2. Click on the “Compute Engine” option from the left-hand side menu.

  3. From the Compute Engine menu, select the “VM instances” option.

  4. Select the VM instance that is using the default service account with full access to Cloud APIs.

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

  6. Scroll down to the “Service account” section and click on the “Change” button.

  7. Select “Create a new service account” from the dropdown menu.

  8. Give the new service account a name and description.

  9. Under “Role”, select the appropriate role for the service account based on the permissions required for the VM instance.

  10. Click on the “Save” button to create the new service account.

  11. Once the new service account is created, select it from the “Service account” dropdown menu.

  12. Click on the “Save” button to apply the changes.

  13. Repeat these steps for all VM instances that are using the default service account with full access to Cloud APIs.

By following these steps, you will remediate the misconfiguration “VM Instances Should Not Use Default Service Accounts With Full Access To Cloud APIs” for GCP using GCP console.

Additional Reading: