Skip to content

Commit

Permalink
Add Semgrep GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
richardfan1126 committed Aug 5, 2024
1 parent 276adde commit 2f73705
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Semgrep

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
semgrep:
name: semgrep/ci
runs-on: ubuntu-latest

permissions:
security-events: write
actions: read
contents: read

container:
image: semgrep/semgrep

# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')

steps:
- uses: actions/checkout@v4

- run: semgrep ci --sarif > 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@v2
with:
sarif_file: semgrep.sarif
if: always()

0 comments on commit 2f73705

Please sign in to comment.