Object versioning is not enabled Affecting Cloud Storage service in Google
Severity Framework
Snyk CCSS
Rule category
Data / Lifecycle
Is your enviroment 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 applicationsFrameworks
CIS-Controls
CSA-CCM
ISO-27001
SOC-2
- Snyk ID SNYK-CC-00372
- credit Snyk 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"
}
}
}