Skip to content

ci: run Semgrep from PyPI and upload the report - #16

Merged
chrj merged 1 commit into
mainfrom
chrj/replace-deprecated-semgrep-action
Aug 14, 2026
Merged

ci: run Semgrep from PyPI and upload the report#16
chrj merged 1 commit into
mainfrom
chrj/replace-deprecated-semgrep-action

Conversation

@chrj

@chrj chrj commented Aug 13, 2026

Copy link
Copy Markdown
Owner

returntocorp/semgrep-action@v1 is deprecated. Semgrep archived it, so it takes no fixes and no new rules.

The scan runs from PyPI now, the way vanguard already runs it: set up Python, install a pinned Semgrep, then call semgrep scan.

The results were going nowhere

The old step asked for SARIF with generateSarif: "1", and no step ever uploaded it. The file was written inside the runner and thrown away with it, so nothing reached the Security tab of this repository, and the security-events: write permission went unused.

There is an upload step now, guarded so it runs only when the scan wrote a file:

- name: Upload SARIF
  if: always() && hashFiles('semgrep.sarif') != ''
  uses: github/codeql-action/upload-sarif@v4

always() matters: --error makes Semgrep exit non-zero when it finds something, which is exactly when the report is worth reading.

Pins

Semgrep is pinned to 1.171.0 and Python to 3.13, the versions vanguard runs. A scanner that moves on its own turns a green run red with no change from you.

The actions stay pinned to tags, as the rest of this repository pins them.

@chrj
chrj marked this pull request as ready for review August 14, 2026 09:53
@chrj
chrj merged commit db5cb0b into main Aug 14, 2026
2 checks passed
@chrj
chrj deleted the chrj/replace-deprecated-semgrep-action branch August 14, 2026 09:53
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.

1 participant