Object versioning is not enabled Affecting Cloud Storage service in Google


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Data/ Lifecycle

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-ControlsCSA-CCMISO-27001SOC-2
  • Snyk IDSNYK-CC-00372
  • creditSnyk Research Team

Description

The accidental or malicious changes to objects will not be reversible.

How to fix?

Set the storage bucket versioning.enabled attribute to true.

Example Configuration

resource "google_storage_bucket" "allowed" {
  name          = "auto-expiring-bucket"
  location      = "US"
  force_destroy = true
  versioning {
    enabled = true
  }

  lifecycle_rule {
    condition {
      age = 3
    }
    action {
      type = "Delete"
    }
  }
}