GCP Firewall rule allows all traffic on HTTP port (80) misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_GCP_106
Category - Subcategory
Public Exposure - Sensitive Ports
Provider
GCP
Severity
LOW
Framework
Terraform
Mapped CSPM/KSPM Rule
9f6d22f9-873a-4a71-91a8-41a82e4c9314
Impact
You should also consider restricting access to HTTP port 80 to only the IP addresses or ranges that need it. This can help reduce the risk of your network being accessed by unauthorized users or devices, and can also help reduce the risk of attacks such as denial of service (DoS) or distributed denial of service (DDoS) attacks.
How to Fix
[source,go]
{ " resource "google_compute_firewall" "restricted" { name = "example" network = "google_compute_network.vpc.name"
allow { protocol = "tcp" ports = ["80"] }
source_ranges = ["172.1.2.3/32"] target_tags = ["ssh"] }
", }
Last updated
Was this helpful?
