From 58733ff32ec5a4907d0cfd3105242be630402431 Mon Sep 17 00:00:00 2001 From: RAHMAT AL ZAMI <112936589+zamibd@users.noreply.github.com> Date: Sun, 29 Nov 2026 05:47:22 +0000 Subject: [PATCH] Use Trivy 0.76.2 for vulnerability scans trivy-action v0.36.0, the latest release, installs Trivy 0.70.0 by default. Pin Trivy 0.76.2 for all three scans (CI, the pre-release scan and the weekly scan of the published image) through a TRIVY_VERSION variable in each workflow. Dependabot does not update it. --- .github/workflows/ci.yml | 7 +++++++ .github/workflows/release.yml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e023f2..8875d39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,12 @@ on: permissions: contents: read +# trivy-action installs its own default Trivy (0.70.0 in v0.36.0), which +# lags behind Trivy releases. Pin a current one; Dependabot does not +# update this line, so bump it by hand. +env: + TRIVY_VERSION: v0.76.2 + concurrency: group: ci-${{ github.ref }} cancel-in-progress: true @@ -111,6 +117,7 @@ jobs: if: matrix.arch == 'amd64' uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0 with: + version: ${{ env.TRIVY_VERSION }} image-ref: nginx:ci scanners: vuln ignore-unfixed: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a2056e..9e94eb6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,8 @@ concurrency: env: IMAGE: ghcr.io/${{ github.repository }} + # See ci.yml: the Trivy version trivy-action installs, bumped by hand. + TRIVY_VERSION: v0.76.2 jobs: plan: @@ -80,6 +82,7 @@ jobs: TRIVY_USERNAME: ${{ github.actor }} TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: + version: ${{ env.TRIVY_VERSION }} image-ref: ${{ env.IMAGE }}:${{ steps.ref.outputs.version }} scanners: vuln ignore-unfixed: true @@ -200,6 +203,7 @@ jobs: - name: Scan image for known vulnerabilities uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0 with: + version: ${{ env.TRIVY_VERSION }} image-ref: nginx:release-test scanners: vuln ignore-unfixed: true