Interview Prep/DevSecOps/Container image and IaC scanning

Trivy reports a critical CVE in a Go binary built from your own code, in package `stdlib`

IntermediateTroubleshootingContainer image and IaC scanning
Answer

Likely causes → The binary was compiled with an old Go toolchain; Trivy reads the embedded build info and flags the Go standard library version.

Diagnose →

go version -m ./bin/app | head -3
trivy image --format json myapp:1.4 | jq '.Results[] | select(.Type=="gobinary")'

Fix → Rebuild with a patched Go release (update golang:1.xx builder tag and the go/toolchain directive in go.mod).

Prevent → Renovate tracks the builder image tag and toolchain line; rebuild on new Go patch releases.

All DevSecOps questions

More on Container image and IaC scanning