Repository navigation
Description
Problem
Every third-party action in .github/workflows/ is referenced by a floating tag (@v4, @v5, ...). A tag is mutable: whoever controls the action's repository can repoint it at different code, and that code runs with this repository's GITHUB_TOKEN. On the release.yml path it runs with contents: write, packages: write and now id-token: write — enough to publish a release, push an image to ghcr, and mint a Sigstore certificate carrying this repository's identity.
What to do
Pin every uses: to a full 40-character commit sha, with the human-readable version as a trailing comment:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Dependabot already manages github-actions and updates sha pins in place, keeping the comment in sync — so this costs nothing ongoing.
Constraints
- A pin is not a bump. Pin each action at the sha its current tag resolves to today. Changing a major version in the same change makes a behaviour regression indistinguishable from a pinning bug.
- Reusable-workflow calls (
uses: ./.github/workflows/ci.yml) are local paths and are not pinnable; they are also not third-party. - Worth a test in
internal/config/in the established style: walk.github/workflows/*.yml, assert every non-localuses:matches^[^@]+@[0-9a-f]{40} #. That is the piece that stops the next added action from arriving unpinned.
Why it was deferred rather than folded in
It touches every workflow file, which would have made the gate-unification diff (#500) and the signing diff (#501) unreviewable. It is mechanical and independent of both.
One related finding while working on #501, in case it recurs: sigstore/cosign-installer stops publishing floating majors at v3 — git/ref/tags/v4 is a 404 while v4.1.2 resolves. So for that action a floating major is not merely mutable, it does not resolve at all.
Activity
ci: pin every third-party action to a commit sha (#503)
ci: pin every third-party action to a commit sha (#503) (#510)