From bb0ffd2038864e0082f735a1f90f71315a581a58 Mon Sep 17 00:00:00 2001 From: webpwnized Date: Sun, 8 Oct 2023 15:32:40 -0400 Subject: [PATCH] 1.0.44 Automating Trivy Scan --- .github/workflows/run-trivy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/run-trivy.yml diff --git a/.github/workflows/run-trivy.yml b/.github/workflows/run-trivy.yml new file mode 100644 index 0000000..c4a6166 --- /dev/null +++ b/.github/workflows/run-trivy.yml @@ -0,0 +1,30 @@ +name: run-trivy +on: + push: + branches: + - development + - main + pull_request: +jobs: + build: + name: Run Trivy + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run Trivy vulnerability scanner in IaC mode + uses: aquasecurity/trivy-action@master + with: + scan-type: 'config' + hide-progress: false + format: 'sarif' + output: 'trivy-results.sarif' + exit-code: '1' + ignore-unfixed: true + severity: 'CRITICAL,HIGH' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif'