Periodic vulnerability scanning of Docker images (e.g. via Trivy) with "fixable" filter
Problem
For Docker containers, PatchMon currently only shows whether a newer image is available. It doesn't show whether the images in use contain known vulnerabilities. An image can be "up to date" and still have open CVEs, and an available update doesn't say whether it fixes anything security-related.
Proposed solution
PatchMon periodically checks the images used on monitored hosts for known vulnerabilities with a scanner such as [Trivy](https://github.com/aquasecurity/trivy) and shows the results in the web UI.
Scanning location (preferably central on the PatchMon server):
- Agents already report image references and digests. The PatchMon server scans these images itself at a configurable interval (e.g. daily). This keeps load off the monitored hosts, needs only one vulnerability DB, and scans each digest once, no matter how many hosts use it.
- Fallbacks for images the server can't pull (locally built images, private registries without credentials):
- the agent generates a lightweight SBOM (trivy image --format cyclonedx) and sends it to the server, which scans it with trivy sbom, or
- Trivy's client/server mode, with the server component on the PatchMon host.
- Optional: registry credentials can be configured on the server for private registries.
Web UI:
- per container/image: number of vulnerabilities by severity (Critical / High / Medium / Low)
- a detail view with CVE ID, affected package, installed version, fixed version (if any), severity and a link to the advisory
- a dashboard overview: hosts/containers with the most critical findings
Filtering:
- by fix status: fixable (a fixed version exists) vs. not fixable (no fix available yet / won't fix)
- by severity
- by host, container and image
Optional: show whether the available image update fixes open CVEs, by scanning the new tag as well and comparing the findings.
Why the "fixable" filter matters
Many base images have a lot of CVEs with no fix available, so you can't act on them. Filtering for fixable vulnerabilities shows where updating or rebuilding an image actually reduces risk, and keeps that from being buried in noise.
Implementation notes
- Trivy outputs JSON (--format json), including FixedVersion and Status per finding, so the fixable filter maps directly onto its data.
- Results can be cached per image digest. On later runs, only the updated vulnerability DB needs to be re-evaluated (or the stored SBOM re-scanned), not the whole image.
- The scan interval and on/off switch should be configurable globally and per host group.
- The data could also be exposed via the API (e.g. a fixable critical count per host) for alerting and automation.
0 Comments
No comments yet. Be the first to share your thoughts.
