Interview Prep/DevSecOps/Container image and IaC scanning

Image scan passes in CI but the registry scanner (ECR enhanced scanning / Harbor) shows criticals a week later

BeginnerTroubleshootingContainer image and IaC scanning
Answer

Likely causes → New CVEs were published after the build. A one-time CI scan is a point-in-time snapshot.

Diagnose →

aws ecr describe-image-scan-findings --repository-name myapp --image-id imageTag=1.4 \
  --query 'imageScanFindings.findingSeverityCounts'

Fix → Rebuild and redeploy with updated base layers; for running workloads, rescan what is deployed (Trivy Operator or registry continuous scanning).

Prevent → Continuous scanning of deployed images, plus scheduled rebuilds of all base images.

All DevSecOps questions

More on Container image and IaC scanning