ci: pin the Semgrep version without hashes

Keep a single "semgrep==" line so Dependabot bumps Semgrep itself, but
let pip resolve its transitive dependencies instead of locking them by
hash.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-11-11 10:51:15 +01:00
1 parent 66452227ac
commit b23797aeac
2 files changed
+6 -5

No files matched your search

+5 -5
View File
@@ -52,12 +52,12 @@ jobs:
# the old action fell back to, running community rules with no token. # the old action fell back to, running community rules with no token.
# SEMGREP_APP_TOKEN is still passed through so registry auth works if a # SEMGREP_APP_TOKEN is still passed through so registry auth works if a
# token is ever added. # token is ever added.
# Semgrep is deliberately not pinned by hash: its transitive dependencies # The version is pinned, but not by hash: Semgrep pins its own dependencies
# are pinned to exact or compatible-release versions, which made the hashed # to exact or compatible-release versions, so a hash-pinned lock file broke
# lock file break on almost every Dependabot bump. The scan only produces # on almost every Dependabot bump of a transitive dependency. Dependabot
# SARIF findings and does not build or ship anything. # only bumps the semgrep line; pip resolves the rest.
- name: Install Semgrep - name: Install Semgrep
run: python3 -m pip install --user semgrep run: python3 -m pip install --user -r cmake/requirements/requirements-semgrep.txt
# `semgrep scan --sarif` always exits 0 even with findings; continue-on-error # `semgrep scan --sarif` always exits 0 even with findings; continue-on-error
# is a safety net so the SARIF upload still runs if the scan itself errors. # is a safety net so the SARIF upload still runs if the scan itself errors.
@@ -0,0 +1 @@
semgrep==1.184.0