From b9cf93a306739cf0d1b2a59b27ab00e6f86ccc43 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Thu, 23 Apr 2026 11:50:03 +0200 Subject: [PATCH] Update trivy-action to 0.36.0 and print findings in CI logs Bump aquasecurity/trivy-action from 0.35.0 to 0.36.0 (Trivy 0.70.0) and add a step to print CVE findings from the SARIF output so they are visible directly in CI logs. Signed-off-by: Sacha Al Himdani --- .github/workflows/make.yaml | 12 +++--------- .github/workflows/release.yaml | 6 +++++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/make.yaml b/.github/workflows/make.yaml index b4b5e1a3b..05ee5c3fd 100644 --- a/.github/workflows/make.yaml +++ b/.github/workflows/make.yaml @@ -153,21 +153,15 @@ jobs: key: "trivy-db-${{ matrix.arch }}-${{ github.run_id }}" restore-keys: "trivy-db-${{ matrix.arch }}-" - name: "Scan Docker image with Trivy" - uses: "aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1" # 0.35.0 + uses: "aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25" # 0.36.0 with: image-ref: "ghcr.io/getprobo/probo:snapshot-${{ matrix.arch }}" - format: "sarif" - output: "trivy-results.sarif" - exit-code: 0 + format: "table" + exit-code: 1 ignore-unfixed: true vuln-type: "os,library" severity: "CRITICAL,HIGH" cache-dir: ~/.cache/trivy - - name: "Upload Trivy scan results" - uses: "github/codeql-action/upload-sarif@6bc82e05fd0ea64601dd4b465378bbcf57de0314" # v4.32.1 - with: - sarif_file: "trivy-results.sarif" - category: "trivy-${{ matrix.arch }}" # ── Snapshot: SBOM & vulnerability scan ──────────────────────────── snapshot-scan: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8cc1bd221..7e5cb8b61 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -315,7 +315,7 @@ jobs: path: "archives" merge-multiple: true - name: "Scan Docker image with Trivy" - uses: "aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1" # 0.35.0 + uses: "aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25" # 0.36.0 with: image-ref: "ghcr.io/getprobo/probo:${{ github.ref_name }}" format: "sarif" @@ -324,6 +324,10 @@ jobs: ignore-unfixed: true vuln-type: "os,library" severity: "CRITICAL,HIGH" + - name: "Print Trivy findings" + if: always() + run: | + jq -r '.runs[] | (.results // [])[] | .message.text' trivy-results.sarif - name: "Upload Trivy scan results" uses: "github/codeql-action/upload-sarif@6bc82e05fd0ea64601dd4b465378bbcf57de0314" # v4.32.1 if: always()