diff --git a/.github/workflows/pr-merge-main.yml b/.github/workflows/pr-merge-main.yml index 7b87650..e91acda 100644 --- a/.github/workflows/pr-merge-main.yml +++ b/.github/workflows/pr-merge-main.yml @@ -62,10 +62,14 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest + permissions: + security-events: write + env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} SNYK_ORG: legal-aid-agency SNYK_TEST_EXCLUDE: build,generated + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 @@ -75,16 +79,12 @@ jobs: with: command: monitor args: --org=${SNYK_ORG} --all-projects --exclude=$SNYK_TEST_EXCLUDE - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Generate sarif Snyk report uses: snyk/actions/gradle@0.4.0 continue-on-error: true with: args: --org=${SNYK_ORG} --all-projects --exclude=$SNYK_TEST_EXCLUDE --sarif-file-output=snyk-report.sarif - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload result to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: snyk-report.sarif