From d6f66d67f8d0e59a12de458479d8ddd807382c34 Mon Sep 17 00:00:00 2001 From: David Lopes Date: Thu, 5 Nov 2026 00:44:43 +0000 Subject: [PATCH] fix: report Trivy CI as failed when the scan finds vulnerabilities Co-Authored-By: Claude Opus 5.5 --- .github/workflows/trivy-scan.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trivy-scan.yaml b/.github/workflows/trivy-scan.yaml index f10d2b6..428f780 100644 --- a/.github/workflows/trivy-scan.yaml +++ b/.github/workflows/trivy-scan.yaml @@ -176,7 +176,7 @@ jobs: if-no-files-found: ignore - name: Set status success - if: (success() || inputs.ignoreErrors == true) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') + if: ((success() && steps.trivy-table.outcome == 'success') || inputs.ignoreErrors == true) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -186,7 +186,7 @@ jobs: -f "context=${{ env.CHECK_NAME }}" - name: Set status failure - if: failure() && inputs.ignoreErrors == false && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') + if: (failure() || steps.trivy-table.outcome == 'failure') && inputs.ignoreErrors == false && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |