From 2e7e5b03f068191851dff578f4158000a666840b Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Wed, 19 Apr 2023 07:13:07 +0200 Subject: [PATCH] update checks --- .github/workflows/trivy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index c6ef353c0..78f76a848 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -75,12 +75,13 @@ jobs: - name: Checkout uses: actions/checkout@v3.3.0 - name: "Check if image exists" + id: imageCheck run: | docker manifest inspect tractusx/${{ matrix.image }}:sha-${{ needs.git-sha7.outputs.value }} continue-on-error: true - name: Run Trivy vulnerability scanner - if: success() + if: success() && steps.imageCheck.outcome != 'failure' uses: aquasecurity/trivy-action@master with: image-ref: "tractusx/${{ matrix.image }}:sha-${{ needs.git-sha7.outputs.value }}" @@ -90,7 +91,7 @@ jobs: severity: "CRITICAL,HIGH" timeout: "10m0s" - name: Upload Trivy scan results to GitHub Security tab - if: always() + if: success() && steps.imageCheck.outcome != 'failure' uses: github/codeql-action/upload-sarif@v2 with: sarif_file: "trivy-results-${{ matrix.image }}.sarif"