This Terraform template elevates the severity of findings to CRITICAL for specific AWS resources, such as an S3 bucket, when they are at risk.

Terraform Template

resource "aws_securityhub_automation_rule" "example" {

  actions {

    finding_fields_update {

      note {
        text = "This is a critical resource. Please review ASAP."
        updated_by = "sechub-automation"
      }

      severity {
        label = "CRITICAL"
        product = "0.0"
      }
      types = ["Software and Configuration Checks/Industry and Regulatory Standards"]

      user_defined_fields = {
        key = "value"
      }
    }
    type = "FINDING_FIELDS_UPDATE"
  }
  description = "Elevate finding severity to CRITICAL when specific resources such as an S3 bucket is at risk"
  rule_name = "Elevate severity of findings that relate to important resources"
  rule_order = 1
}