Add semgrep AST scanning

This commit is contained in:
Starttoaster 2025-11-28 13:24:39 -08:00 committed by GitHub
parent 812ca8650b
commit 463cf0791f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 30 additions and 0 deletions

30
.github/workflows/semgrep.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Semgrep
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
actions: read
security-events: write
jobs:
scan:
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v4
- run: semgrep scan --config=auto --sarif --output=semgrep.sarif
env:
SEMGREP_RULES: auto
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: semgrep.sarif
category: semgrep
if: always()