More Info:

Storage Buckets should have a retention policy defined to add an extra layer of protection, for instance, to assist recovery in case of an accidental deletion.

Risk Level

Low

Address

Security

Compliance Standards

CBP

Triage and Remediation

Remediation

Sure, here are the step by step instructions to remediate the storage bucket retention policy misconfiguration in GCP using the GCP console:

  1. Open the GCP console and navigate to the Cloud Storage section.
  2. Select the bucket for which you want to set the retention policy.
  3. Click on the “Edit bucket retention” button at the top of the page.
  4. In the “Retention period” section, select the desired retention period for the bucket. Note: The retention period specifies how long objects in the bucket must be retained before they can be deleted.
  5. Select the “Locked” option to prevent the retention policy from being removed or reduced. Note: This is an optional step, but it is recommended to prevent accidental removal of the retention policy.
  6. Click the “Save” button to apply the retention policy to the bucket.

That’s it! You have now remediated the storage bucket retention policy misconfiguration in GCP using the GCP console.