Skip to main content
compliance · gcp

Cloud Storage buckets with Object Versioning turned off

resource types
1
rule IDs covered
1
severity
low

What does ZopNight detect here?

Cloud Storage buckets with Object Versioning off keep no noncurrent copy when an object is overwritten or deleted, so an accidental `gcloud storage rm` or a bad upload replaces data permanently unless soft delete catches it. ZopNight flags every bucket that does not report versioning enabled, as a low-severity compliance finding with no saving.

Signal and threshold

How ZopNight evaluates Cloud Storage buckets with Object Versioning turned off.
Field Value
Rule IDsRC-141
Categorycompliance
Severitylow
Metricnone — pure configuration read
Thresholdversioning not enabled
SourceZopNight
Permissions usedstorage.buckets.list · storage.buckets.get

What Object Versioning keeps and what it costs

With Object Versioning on, Cloud Storage keeps a noncurrent version every time a live object is replaced or deleted. The Object Versioning overview explains that those versions stay accessible until you remove them, which lets you restore a file someone overwrote with a broken export or deleted by mistake.

It is not free. There is no default limit on the number of versions, and each noncurrent version is charged at the same rate as when it was live. Google also points out that versioning does not protect against deleting the bucket itself, and recommends soft delete as the primary guard against accidental or malicious deletion. The two can be used together: versioning for recent history, soft delete for bucket-level protection.

Checking versioning on a bucket

Terminal window
gcloud storage buckets describe gs://BUCKET_NAME --format="default(versioning_enabled)"

True means versioning is on. No output or False means it is off. List bucket names with gcloud storage buckets list --format="value(name)" to check a whole project.

The check ZopNight runs

ZopNight confirms the bucket record is complete by checking a storage class is present, then reads the bucket’s versioning setting. Unless versioning is reported as enabled, the rule fires; an explicit false and a missing value are treated the same way. Object count, size and access patterns play no part.

Buckets the rule does not report

A bucket whose details were not collected is skipped instead of flagged. Buckets with versioning on are silent, even if they have no lifecycle rule to prune old versions; that gap is covered by GCP GCS Bucket Missing Lifecycle Policy. The rule does not look at soft delete, so a bucket relying on soft delete alone is still reported, as the false-positive note explains.

Data-loss risk, with a cost to fixing it

ZopNight reports a $0 saving. Enabling versioning raises storage cost in proportion to how often objects change, which is why it should go with a lifecycle rule. The risk it removes is a single overwrite or delete wiping data with no copy left.

Enabling versioning without runaway storage

  1. Turn it on, per Google’s versioning instructions:

    Terminal window
    gcloud storage buckets update gs://BUCKET_NAME --versioning
  2. Add an Object Lifecycle Management rule that deletes noncurrent versions after a set number of days or keeps only the newest few.

  3. Wait at least 30 seconds after changing the setting before deleting or replacing objects, as Google advises, so the new behaviour applies.

  4. Check soft delete is also configured if you need protection against bucket deletion.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·