Skip to content

Commit 310fda3

Browse files
authored
wip
1 parent 60ea13c commit 310fda3

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

.github/workflows/semgrep.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
1+
# Name of this GitHub Actions workflow.
2+
name: Semgrep CE scan
3+
14
on:
2-
workflow_dispatch: {}
5+
# Scan in PRs:
36
pull_request: {}
7+
# Scan on-demand through GitHub Actions interface:
8+
workflow_dispatch: {}
9+
# Scan mainline branches and report all findings:
410
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):
1013
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+
1420
jobs:
1521
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:
1725
runs-on: ubuntu-latest
18-
permissions:
19-
contents: read
20-
env:
21-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
26+
2227
container:
28+
# A Docker image with Semgrep installed. Do not change this.
2329
image: semgrep/semgrep
30+
31+
# Skip any PR created by dependabot to avoid permission issues:
32+
if: (github.actor != 'dependabot[bot]')
33+
2434
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

0 commit comments

Comments
 (0)