🔷CIS GCP 5.2Rule: GCP-STG-002medium

Ensure Cloud Storage buckets have versioning enabled

Description

Object versioning protects against accidental deletion and overwrites.

⚠️ Risk Impact

Without versioning, ransomware attacks can permanently destroy data. Accidental deletions are unrecoverable.

🔍 How EchelonGraph Detects This

GCP-STG-002Automated scanner rule

EchelonGraph's Tier 1 Cloud Scanner automatically checks for this condition across all connected Google Cloud accounts. Violations are flagged as medium-severity findings with remediation guidance.

🖥️ Manual Verification

terminal
gsutil versioning get gs://BUCKET_NAME

🔧 Remediation

Enable versioning: gsutil versioning set on gs://BUCKET_NAME

💀 Real-World Attack Scenario

A disgruntled employee with storage admin access deleted all objects in the production backup bucket during their last day. Without versioning, the backups were permanently lost. The company discovered the deletion 3 days later when a database restore was needed, resulting in permanent loss of 2 weeks of transaction data.

💰 Cost of Non-Compliance

Average cost of permanent data loss: $150K-$2M depending on data type. Ransomware attacks targeting unversioned storage succeed 95% of the time. Business interruption from data loss averages 14 days.

📋 Audit Questions

  • 1.Which buckets have versioning disabled?
  • 2.What is your lifecycle policy for versioned objects?
  • 3.How do you protect against malicious deletion of version history?

🎯 MITRE ATT&CK Mapping

T1485 — Data DestructionT1486 — Data Encrypted for ImpactT1561 — Disk Wipe

🏗️ Infrastructure as Code Fix

main.tf
resource "google_storage_bucket" "versioned" {
  name     = "${var.project_id}-backups"
  location = var.region
  versioning {
    enabled = true
  }
  lifecycle_rule {
    condition { num_newer_versions = 5 }
    action { type = "Delete" }
  }
}

⚡ Common Pitfalls

  • Enabling versioning without lifecycle rules, leading to unbounded storage costs
  • Not enabling Object Lock for compliance-critical data that needs WORM protection
  • Assuming versioning protects against bucket-level deletion (it doesn't)

📈 Business Value

Versioning provides instant recovery from accidental deletion, ransomware, and insider threats. It's the cheapest insurance policy for your data.

⏱️ Effort Estimate

Manual

1 hour to enable versioning on all buckets

With EchelonGraph

EchelonGraph monitors versioning status across all buckets continuously

🔗 Cross-Framework References

SOC2-CC6.1ISO27001-A.12.3.1

Automate CIS GCP 5.2 compliance

EchelonGraph continuously monitors this control across all your cloud accounts.

Start Free →