-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (29 loc) · 960 Bytes
/
semgrep-scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Ref: https://semgrep.dev/docs/semgrep-ci/sample-ci-configs#sample-github-actions-configuration-file
name: Semgrep OSS scan
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
permissions:
contents: read
jobs:
semgrep:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: semgrep-oss/scan
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run Semgrep OSS scan
run: semgrep scan --config auto --sarif-output=semgrep.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1
with:
sarif_file: semgrep.sarif