Skip to content

Add Semgrep SAST workflow - #39

Merged
quinnmil merged 1 commit into
mainfrom
semgrep-sast-ci
Nov 3, 2026
Merged

quinnmil merged 1 commit into
mainfrom
semgrep-sast-ci

Conversation

@quinnmil

@quinnmil quinnmil commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Why

Adds a static analysis check to every PR on main, so new security issues are caught before merge.

What

  • New .github/workflows/semgrep.yml with one job, Semgrep SAST: Semgrep's p/default ruleset in the pinned semgrep/semgrep:1.183.0 image, metrics off, read-only token, 15 min timeout.
  • PRs are diff-aware (--baseline-commit = the PR base), so only findings a PR introduces fail the check. The existing backlog doesn't block merges.
  • Pushes to main run a full, report-only scan. Also runnable via workflow_dispatch.
  • No paths filter, so it runs on every PR.

Merging runs

On the push to main:

  • Publish distribution to PyPI: builds the package, then publish-to-testpypi uploads to Test PyPI with skip-existing. 1.0.4 is already there, so that's a no-op. publish-to-pypi only runs on v* tags, so nothing is released.
  • Semgrep SAST full scan (report-only).

Test and Lint only runs on PRs. No deploys or releases.

Follow-ups

None in this repo.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NgEiZxpTQEsuZCXUbkYwXe

Runs Semgrep (p/default) on every PR to main. PRs are diff-aware, so only
findings a PR introduces fail the check. Pushes to main run a full,
report-only scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NgEiZxpTQEsuZCXUbkYwXe

@mitchh456 mitchh456 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trigger is main, which matches the default branch and release.yml. The checkout SHA resolves to v6.1.0, and the image and pins match the apm copy.

@quinnmil
quinnmil merged commit 380c9b2 into main Nov 3, 2026
9 checks passed
@quinnmil
quinnmil deleted the semgrep-sast-ci branch November 3, 2026 19:22

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants