name: No new fixable critical or high CVE description: >- The release gate (image_tools/cve_gate.py): fails when the candidate has a critical or high CVE that the last release of the same image does not have and that has a fix, by netOrk's matcher in kb-server. A new one without a fix is listed and passes. Writes cve-gate.json and cve-gate.md, prints the report, and fails as well when no verdict could be reached, an empty key included. The caller passes NETORK_LICENSE_KEY (a kb API key whose plan grants feature_match), and TRIVY_USERNAME/TRIVY_PASSWORD for the registry, as env. inputs: release: description: The last release of the image, as a registry reference required: true candidate: description: The image to push, as Docker can run it (local tag or reference) required: true arch: description: The platform both are read for, amd64 or arm64 required: true outputs: passed: description: '"true" when the candidate brings no new fixable critical or high CVE' value: ${{ steps.gate.outputs.passed }} runs: using: composite steps: - id: gate shell: bash env: RELEASE: ${{ inputs.release }} CANDIDATE: ${{ inputs.candidate }} ARCH: ${{ inputs.arch }} PYTHONPATH: ${{ github.action_path }}/../.. run: | status=0 python3 -m image_tools.cve_gate "$RELEASE" "$CANDIDATE" --platform "linux/$ARCH" \ --json cve-gate.json --report cve-gate.md || status=$? # Into the log: Gitea shows no step summary. cat cve-gate.md cat cve-gate.md >> "$GITHUB_STEP_SUMMARY" if [ "$status" -eq 0 ]; then passed=true; else passed=false; fi echo "passed=$passed" >> "$GITHUB_OUTPUT" # 1: blocked, 2: no verdict. Either way nothing is pushed. exit "$status"