For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

GCP resources that support labels do not have labels misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_GCP_CUSTOM_1

Category - Subcategory

Monitoring - Tags and metadata

Provider

GCP

Severity

LOW

Framework

Terraform, Terraform Plan

Impact

Many different types of GCP resources support labels. Labels allow you to add metadata to a resource to help identify ownership, perform cost / billing analysis, and to enrich a resource with other valuable information, such as descriptions and environment names. While there are many ways that labels can be used, we recommend you follow a labeling practice. View Google's recommended labeling best practices https://cloud.google.com/compute/docs/labeling-resources[here].

How to Fix

The example below shows how to label a security group in Terraform. The syntax is generally the same for any label-enabled resource type. [source,go]

"resource "google_storage_bucket" "auto-expire" { name = "auto-expiring-bucket" location = "US" force_destroy = true

  • label {

  • type = prod }

lifecycle_rule { condition { age = 3 }

action { type = "Delete" }

} }

",

}

Last updated

Was this helpful?