Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Google Cloud Platform Foundation v5.0.0 · 5.1

Cloud Storage buckets should not be open to anonymous or public access

  • Level 1
  • Storage

This check looks at the access policy on each Cloud Storage bucket for grants to allUsers or allAuthenticatedUsers. The safe setting is no such grants, ideally with public access prevention enforced.

Why it matters

If a bucket policy grants a role to allUsers, anyone on the internet can use it without signing in; allAuthenticatedUsers means anyone with any Google account. Objects in such a bucket can be read, listed or sometimes changed by people you never intended. Many data exposures start with a bucket that was opened for a quick test and never closed.

Google documents the protection in Public access prevention and the access model in IAM for Cloud Storage.

How to check it yourself

In the console open Cloud Storage > Buckets; the Public access column shows buckets that are public. For one bucket, the Permissions tab lists principals; look for allUsers and allAuthenticatedUsers. These read-only commands show the same:

gcloud storage buckets describe gs://<bucket-name> \
  --format="default(iam_configuration.public_access_prevention)"
gcloud storage buckets get-iam-policy gs://<bucket-name> --format=json

In the policy output, search for the two public principals. Nothing is modified.

How to fix it

Remove the public grants, then turn on public access prevention so they cannot return. In the console open the bucket's Permissions tab, remove the allUsers and allAuthenticatedUsers principals, and under Public access prevention choose Enforced. With gcloud:

gcloud storage buckets remove-iam-policy-binding gs://<bucket-name> \
  --member=allUsers --role=<role-found-in-policy>
gcloud storage buckets update gs://<bucket-name> --public-access-prevention

Repeat the first command for each public role and principal. If the content must be public, such as a static website, keep that bucket separate from private data and record the exception. ConfigCobra itself is read-only and never changes your projects.

What changes when you fix it

Anything that fetched objects without credentials stops working: public website assets, download links shared with customers, embedded images and third-party integrations that read the bucket anonymously. Those users get access-denied errors. Before enforcing, check the bucket's request logs or ask the owning team, then move public content to a dedicated bucket or serve it through a load balancer with a CDN. Callers who authenticate with IAM roles are not affected. ConfigCobra's remediation impact analysis lists affected resources and identities for a failing control before you apply the fix.

Included in

BenchmarkCIS IDProfile
CIS Google Cloud Platform Foundation v5.0.05.1Level 1

Check this on your Google Cloud

ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial