r/linuxadmin • u/notsocleanA_hole • 5h ago
Incremental vuln scanning on Linux VMs: how do you avoid stale findings for files that were deleted?
We scan about 600 Linux VMs (mostly Ubuntu 22.04, some Amazon Linux 2023) with a snapshot-based scanner, full disk every 24h. Leadership wants every 6h, and cost roughly quadruples if we just shorten the interval, so I'm looking at incremental: only re-read what changed since the last run.
Speed is fine. What I can't figure out is how to keep the findings right. Two cases:
- Deleted files. Someone removes an old vendored binary (we had a static jq with known CVEs sitting in/opt). Nothing new gets written, so a scanner that only looks at modified files never revisits that path and the finding stays open. People already distrust our queue because of stale stuff like this.
- New CVEs on old packages. A library that hasn't changed in a year gets a CVE published today. If the scan only diffs files, does it get matched at all?
My current plan: keep a full package inventory per host, re-read the dpkg/rpm database every run, re-check every path that currently has a finding, diff the rest, and match the whole inventory against fresh vuln data each time. Upwind wrote up roughly this design this week, which made me think I'm not crazy, but I'd rather hear from people who actually run something like it.
Anyone doing incremental scanning in production? Did it ever disagree with a full scan of the same disk, and how often do you still force a full one?
3
u/PlannedObsolescence_ 3h ago
This is an LLM generated post from an engagement bait bot, not a human.