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