Check provider logo

Cloud Storage bucket has Object Versioning enabled

cloudstorage_bucket_versioning_enabled

Severitymedium
by Prowler

Cloud Storage buckets with Object Versioning keep prior object generations. The finding indicates whether the bucket's versioning setting is enabled.

Risk

Without Object Versioning, deleted or overwritten objects can't be restored, reducing availability and integrity. Compromised credentials or faulty processes can irreversibly delete or corrupt data, enabling ransomware-style destruction, accidental loss, and weakening forensic reconstruction.

Run this check with Prowler CLI

prowler gcp --checks cloudstorage_bucket_versioning_enabled

Recommendation

Enable Object Versioning on buckets holding important data. Pair with lifecycle rules to expire noncurrent versions and control cost. Enforce least privilege for delete/overwrite actions, and add bucket retention policies or object holds for defense-in-depth and auditability.

Remediation

CLI

gcloud storage buckets update gs://<BUCKET_NAME> --versioning

Terraform
Other
  1. In Google Cloud Console, go to Storage > Buckets and open <BUCKET_NAME>
  2. Click the Configuration tab, then click Edit
  3. Set Object versioning to Enabled
  4. Click Save

Source Code

Resource Type

storage.googleapis.com/Bucket

References