Debian Codegraph @

.github/workflows/semgrep-analysis.yml

raw
1 # This workflow file requires a free account on Semgrep.dev to
2 # manage rules, file ignores, notifications, and more.
3 #
4 # See https://semgrep.dev/docs
5
6 name: Semgrep
7
8 on:
9 push:
10 branches: [ master ]
11 pull_request:
12 # The branches below must be a subset of the branches above
13 branches: [ master ]
14 schedule:
15 - cron: '19 5 * * 6'
16
17 jobs:
18 semgrep:
19 name: Scan
20 runs-on: ubuntu-latest
21 permissions:
22 contents: read
23 security-events: write
24 # Skip any PR created by dependabot to avoid permission issues
25 if: (github.actor != 'dependabot[bot]')
26 container:
27 image: semgrep/semgrep
28 steps:
29 # Fetch project source
30 - uses: actions/checkout@v4
31
32 - name: Run Semgrep
33 run: >
34 semgrep scan
35 --config p/security-audit
36 --config p/secrets
37 --sarif
38 --sarif-output=semgrep.sarif
39
40 # Upload findings to GitHub Advanced Security Dashboard [step 2/2]
41 - name: Upload SARIF file for GitHub Advanced Security Dashboard
42 uses: github/codeql-action/upload-sarif@v4
43 with:
44 sarif_file: semgrep.sarif
45 if: always()