🔷CIS GCP 5.1Rule: GCP-STG-001critical

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

GCP-STG-001Automated scanner rule

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

terminal
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

T1530 — Data from Cloud StorageT1119 — Automated Collection

🏗️ Infrastructure as Code Fix

main.tf
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

Manual

2-4 hours to audit all buckets across all projects

With EchelonGraph

EchelonGraph detects public buckets across all projects in <60 seconds

🔗 Cross-Framework References

SOC2-CC6.1ISO27001-A.8.2.3GDPR-Art32HIPAA-164.312(a)(1)

Automate CIS GCP 5.1 compliance

EchelonGraph continuously monitors this control across all your cloud accounts.

Start Free →