OSLogin Disabled

  • Query id: 32ecd6eb-0711-421f-9627-1a28d9eff217
  • Query name: OSLogin Disabled
  • Platform: Terraform
  • Severity: High
  • Category: Access Control
  • URL: Github

Description

Verifies that the OSLogin is enabled
Documentation

Code samples

Code samples with security vulnerabilities

Postitive test num. 1 - tf file
resource "google_compute_project_metadata" "positive1" {
  metadata = {
    enable-oslogin = false
  }
}

resource "google_compute_project_metadata" "positive2" {
  metadata = {
      foo  = "bar"
  }
}

Code samples without security vulnerabilities

Negative test num. 1 - tf file
resource "google_compute_project_metadata" "negative1" {
  metadata = {
    enable-oslogin = true
  }
}