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