alpha
Login
or
Join now
boltless.me
/
zoekt
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
fork of https://github.com/sourcegraph/zoekt
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
added semgrep scan (#872)
author
Shivasurya
committer
GitHub
date
2 years ago
(Dec 6, 2024, 12:39 PM -0500)
commit
5cad1d81
5cad1d81e5dbb0dd19af9b7a3ed093d7c6803e99
parent
39aae4e5
39aae4e513ac7bd2a25a818c60ba3f711b470465
+37
1 changed file
Expand all
Collapse all
Unified
Split
.github
workflows
semgrep.yml
+37
.github/workflows/semgrep.yml
Reviewed
···
1
1
+
name: Semgrep - SAST Scan
2
2
+
3
3
+
on:
4
4
+
pull_request_target:
5
5
+
types: [ closed, edited, opened, synchronize, ready_for_review ]
6
6
+
7
7
+
jobs:
8
8
+
semgrep:
9
9
+
permissions:
10
10
+
contents: read # for actions/checkout to fetch code
11
11
+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
12
12
+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
13
13
+
runs-on: ubuntu-latest
14
14
+
container:
15
15
+
image: returntocorp/semgrep
16
16
+
17
17
+
steps:
18
18
+
- uses: actions/checkout@v4
19
19
+
with:
20
20
+
ref: ${{ github.event.pull_request.head.ref }}
21
21
+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22
22
+
23
23
+
- name: Checkout semgrep-rules repo
24
24
+
uses: actions/checkout@v4
25
25
+
with:
26
26
+
repository: sourcegraph/security-semgrep-rules
27
27
+
token: ${{ secrets.GH_SEMGREP_SAST_TOKEN }}
28
28
+
path: semgrep-rules
29
29
+
30
30
+
- name: Run Semgrep SAST Scan
31
31
+
run: |
32
32
+
mv semgrep-rules ../
33
33
+
semgrep ci -f ../semgrep-rules/semgrep-rules/ --metrics=off --oss-only --suppress-errors --sarif -o results.sarif --exclude='semgrep-rules' --baseline-commit "$(git merge-base main HEAD)" || true
34
34
+
- name: Upload SARIF file
35
35
+
uses: github/codeql-action/upload-sarif@v3
36
36
+
with:
37
37
+
sarif_file: results.sarif