Add semgrep AST scanning
This commit is contained in:
parent
812ca8650b
commit
463cf0791f
|
|
@ -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()
|
||||
Loading…
Reference in New Issue