Merge pull request #1315 from vadi2/fix-show-inherited-invariants #1580
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "OWASP Security Scans" | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| permissions: # added using https://github.com/step-security/secure-repo | |
| contents: read | |
| jobs: | |
| analyze: | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - env: | |
| NVD_API_KEY: | |
| ${{ secrets.NVD_API_KEY }} | |
| OSSINDEX_USERNAME: | |
| ${{ secrets.OSSINDEX_USERNAME }} | |
| OSSINDEX_PASSWORD: | |
| ${{ secrets.OSSINDEX_PASSWORD }} | |
| run: | | |
| mvn -DskipTests install -P OWASP_CHECK -DossIndexUsername=${{ env.OSSINDEX_USERNAME }} -DossIndexPassword=${{ env.OSSINDEX_PASSWORD }} | |
| - env: | |
| NVD_API_KEY: | |
| ${{ secrets.NVD_API_KEY }} | |
| OSSINDEX_USERNAME: | |
| ${{ secrets.OSSINDEX_USERNAME }} | |
| OSSINDEX_PASSWORD: | |
| ${{ secrets.OSSINDEX_PASSWORD }} | |
| run: | | |
| mvn -DskipTests dependency-check:aggregate -P OWASP_CHECK -DossIndexUsername=${{ env.OSSINDEX_USERNAME }} -DossIndexPassword=${{ env.OSSINDEX_PASSWORD }} | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@a4e1a019f5e24960714ff6296aee04b736cbc3cf # v3.29.6 | |
| with: | |
| # Path to SARIF file relative to the root of the repository | |
| sarif_file: target/dependency-check-report.sarif | |
| # Optional category for the results | |
| # Used to differentiate multiple results for one commit | |
| category: OWASP-dependency-check | |