fix(verdict): a rebuild that regresses is never an improvement
CI / Tests, lint (pull_request) Successful in 18s

A candidate on an older base-os than the pin, with Debian's point release
going back, or with a critical or high CVE the pin does not have and that
has a fix (the CVE gate's rule) is now "regressed": the pin stays, whatever
else it closes, and the report names each regression first.

The verdict action takes the components a nightly says moved (changes);
each is an improvement on its own, but only through the verdict, so a new
PostgreSQL minor on an older base-os is judged instead of waved through
(NetOrk/netork#2523). verdict.json carries base_os, changes and regressions.
A base-os version that cannot be read is no verdict.

Closes #3
This commit is contained in:
Christian Manivong committed 2026-11-15 22:43:55 +01:00
1 parent 77b31ed835
commit 015c6e18cb
6 files changed
+397 -28

No files matched your search

+12 -3
View File
@@ -1,8 +1,10 @@
name: Judge a rebuild against the pin
description: >-
Whether a candidate improves on the pinned image, by netOrk's matcher in
kb-server (image_tools/verify.py). Writes verdict.json and report.md, prints
the report, and fails when no verdict could be reached. The caller passes
kb-server (image_tools/verify.py). A candidate that is worse than the pin
anywhere (an older base-os, a new fixable critical or high CVE) is never an
improvement. Writes verdict.json and report.md, prints the report, and fails
when no verdict could be reached. The caller passes
NETORK_LICENSE_KEY, and TRIVY_USERNAME/TRIVY_PASSWORD for the registry, as env.
inputs:
current:
@@ -14,6 +16,12 @@ inputs:
packages:
description: The packages the image may hold, for the CIS part of the verdict
default: packages.allow
changes:
description: >-
A file naming the components that moved, one per line (a new PostgreSQL
minor). Each is an improvement on its own, unless the candidate regressed.
A nightly passes it here instead of skipping the verdict (image-tools#3).
default: ''
outputs:
improved:
description: '"true" when the candidate improves on the pin'
@@ -27,10 +35,11 @@ runs:
CURRENT: ${{ inputs.current }}
CANDIDATE: ${{ inputs.candidate }}
PACKAGES: ${{ inputs.packages }}
CHANGES: ${{ inputs.changes }}
PYTHONPATH: ${{ github.action_path }}/../..
run: |
python3 -m image_tools.verify "$CURRENT" "$CANDIDATE" --packages "$PACKAGES" \
--json verdict.json --report report.md
--changes "$CHANGES" --json verdict.json --report report.md
# Into the log: Gitea shows no step summary.
cat report.md
cat report.md >> "$GITHUB_STEP_SUMMARY"