From ca207b326d67db9ed602d05f705fb5e44b0cbe5c Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Date: Thu, 6 Feb 2025 21:13:13 +0100 Subject: [PATCH] Added Trivy Vulnerability scanner for the project --- .github/workflows/trivy-scan.yaml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/trivy-scan.yaml diff --git a/.github/workflows/trivy-scan.yaml b/.github/workflows/trivy-scan.yaml new file mode 100644 index 000000000..595edd3c2 --- /dev/null +++ b/.github/workflows/trivy-scan.yaml @@ -0,0 +1,32 @@ +name: Trivy Scan + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + trivy_scan: + name: Trivy Vulnerability Scan + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Trivy + uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 + with: + scan-type: 'fs' + scan-all-sub-directories: true + format: 'table' + exit-code: '1' + ignore-unfixed: true + security-checks: 'vuln,config,secret' # Customize based on needs + + - name: Upload Trivy Results + uses: actions/upload-artifact@v4 + with: + name: trivy-report + path: trivy-report.*