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.
More on Container image and IaC scanning
Trivy fails the build on 14 HIGH/CRITICAL CVEs in the base image, all with "Fixed Version" emptyBeginner`FATAL ... failed to download vulnerability DB: ... TOOMANYREQUESTS: retry-after` from Trivy in CIIntermediateTrivy in an air-gapped runner fails with `failed to download vulnerability DB` even though you copied `db.tar.gz`AdvancedTrivy and Grype report different CVE counts for the same imageIntermediate`.trivyignore` entries are ignored and the build still fails on the same CVEBeginnerTrivy reports a critical CVE in a Go binary built from your own code, in package `stdlib`Intermediate