CCSS (Common Configuration Scoring System) is a set of measures used to determine the severity of the rule.
Each rule is associated with a high-level category. For example IAM, Container, Monitoring, Logging, Network, etc.
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 applicationsAllowing ingress from external sources can expose Cloud Functions to unauthorized access and potential attacks. Restricting ingress to internal traffic reduces the attack surface by ensuring that only traffic originating from within the cloud provider's network can reach the function. This mitigates risks associated with public endpoints and helps maintain a stronger security posture.
Set the ingress_settings
attribute to ALLOW_INTERNAL_ONLY
for the resource google_cloudfunctions_function
.
Set the service_config[_].ingress_settings
attribute to ALLOW_INTERNAL_ONLY
for the resource google_cloudfunctions2_function
.
resource "google_cloudfunctions_function" "allow1" {
name = "function-test1"
description = "My function"
runtime = "nodejs20"
available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket1.name
source_archive_object = google_storage_bucket_object1.object.name
trigger_http = true
entry_point = "helloWorld"
ingress_settings = "ALLOW_INTERNAL_ONLY"
}
resource "google_cloudfunctions2_function" "allow2" {
name = "function-test2"
location = "us-east1"
description = "a new function"
build_config {
runtime = "nodejs20"
entry_point = "helloHttp"
source {
storage_source {
bucket = google_storage_bucket.bucket2.name
object = google_storage_bucket_object.object2.name
}
}
}
service_config {
max_instance_count = 1
available_memory = "256M"
ingress_settings = "ALLOW_INTERNAL_ONLY"
}
}