Skip to content

Commit 6026c52

Browse files
ci: add Semgrep SAST scanning on pull requests (#211)
Adds Semgrep static analysis on PRs to main via the reusable workflow in kernel/security-workflows. Includes .semgrepignore for generated code, test fixtures, and lock files. Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that adds static analysis on PRs and ignores generated/third-party files; main impact is potential new PR check failures/noise. > > **Overview** > Adds a Semgrep SAST GitHub Actions workflow that runs on pull requests to `main` via the reusable `kernel/security-workflows` workflow, scanning with the `p/golang` and `p/javascript` rulesets. > > Introduces a `.semgrepignore` to exclude dependencies, build artifacts, lockfiles, tests, and specific generated/fixture paths from scanning. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 42c18c8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 78d3f54 commit 6026c52

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Semgrep
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
scan:
13+
uses: kernel/security-workflows/.github/workflows/semgrep.yml@main
14+
with:
15+
extra-configs: '--config p/golang --config p/javascript'
16+
codebase-description: 'Base browser images with Go server and JS client'
17+
secrets: inherit

.semgrepignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
vendor/
3+
dist/
4+
.next/
5+
*_test.go
6+
go.sum
7+
package-lock.json
8+
server/lib/oapi/oapi.go
9+
images/chromium-headful/client/
10+
shared/cdp-test/

0 commit comments

Comments
 (0)