r/devops • • 4d ago

Security How we manage vulnerabilities across ~90 apps: base images, Trivy, Dependency-Track and VEX policies in git

/r/kubernetes/comments/1y7789z/how_we_manage_vulnerabilities_across_90_apps_base/
12 Upvotes

7 comments sorted by

6

u/Lenin_Demas 2d ago

tbh the hardest part with ~90 apps usually isnt the scanning pipeline, its ownership when a shared library flags a critical CVE. How do you route the alerts so they dont just sit in a backlog nobody looks at

1

u/kUdtiHaEX 2d ago

Yeah maintenance and being persistent is something that tools cannot help with.

The visibility of issues is solved in two places. First is results in PRs which are constantly in front of development teams many thanks to everyday active development. As described in my post, results are split between App and OS findings and the ownership is already clearly defined.

Second is the daily digest. No alert per finding (which is default for DT), but one Slack thread a day. Each row is a (package, CVE) pair with the list of apps it hits and one action: bump, rebuild (wait for Monday if not urgent) or triage. A library that hits 40 apps is one row, not 40 alerts, and the row already says what to do.

So far this system works really well for us, and also recently introduced merge gate prevents merging PRs with critical findings.

1

u/Cliffhex6 3d ago

How do you keep vex statements fresh, our base rebuilds weekly and the not_affected notes point at old digests

1

u/kUdtiHaEX 3d ago

Good question, this was one of the first design problems. Two parts to the answer.

First, our statements do not point at digests at all. The product in each OpenVEX statement is the package PURL without a version, and the scoping to an app happens by which policy file the scan checks out. So a weekly rebuild does not orphan anything, the same statement matches the new image. We had to do it this way anyway, because PR scans build an image with no digest.

The downside is obvious: a statement can outlive the thing it was true for. So the freshness comes from the review side, not from the statement:

  • Every evidence line is pinned to a commit or an image tag. After the weekly rebuilds a refresh job flags an app when something about its findings changed: a new finding, a new CVE under a whole-package verdict, a package that left the image, a fix that became available, or an expiry within 30 days. For a flagged app the review then also checks every verdict against the new state: did the source move since the evidence commit, did the image move since the probed tag.
  • Only verdicts that trip a trigger get re-checked, and they get re-checked against the new image, with new evidence lines. Untouched ones keep their dates, so the weekly PR does not churn.
  • Every statement has a hard expiry (a year at most for not_affected, 90 days for affected, 30 for under investigation). An expired one is dropped by the scanner immediately, so if nobody reviews it, the finding comes back. That is the safety net when everything else fails.

With weekly rebuilds this means a lot of re-checks every week, which is the reason the re-checking is done by an agent in CI and I only review the drafts. Doing it by hand would nbot scale at this point.

1

u/Torutofu_Raeva 3d ago

i'd key the not_affected to the package purl and version instead of the image digest, then a weekly rebuild only invalidates it if that package actually changed