Skip to content

Commit e2d540b

Browse files
Try to configure Semgrep to run without auth in CI
so we can run it for all contributions and don't depend on the availability of the Semgrep servers.
1 parent c4bf867 commit e2d540b

File tree

2 files changed

+20
-30
lines changed

2 files changed

+20
-30
lines changed

.github/workflows/checks.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,26 @@ jobs:
159159
npm pack
160160
- name: Verify checksum
161161
run: shasum --check checksums.txt --strict
162+
semgrep:
163+
name: Semgrep
164+
runs-on: ubuntu-24.04
165+
permissions:
166+
security-events: write # To upload SARIF results
167+
container:
168+
image: semgrep/semgrep
169+
steps:
170+
- name: Checkout repository
171+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
172+
with:
173+
persist-credentials: false
174+
- name: Perform Semgrep analysis
175+
run: semgrep --sarif --output semgrep.sarif
176+
env:
177+
- name: Upload Semgrep report to GitHub
178+
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
179+
if: ${{ failure() || success() }}
180+
with:
181+
sarif_file: semgrep.sarif
162182
test-breakage:
163183
name: Breakage
164184
runs-on: ubuntu-24.04

.github/workflows/semgrep.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)