From a3eecbe8c9c47829918bf226421892b25a4ae812 Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Fri, 15 Nov 2024 15:44:19 +0200 Subject: [PATCH] Disable security scan in ci-pr.yml Added env to control the scan. --- .github/workflows/ci-pr.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index acc0f04c8f..e9ea9a1896 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -3,6 +3,9 @@ name: CI PRs on: pull_request: +env: + ENABLE_SECURITY_SCAN: 'false' + jobs: build: runs-on: ubuntu-latest @@ -17,3 +20,26 @@ jobs: timeout-minutes: 75 run: | ./mvnw -B -s .github/settings.xml -Pdocs clean install + scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run Trivy vulnerability scanner in repo mode + if: ${{ env.ENABLE_SECURITY_SCAN == 'true' }} + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'table' + severity: 'CRITICAL,HIGH' + - name: 'Scanned' + if: ${{ env.ENABLE_SECURITY_SCAN == 'true' }} + shell: bash + run: echo "::info ::Scanned" + done: + runs-on: ubuntu-latest + needs: [ scan, build ] + steps: + - name: 'Done' + shell: bash + run: echo "::info ::Done"