fix replace block for golang-jwt/jwt/v4 to fix GHSA-29wx-vh33-7x7r #5798
This file contains 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: "Semgrep" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request_target: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
semgrep: | |
name: Analyze Semgrep | |
runs-on: ubuntu-latest | |
container: returntocorp/semgrep | |
if: (github.actor != 'dependabot[bot]') | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4 | |
- name: Register workspace path | |
if: ${{ github.event.number > 0 }} | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Checkout Pull Request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
id: checkout | |
if: ${{ github.event.number > 0 }} | |
run: | | |
apk add github-cli | |
gh pr checkout ${{ github.event.number }} | |
- run: semgrep ci --sarif --output=semgrep.sarif | |
env: | |
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | |
- name: Upload SARIF file for GitHub Advanced Security Dashboard | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: semgrep.sarif | |
if: ${{ github.event.number == '' && !cancelled() }} |