-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.12 KB
/
semgrep.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
35
36
37
38
39
name: Semgrep
on:
pull_request:
branches: ['master']
permissions:
actions: read
contents: read
security-events: write
jobs:
semgrep:
name: semgrep/ci
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
# Skip any PR created by dependabot to avoid permission issues:
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: "Run the 'semgrep ci' command on the command line of the docker image."
run: semgrep ci --sarif --output=semgrep.sarif --config auto --config "p/gitlab" --exclude-rule yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
env:
# Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable.
# more at semgrep.dev/explore
SEMGREP_RULES: p/default
- name: Upload SARIF file for GitHub Advanced Security Dashboard
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif