Skip to content

ci: SHA-pin first-party actions/* repo-wide (reverses #1022) - #1264

Merged
noahbjohnson merged 1 commit into
mainfrom
ci/sha-pin-first-party-actions
Sep 18, 2026
Merged

noahbjohnson merged 1 commit into
mainfrom
ci/sha-pin-first-party-actions

Conversation

@isaacschepp

Copy link
Copy Markdown
Collaborator

Closes #1263. Reverses the decision in #1022.

What changed

Every remaining floating uses: reference is now a full commit SHA plus a trailing # vX.Y.Z comment — 52 first-party actions/* references and sigstore/cosign-installer, which had been on an exact patch tag per #938. All 70 uses: lines across the 19 workflow files are SHA-pinned; there are no exceptions left.

Why

#1022 closed this morning on option (a), "accept the floats", reasoning that GitHub publishes actions/* and also operates the runners, so the publisher is trusted end-to-end.

That is the wrong question for a pin to answer. A pin does not assert the publisher is untrustworthy — it asserts that the ref cannot change under the workflow. A floating major is a mutable ref whoever owns it, and a re-pointed one executes with the workflow's permissions: the tj-actions/changed-files primitive (CVE-2025-30066). Ownership of the ref doesn't change that mechanic.

Two secondary benefits: any bare @vN in a workflow diff is now unambiguously a defect (no namespace classification needed at review time), and #928 (zizmor) can land without a per-namespace unpinned-uses exception config.

Source-of-truth ordering

Per .github/CLAUDE.md's "change the project file first" rule, the substantive change is to SECURITY-POSTURE.md § Action pinning, rewritten from three tiers to one namespace-blind rule. The .github/CLAUDE.md summary was updated afterwards to match, and the Level 2 control row "GitHub Actions pinned per a documented convention" restated.

The accepted consequence is restated honestly in the other direction rather than dropped. The old text accepted a Scorecard ceiling; the new text accepts the loss of Dependabot vulnerability alerts, which fire only for semver-tag refs and never for SHA-pinned ones. That is acceptable because the weekly github-actions Dependabot entry bumps the SHA and rewrites the version comment together, so a patched release arrives as a mergeable PR instead of an alert someone must act on by hand.

Behavior-neutral

Each floating major resolved to exactly the SHA pinned here, checked via repos/<owner>/<repo>/commits/<major> before the edit:

Action Tag SHA
actions/checkout v7.0.1 3d3c42e5aac5ba805825da76410c181273ba90b1
actions/setup-go v7.0.0 b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
actions/setup-node v7.0.0 820762786026740c76f36085b0efc47a31fe5020
actions/setup-python v7.0.0 5fda3b95a4ea91299a34e894583c3862153e4b97
actions/cache v6.1.0 55cc8345863c7cc4c66a329aec7e433d2d1c52a9
actions/upload-artifact v7.0.1 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
actions/download-artifact v8.0.1 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
actions/dependency-review-action v5.0.0 a1d282b36b6f3519aa1f3fc636f609c47dddb294
actions/create-github-app-token v3.2.0 bcd2ba49218906704ab6c1aa796996da409d3eb1
sigstore/cosign-installer v4.1.2 6f9f17788090df1f26f669e9d70d6ae9567deba6

No job runs different code after this PR than before it.

Guardrail preserved

The three actions that publish no floating major (ossf/scorecard-action #779, mszostok/codeowners-validator, sigstore/cosign-installer #938) keep a trailing do not "tidy" to @vN note on their uses: lines — "correcting" any of them fails with Unable to resolve action. scorecard-action did not carry that note before and now does.

Verification

  • All 19 workflow files parse as YAML; all 70 uses: references match @[0-9a-f]{40} and carry a version comment.
  • markdownlint-cli2 clean across the 68 linted markdown files.

Effect on Code Scanning

Closes all 55 open Pinned-Dependencies alerts (54 first-party floats + alert 208, release.yml:71). The Scorecard Pinned-Dependencies sub-score for GitHub Actions is no longer capped.

🤖 Generated with Claude Code

https://claude.ai/code/session_015KHE6GoBoSwQwQ3mSDMaM7

Pin every remaining floating `uses:` reference to a full commit SHA with a
trailing version comment: 52 first-party `actions/*` references plus
`sigstore/cosign-installer`, which was on an exact patch tag per #938. All
70 `uses:` lines across the 19 workflow files are now SHA-pinned.

#1022 closed on "accept the floats", reasoning that GitHub publishes
`actions/*` and also operates the runners. That is the wrong question for a
pin to answer: a pin asserts that the ref cannot change under the workflow,
not that the publisher is untrusted. A floating major is a mutable ref
whoever owns it, and a re-pointed one runs with the workflow's permissions --
the CVE-2025-30066 primitive.

Rewrite SECURITY-POSTURE.md's "Action pinning" section from three tiers to a
single namespace-blind rule, and restate the accepted consequence honestly in
the other direction: SHA pins forgo Dependabot vulnerability *alerts*, which
fire only for semver-tag refs, in exchange for immutability and the weekly
Dependabot version-update PRs that carry the fix. Update the .github/CLAUDE.md
summary to match, per that file's "change the project file first" rule.

Behavior-neutral: each floating major resolved to exactly the SHA pinned here
at the time of the change, verified via repos/<owner>/<repo>/commits/<major>.

Closes all 55 open Code Scanning Pinned-Dependencies alerts.

Closes #1263

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KHE6GoBoSwQwQ3mSDMaM7
Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying genealogix with  Cloudflare Pages  Cloudflare Pages

Latest commit: c44100f
Status: ✅  Deploy successful!
Preview URL: https://83bcd7e8.genealogix.pages.dev
Branch Preview URL: https://ci-sha-pin-first-party-actio.genealogix.pages.dev

View logs

@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@noahbjohnson
noahbjohnson merged commit 06a4dcb into main Sep 18, 2026
47 checks passed
@noahbjohnson
noahbjohnson deleted the ci/sha-pin-first-party-actions branch September 18, 2026 22:01
isaacschepp added a commit that referenced this pull request Sep 18, 2026
Resolves two SECURITY-POSTURE.md conflicts against #1264, which SHA-pinned
first-party actions/* and reversed the #1022 convention:

- The "GitHub Actions pinned per a documented convention" row takes main's
  universal-SHA text; this branch's stale pre-#1264 wording is dropped.
- The "Continuous security posture scoring" row keeps main's text plus this
  branch's pointer to the new Vulnerability suppression section.
- The Action pinning section keeps main's syft-installer paragraph, followed
  by this branch's new "Vulnerability suppression" subsection.

#1264 removed the accepted Pinned-Dependencies score ceiling, so the
suppression section's and changelog entry's cross-reference to it now points
at Action pinning's accepted consequence and known limits instead.

Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KHE6GoBoSwQwQ3mSDMaM7
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.

ci: SHA-pin first-party actions/* repo-wide (reverses #1022; one pin rule, no exceptions)

2 participants