Lion Cipher Lab

Scan container images and IaC for flaws with Trivy

Why it matters

Almost nothing you deploy to a cloud today is something you wrote from scratch. You start `FROM` a base image somebody else built, you pull in dozens of open-source libraries, and you describe the infrastructure in a Terraform or CloudFormation file. Every one of those is a place a flaw can hide that is not your code and not your fault — a years-old CVE in a base image's OpenSSL, a Dockerfile that runs your app as root, a security group left open to the whole internet, an API key a colleague pasted into a config 'just for testing'. You cannot fix what you cannot see, and by the time a flaw is…

What you'll learn

Steps in this lab

  1. Three kinds of flaw, and the one word that ties them together: 'shift left'
  2. One tool, three scan targets — and how offline actually works
  3. Install Trivy — Docker is the zero-friction path
  4. Scan the old image, and read the report column by column
  5. Focus and gate: --severity, --ignore-unfixed, and --exit-code
  6. Scan your IaC for misconfigurations with trivy config
  7. Scan the folder for hardcoded secrets
  8. The measured fix loop — bump, harden, re-scan, watch the number fall
  9. The CVEs you cannot fix — an empty FIXED VERSION, and how a pro triages
  10. Do it better — the habits, and what 'done' really means

Open the full interactive lab →