From b6614009cf30926e81dadb3c13b02f4cb77e364c Mon Sep 17 00:00:00 2001 From: jagpreetsinghsasan Date: Wed, 17 Jan 2024 11:10:58 +0530 Subject: [PATCH] Added trivy scan for comparision Signed-off-by: jagpreetsinghsasan --- .github/workflows/trivy.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/trivy.yaml diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml new file mode 100644 index 0000000000..ee22843be6 --- /dev/null +++ b/.github/workflows/trivy.yaml @@ -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'