From 484883df559da7e844c7bfe2d4d4bcfe027e68a2 Mon Sep 17 00:00:00 2001 From: Bennet Schulz Date: Mon, 2 Oct 2023 14:56:15 +0200 Subject: [PATCH] add trivy pr check --- .github/workflows/trivy-pr-check.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/trivy-pr-check.yml diff --git a/.github/workflows/trivy-pr-check.yml b/.github/workflows/trivy-pr-check.yml new file mode 100644 index 000000000..ee22843be --- /dev/null +++ b/.github/workflows/trivy-pr-check.yml @@ -0,0 +1,27 @@ +name: build +on: + push: + branches: + - main + pull_request: +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run Trivy vulnerability scanner in repo mode + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'sarif' + output: 'trivy-results.sarif' + severity: 'CRITICAL' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif'