Check provider logo

Cloud Storage bucket is not publicly accessible

cloudstorage_bucket_public_access

Severitycritical
by Prowler

Cloud Storage buckets are assessed for anonymous or public access by detecting permissions granted to broad principals like allUsers or allAuthenticatedUsers that make bucket data reachable without authentication.

Risk

Public buckets undermine confidentiality and integrity. Anyone can list or download objects; if write access exists, content can be overwritten or deleted. Abuse enables hotlinking and malware hosting, impacting availability and driving unexpected egress costs.

Run this check with Prowler CLI

prowler gcp --checks cloudstorage_bucket_public_access

Recommendation

Adopt least privilege: remove allUsers/allAuthenticatedUsers and grant only required identities. Enforce Public Access Prevention and use uniform bucket-level access. If external sharing is needed, issue signed URLs or use an authenticated proxy/CDN, and review permissions regularly.

Remediation

CLI

gcloud storage buckets update gs://<example_resource_name> --public-access-prevention enforced

Terraform
Other
  1. In Google Cloud Console, go to Storage > Buckets and open <example_resource_name>
  2. Click the Permissions tab
  3. Set Public access prevention to Enforced
  4. Click Save

Source Code

Resource Type

storage.googleapis.com/Bucket

References