CRITICAL
Source
Trivy
ID
AVD-DIG-0002

The load balancer forwarding rule is using an insecure protocol as an entrypoint

Plain HTTP is unencrypted and human-readable. This means that if a malicious actor was to eavesdrop on your connection, they would be able to see all of your data flowing back and forth.

You should use HTTPS, which is HTTP over an encrypted (TLS) connection, meaning eavesdroppers cannot read your traffic.

Impact

Your inbound traffic is not protected

Follow the appropriate remediation steps below to resolve the issue.

Switch to HTTPS to benefit from TLS security features

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 resource "digitalocean_loadbalancer" "good_example" {
   name   = "bad_example-1"
   region = "nyc3"
   
   forwarding_rule {
 	entry_port     = 443
 	entry_protocol = "https"
   
 	target_port     = 443
 	target_protocol = "https"
   }
   
   droplet_ids = [digitalocean_droplet.web.id]
 }