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"