ci: pin remaining GitHub Actions and all Docker base images to immutable references - #2533
Conversation
|
Hey Brendan Walsh (@BrendanWalsh) 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
5a746ee to
eb90a9d
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2533 +/- ##
==========================================
- Coverage 87.05% 86.81% -0.24%
==========================================
Files 338 338
Lines 18843 18843
Branches 1805 1805
==========================================
- Hits 16403 16359 -44
- Misses 2440 2484 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pin all GitHub Actions to commit SHAs and Docker base images to digest hashes to improve supply chain security and satisfy the OpenSSF Scorecard Pinned-Dependencies check. - Pin GitHub-owned actions (actions/checkout, actions/setup-python, etc.) - Pin third-party actions (peter-evans/*, lycheeverse/*, etc.) - Pin Docker base images to SHA256 digests - Add version comments for maintainability
The rebase aligned scorecards.yml to the same codeql-action commit codeql.yml already pins, but left the trailing comment as # v4. Dependabot reads that comment to decide what to bump, so it has to name the version the SHA actually is.
6c745aa to
ecd9a5b
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Thanks for driving this one through, Brendan Walsh (@BrendanWalsh)! Pinning every action and base image to an immutable digest closes a real supply-chain gap, and the eight Dockerfiles were the part that's easy to forget. Appreciate the follow-through. 🚀 |
Why
Floating references are mutable.
@master,@v2.x, and a bare image tag can all be repointed at new code by whoever controls the upstream — the classic tag-hijack supply-chain attack. Immutable references (commit SHAs, image digests) remove that class of risk and make builds reproducible.This also closes the OpenSSF Scorecard Pinned-Dependencies check.
Most of the repo was already pinned by earlier work. This PR closes the last three unpinned/imprecise references and pins the Docker base images.
What changed
GitHub Actions — 3 workflows
ado-pr-to-workitem.ymldanhellem/…@master@496254e4…# masterremove-awaiting-response-label.ymloctokit/request-action@v2.x@02f5e7c6…# v2.xscorecards.ymlcodeql-action/upload-sarif@d1ba80a1…# v4@5595ccaf…# v4.37.6codeql.yml, and relabelled with the precise versionThe first two upstreams publish no semver tags, so the pin tracks a branch head frozen at a known-good commit.
Docker base images — 8 Dockerfiles
Tags are kept alongside the digest (
image:tag@sha256:…) so the intended version stays readable.mirror/docker/library/ubuntu:22.04sha256:104ae837…d813da2fbtools/docker/{demo,minimal}openjdk/jdk:11-marinersha256:eea2eae2…d4bfc7c7tools/helm/{livy,spark,spark/mini,zeppelin}mmlspark/spark2.4:v4_minisha256:a7da0d7c…1a389279tools/helm/{livy/mini,zeppelin/mini}The ubuntu and openjdk pins target the multi-arch OCI index digest, which is the correct thing for
FROM.Verification
Every reference was resolved against the live GitHub and MCR registry APIs — 11 of 11 confirmed to match the version in its trailing comment:
master/v2.x.5595ccaf…verified by dereferencing annotated tagv4.37.6; it is the direct child of the previousd1ba80a1…, i.e. a one-release forward move inside major v4 — not a downgrade or cross-major jump.Impact
No functional change — every pin resolves to the same code and images CI was already running.
Trade-off worth naming: the two branch-head pins no longer receive upstream fixes automatically and must be refreshed by hand or by Dependabot. That is the intended effect of pinning, not a defect.
Checklist
build.sbt/ manifest change)