Skip to content

ci(lint): pin the semgrep container image by digest - #5245

Merged
dustin-decker merged 2 commits into
trufflesecurity:mainfrom
Portll:ci/pin-semgrep-image
Oct 24, 2026
Merged

dustin-decker merged 2 commits into
trufflesecurity:mainfrom
Portll:ci/pin-semgrep-image

Conversation

@Portll

@Portll Portll commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

zizmor unpinned-images: the semgrep job in lint.yml ran container: returntocorp/semgrep with no tag or digest, so each run pulled a mutable :latest — a non-reproducible lint environment that trusts whatever that tag points to at run time. This pins to 1.181.1 at its current digest (the promoted-stable image that Semgrep's latest tag points to, which current main CI already pulls), matching the SHA-pinning this repo already applies to every uses: action.

returntocorp/semgrep:1.181.1@sha256:3db5c7af55eb1f512eac0abf0ab69a97b52c74b5e9a27314c221aee1a78d7ab2

(Digest resolved from Docker Hub for tag 1.181.1 on 2026-10-23.)

Result

  • lint.yml unpinned-images finding: 0
  • actionlint: clean

Checklist

  • lint.yml parses and passes actionlint

Note

Low Risk
CI-only workflow change; no application, auth, or runtime behavior is affected.

Overview
The semgrep job in .github/workflows/lint.yml no longer uses the bare returntocorp/semgrep image (effectively mutable :latest). It now runs returntocorp/semgrep:1.99.0 pinned with a SHA256 digest, so lint runs use a fixed Semgrep version and image content, aligned with how other workflow dependencies are SHA-pinned.

Reviewed by Cursor Bugbot for commit 892f594. Bugbot is set up for automated code reviews on this repo. Configure here.

zizmor 'unpinned-images': the semgrep job ran
'container: returntocorp/semgrep' with no tag or digest, so each run
pulled a mutable ':latest', making the lint environment
non-reproducible and trusting whatever that tag points to at run time.
Pin to 1.99.0 at its current digest (sha256:ae27024c...), matching the
SHA-pinning already used for every action in this repo.

lint.yml unpinned-images findings go to 0; actionlint clean.
@CLAassistant

CLAassistant commented Aug 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Portll
Portll marked this pull request as ready for review August 26, 2026 12:30
@Portll
Portll requested a review from a team August 26, 2026 12:30
@Portll
Portll requested a review from a team as a code owner August 26, 2026 12:30
Use the 1.181.1 index digest that Semgrep's latest tag points to and
that main's CI already pulls, instead of the much older 1.99.0 pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dustin-decker
dustin-decker merged commit 8276bc4 into trufflesecurity:main Oct 24, 2026
15 checks passed
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.

3 participants