File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Semgrep
2+
3+ on :
4+ # Scan changed files in PRs, block on new issues only (existing issues ignored)
5+ pull_request :
6+
7+ push :
8+ branches : ["dev", "main"]
9+
10+ schedule :
11+ - cron : ' 23 20 * * 1'
12+
13+ # Manually trigger the workflow
14+ workflow_dispatch :
15+
16+ jobs :
17+ semgrep :
18+ name : Scan
19+ permissions :
20+ security-events : write
21+ runs-on : ubuntu-latest
22+ container :
23+ image : returntocorp/semgrep
24+ # Skip any PR created by dependabot to avoid permission issues
25+ if : (github.actor != 'dependabot[bot]')
26+ steps :
27+ # Fetch project source
28+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
30+ - run : semgrep ci --sarif > semgrep.sarif
31+ env :
32+ SEMGREP_RULES : >- # more at semgrep.dev/explore
33+ p/security-audit
34+ p/secrets
35+ p/owasp-top-ten
36+
37+ - name : Upload SARIF file for GitHub Advanced Security Dashboard
38+ uses : github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
39+ with :
40+ sarif_file : semgrep.sarif
41+ if : always()
You can’t perform that action at this time.
0 commit comments