fix(hardening): keep the images that fail on CRITICAL findings in the trivy report #136
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/trivy-report-keeps-failures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found 2026-10-13 while looking at the failed trivy-scan.service: it exited 1 ('Scan completed with critical vulnerabilities') but the saved report (trivy-scan-20261011_030000.json) contained only 6 images, all with 0 CRITICAL. The journal showed 15 images scanned, 9 failed, 119 CRITICAL in total. Cause: in scan_image an image with CRITICAL findings did 'return 1' BEFORE appending its result to the report, so the report held only the clean images, the leftover .tmp held only the last failing one, and the printed 'trivy convert' hint (which cannot read concatenated JSON anyway) pointed at a file with nothing to act on.
The 2026-10-11 numbers (from the journal, so the CVE details were never saved): klakegg/hugo:ext-alpine 55, boky/postfix:5.1.0 36, vaultwarden 1.37.1 7 (deployed is 1.37.4 now), cadvisor v0.49.1 5, watchtower 1.7.1 5, lldap:stable 4, authelia 4.39.2 3, fail2ban 1.1.0 3, node-exporter v1.10.2 1.
🤖 Generated with Claude Code