Interview Prep/DevSecOps/Container image and IaC scanning

tfsec/Trivy config warns `aws-ec2-no-public-egress-sgr` on every security group

IntermediateTroubleshootingContainer image and IaC scanning
Answer

Likely causes → egress 0.0.0.0/0 is the AWS default; most workloads need outbound internet or VPC endpoints.

Diagnose → trivy config --severity HIGH,CRITICAL ./infra

Fix → Restrict egress where feasible (VPC endpoints, NAT with egress firewall), otherwise ignore inline with a reason:

#trivy:ignore:aws-ec2-no-public-egress-sgr

(tfsec's #tfsec:ignore: still works in older setups; tfsec has been folded into Trivy.)

Prevent → Classify rules as blocking vs informational in a central config instead of hundreds of inline ignores.

All DevSecOps questions

More on Container image and IaC scanning