Cloud Storage bucket is publicly accessible Affecting Cloud Storage service in Google


Severity

0.0
high
0
10
Severity Framework
Snyk CCSS
Rule category
IAM/ Public Access

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-ControlsCIS-GoogleCSA-CCMHIPAAISO-27001SOC-2
  • Snyk IDSNYK-CC-00373
  • creditSnyk Research Team

Description

Potentially anyone can access data stored in the bucket.

How to fix?

Remove allUsers and allAuthenticatedUsers values from member or members attribute.

Example Configuration

resource "google_storage_bucket_iam_member" "allowed" {
  bucket = "test"
  role   = "roles/storage.admin"
  member = "user:jane@example.com"
}

resource "google_storage_bucket_iam_binding" "allowed" {
  bucket = "test"
  role   = "roles/storage.admin"
  members = [
    "user:jane@example.com",
  ]
}