From 8eb35730e3d87f5c0b940e1d3b337ab0fea43bce Mon Sep 17 00:00:00 2001 From: Andre Henn Date: Wed, 20 Dec 2023 16:39:52 +0100 Subject: [PATCH] configure trivy action to upload results to security tab --- .github/workflows/trivy.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 8a1807e..0862b6c 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -15,8 +15,13 @@ jobs: - name: Run trivy uses: aquasecurity/trivy-action@master with: - image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}' format: 'table' ignore-unfixed: true - vuln-type: 'os,library' + image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}' + output: 'trivy-results.sarif' severity: 'CRITICAL,HIGH' + vuln-type: 'os,library' + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif'