CRITICAL
Source
Trivy
ID
AVD-DIG-0001

The firewall has an inbound rule with open access

Opening up ports to connect out to the public internet is generally to be avoided. You should restrict access to IP addresses or ranges that are explicitly required where possible.

Impact

Your port is exposed to the internet

Follow the appropriate remediation steps below to resolve the issue.

Set a more restrictive CIRDR range

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 resource "digitalocean_firewall" "good_example" {
 	name = "only-22-80-and-443"
   
 	droplet_ids = [digitalocean_droplet.web.id]
   
 	inbound_rule {
 	  protocol         = "tcp"
 	  port_range       = "22"
 	  source_addresses = ["192.168.1.0/24", "fc00::/7"]
 	}
 }