Skip to content

GCP storage bucket is logging to itself

Description

A check to ensure that the specified logging bucket is not itself. A bucket must not log access to itself, logging requires a second separate bucket.

Code Example

go
resource "google_storage_bucket" "mylovelybucket" {
  name     = "mylovelybucket"
  location = var.location
  uniform_bucket_level_access = true
  logging {
    log_bucket = "mylovelybucket"
    }
}

Remediation

Terraform

  • Resource: google_storage_bucket This check will trigger if you attempt to self reference:

Rule Details

FieldValue
IDIAC-0922
SeverityINFO
IaC TypeTerraform
FrameworksTerraform, TerraformPlan
Checkov IDCKV_GCP_63

References