File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Name of this GitHub Actions workflow.
2+ name : Semgrep
3+ on :
4+ # Scan changed files in PRs (diff-aware scanning):
5+ pull_request : {}
6+ # Scan on-demand through GitHub Actions interface:
7+ workflow_dispatch : {}
8+ # Scan mainline branches if there are changes to .github/workflows/semgrep.yml:
9+ push :
10+ branches :
11+ - main
12+ - semgrep_integration
13+ paths :
14+ - .github/workflows/semgrep.yml
15+ # Schedule the CI job (this method uses cron syntax):
16+ schedule :
17+ - cron : ' 20 17 * * *' # Sets Semgrep to scan every day at 17:20 UTC.
18+ # It is recommended to change the schedule to a random time.
19+ jobs :
20+ semgrep :
21+ # User definable name of this GitHub Actions job.
22+ name : semgrep/ci
23+ # If you are self-hosting, change the following `runs-on` value:
24+ runs-on : ubuntu-latest
25+ container :
26+ # A Docker image with Semgrep installed. Do not change this.
27+ image : semgrep/semgrep
28+ # Skip any PR created by dependabot to avoid permission issues:
29+ if : (github.actor != 'dependabot[bot]')
30+ steps :
31+ # Fetch project source with GitHub Actions Checkout. Use either v3 or v4.
32+ - uses : actions/checkout@v4
33+ # Run the "semgrep ci" command on the command line of the docker image.
34+ - run : semgrep ci
35+ env :
36+ # Connect to Semgrep AppSec Platform through your SEMGREP_APP_TOKEN.
37+ # Generate a token from Semgrep AppSec Platform > Settings
38+ # and add it to your GitHub secrets.
39+ SEMGREP_APP_TOKEN : ${{ secrets.SEMGREP_APP_TOKEN }}
You can’t perform that action at this time.
0 commit comments