From 81905fbe8a36f2a5a77054d1c85f91beb52056ac Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Tue, 15 Mar 2022 08:44:54 -0400 Subject: [PATCH] Upload scan results to github security tab --- .github/workflows/scan.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 32e4b29..1b6c4c3 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -6,7 +6,7 @@ on: jobs: scan: - name: Scan + name: Scan for Security Vulnerabilities runs-on: ubuntu-18.04 steps: - name: Checkout code @@ -16,8 +16,15 @@ jobs: uses: aquasecurity/trivy-action@master with: image-ref: 'docker.io/library/rockylinux:8' - format: 'table' + format: 'sarif' + output: 'trivy-results.sarif' exit-code: '1' ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v1 + if: always() + with: + sarif_file: 'trivy-results.sarif'