From a9c898a6cb130fae63d02a5329553199cd4ccc06 Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 21 Apr 2023 21:50:36 -0400 Subject: [PATCH] Scan with Trivy on build Signed-off-by: Tommy --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0112221..f3b425b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,3 +74,18 @@ jobs: env: COSIGN_EXPERIMENTAL: "true" TAGS: ${{ steps.meta.outputs.tags }} + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@master + with: + image-ref: 'ghcr.io/tommytran732/synapse' + format: 'template' + template: '@/contrib/sarif.tpl' + output: 'trivy-results.sarif' + severity: 'CRITICAL,HIGH' + vuln-type: "os" + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif'