Ensure Cloud Storage buckets are not publicly accessible
Description
Cloud Storage buckets should not grant access to allUsers or allAuthenticatedUsers.
⚠️ Risk Impact
Publicly accessible buckets are the leading cause of cloud data breaches. Sensitive data (PII, credentials, backups) can be exfiltrated.
🔍 How EchelonGraph Detects This
EchelonGraph's Tier 1 Cloud Scanner automatically checks for this condition across all connected Google Cloud accounts. Violations are flagged as critical-severity findings with remediation guidance.
🖥️ Manual Verification
gsutil iam get gs://BUCKET_NAME | grep -E 'allUsers|allAuthenticatedUsers'🔧 Remediation
Remove allUsers and allAuthenticatedUsers from bucket IAM. Enable Uniform Bucket-Level Access.
💀 Real-World Attack Scenario
A backend developer created a GCS bucket for temporary file uploads and set it to public for testing. The bucket name followed a predictable pattern (company-uploads-prod). An attacker discovered it through bucket enumeration and downloaded 340,000 customer records including SSNs, payment history, and medical documents.
💰 Cost of Non-Compliance
Capital One 2019: $80M fine + $190M settlement from public S3 bucket. Average public bucket breach cost: $4.45M (IBM 2024). HIPAA penalties for exposed ePHI: $1.5M per violation category per year.
📋 Audit Questions
- 1.List all buckets with public IAM bindings (allUsers or allAuthenticatedUsers).
- 2.Is the Organization Policy constraint storage.publicAccessPrevention enabled?
- 3.How do you prevent developers from creating public buckets?
- 4.What data classification is stored in each bucket?
🎯 MITRE ATT&CK Mapping
🏗️ Infrastructure as Code Fix
resource "google_storage_bucket" "secure" {
name = "${var.project_id}-data"
location = var.region
uniform_bucket_level_access = true
public_access_prevention = "enforced"
}⚡ Common Pitfalls
- ⛔Using ACLs instead of IAM (ACLs can inadvertently grant public access)
- ⛔Not enabling the organization-level public access prevention policy
- ⛔Setting buckets to 'allAuthenticatedUsers' thinking it means 'all my users' (it means all Google accounts)
📈 Business Value
Preventing public bucket exposure eliminates the #1 cloud data breach vector. A single public bucket can expose your entire customer database. This control is table-stakes for any compliance certification.
⏱️ Effort Estimate
2-4 hours to audit all buckets across all projects
EchelonGraph detects public buckets across all projects in <60 seconds
🔗 Cross-Framework References
Automate CIS GCP 5.1 compliance
EchelonGraph continuously monitors this control across all your cloud accounts.
Start Free →