Conversation
Replace mutable version tags with full commit SHAs for all external actions across the workflows, keeping the original version as a trailing comment. Same versions, immutable refs - no behavior change. Local reusable-workflow calls (uses: ./.github/workflows/...) are unchanged. Also add a Dependabot config for the github-actions ecosystem so the pinned SHAs continue to receive update PRs. Fixes nzbgetcom#853
- docker/Dockerfile: alpine 3.22.2 -> 3.22.5 (latest 3.22.x patch), pinned to the multi-arch OCI index digest so the base image is immutable across all build platforms - .github/dependabot.yml: add docker ecosystem so the pinned digest gets update PRs alongside the github-actions pins - refresh two pins whose tags moved since the PR was opened: actions/checkout v6.0.3 -> v6.1.0, docker/login-action v4.4.0 -> v4.6.0 (both verified against the upstream release tags)
|
Rebased the branch on current
Why this is a security PR
Concrete ways that gets exploited without SHA pinning:
A 40-char commit SHA / manifest digest is immutable, so updates only happen through explicit, reviewable dependabot PRs instead of silently at run time. Known limitation (unchanged from the PR description): pinned actions can still call unpinned transitive actions internally; pinning the first hop is still the standard mitigation (OpenSSF Scorecard checks for exactly this). |
Fixes #853
What
Replaces every mutable version tag in
.github/workflows/with the full 40-character commit SHA that tag currently resolves to, keeping the original version as a trailing comment so the pins stay legible and tooling can still bump them:Same versions, immutable refs — zero behavior change. Local reusable-workflow calls (
uses: ./.github/workflows/…) reference in-repo files and are unchanged.Also adds
.github/dependabot.ymlwith agithub-actionsecosystem entry (weekly) so the pinned SHAs continue to receive automated update PRs — Dependabot understands the# vXcomment convention and keeps it in sync when bumping.Why
Tags are movable. If any referenced action repository is compromised (maintainer account takeover or a force-moved release tag — the
tj-actions/changed-filesincident class), the next workflow run executes attacker-controlled code with whatever credentials the job holds. For this repo that means the release path inbuild.yml(secrets: inherit: code-signing key, SignPath credentials, macOS notarization identities, Docker Hub and Snapcraft tokens) and the self-hosted release runner. Pinning to commit SHAs removes the movable-tag vector. See #853 for the full threat model.Pinned actions (audit table)
Every SHA was resolved via the GitHub API (annotated tags dereferenced to their underlying commit) and independently cross-checked against
git ls-remotepeeled refs — both methods agreed on all 14:signpath/github-action-submit-signing-requestv2b9d91eadd323de506c0c81cf0c7fe7438f3360fdncipollo/release-actionv1339a81892b84b4eeb0f6e744e4574d79d0d9b8dddev-drprasad/delete-tag-and-releasev1.182600feb9527126eca69833f07bafe53279bd9b4geekyeggo/delete-artifactv6176a747ab7e287e3ff4787bf8a148716375ca118peter-evans/dockerhub-descriptionv4432a30c9e07499fd01da9f8a49f0faf9e0ca5b77miklinux/ghcr-cleanup-actionv15c95ee8945fd81f837669635a20ea2f2b751c477cross-platform-actions/actionv0.27.0fe0167d8082ac584754ef3ffb567fded22642c7dcross-platform-actions/actionv0.28.097419d18f6470332677e345e9df97cdc71244eaddocker/build-push-actionv753b7df96c91f9c12dcc8a07bcb9ccacbed38856adocker/setup-buildx-actionv4bb05f3f5519dd87d3ba754cc423b652a5edd6d2cdocker/login-actionv4af1e73f918a031802d376d3c8bbc3fe56130a9b0actions/checkoutv6df4cb1c069e1874edd31b4311f1884172cec0e10actions/upload-artifactv7043fb46d1a93c77aae656e7c1c64a875d1fc6a0aactions/download-artifactv83e5f45b2cfb9172054b4087a40e8e0b5a5461e7cThe two
cross-platform-actions/actionversions used intests.ymlare intentionally kept distinct and pinned to their own SHAs.Verification
@sha # tag→@tag) reproduces the 96 removed lines byte-for-byte — the diff contains nothing but tag→SHA rewrites.developand this branch (80 pre-existing findings, all shellcheck style notes inrun:scripts plus the custom self-hosted runner label; zero new).Known limitation / possible follow-ups