Every container image carries an operating system and a pile of libraries, and some of them have known security holes. Trivy finds them before the image ships.
How I use it in CI:
- Scan every image before it's pushed. If the scan fails, the image never reaches the registry.
- Two passes. The first reports HIGH and CRITICAL issues without failing. The second fails the build only on CRITICAL issues that have a fix available.
- Skip what can't be fixed yet. Blocking on issues with no patch just stops every build.
- Pin the scanner's version. Security tools are supply-chain targets too.
The real skill is triage. A HIGH in a library your app never calls is less urgent than a MEDIUM in the code that handles logins. A scanner gives you a list; you decide what matters.