Skip to content

Pin GitHub Actions to commit SHAs and add Dependabot - #264

Draft
skearnes wants to merge 1 commit into
move-pipeline-scriptsfrom
pin-actions
Draft

Pin GitHub Actions to commit SHAs and add Dependabot#264
skearnes wants to merge 1 commit into
move-pipeline-scriptsfrom
pin-actions

Conversation

@skearnes

@skearnes skearnes commented Jul 28, 2026

Copy link
Copy Markdown
Member

Version tags are mutable. The tj-actions/changed-files compromise in March 2025 repointed every version tag at a commit that dumped runner secrets into build logs, hitting roughly 23,000 repositories; tag pinning offered no protection and SHA pinning offered complete protection. This repository's workflows carry credentials worth protecting — HF_TOKEN with write access to the public Hugging Face mirror, and a GITHUB_TOKEN that pushes to submission branches — so actions/checkout and actions/setup-python move to SHAs, joining the setup-uv pins from #262 and #263.

The Dependabot config is the half that makes this sustainable, and it is not optional. Dependabot understands SHA-pinned actions and rewrites the SHA together with its trailing # vN comment, so pinned workflows keep tracking upstream. Without it, pinning silently freezes the workflows on whatever was current the day they were written.

That is not hypothetical within this org. ord-app and ord-infrastructure are both fully SHA-pinned with no update mechanism, and both sit on astral-sh/setup-uv v5.4.2 while this repository and ord-schema run v7. ord-app's actions/checkout pin is additionally stale within v4 — it points at a November 2025 commit, while v4 has since moved — and the two repositories disagree with each other on which checkout SHA to use. Companion Dependabot PRs for those two repositories follow.

Updates are grouped so this arrives as one pull request a month rather than one per action.

Every pin resolves the tag that was already in use, so nothing changes behavior. The pins were resolved through the git refs API, dereferencing annotated tags to their commits.

Stacked on #263; retargets to main as the chain merges.

🤖 Generated with Claude Code

Greptile Summary

The PR makes GitHub Actions references immutable and configures monthly grouped updates.

  • Pins actions/checkout across the mirror, submission, test, and validation workflows.
  • Pins actions/setup-python in both validation jobs.
  • Adds a Dependabot configuration that groups GitHub Actions updates into one monthly pull request.

Confidence Score: 4/5

The PR appears safe to merge, though the setup-python SHA should be corrected to the intended tagged v5 release.

Checkout and Dependabot changes preserve their intended behavior, while the setup-python references select an untagged development revision and misleadingly label it as the resolved v5 release.

Files Needing Attention: .github/workflows/validation.yml

Important Files Changed

Filename Overview
.github/dependabot.yml Adds a valid monthly grouped updater covering GitHub Actions workflows.
.github/workflows/huggingface_mirror.yml Replaces the mutable checkout v4 reference with its immutable release SHA.
.github/workflows/submission.yml Replaces both checkout v4 references with the same immutable release SHA.
.github/workflows/tests.yml Replaces the checkout v4 reference with its immutable release SHA.
.github/workflows/validation.yml Pins checkout correctly, but the setup-python pin selects an intermediate commit rather than the intended tagged v5 release.

Reviews (1): Last reviewed commit: "Pin the remaining actions to SHAs and ad..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

actions/checkout and actions/setup-python were on mutable major tags, the same
exposure the setup-uv pins addressed.

The Dependabot config is the half that makes SHA pinning sustainable: it
rewrites the SHA and its version comment together, so the workflows track
upstream instead of freezing. ord-app and ord-infrastructure show the failure
mode -- both are SHA-pinned with no update mechanism, and both sit a major
version behind on setup-uv, with one of the two also behind within its own
actions/checkout major.

Grouped monthly so this is one pull request rather than one per action.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ref: ${{ env.ORD_SCHEMA_TAG }}
path: ord-schema
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Pin the intended v5 release

This SHA identifies an intermediate dependency-update commit rather than the tagged release represented by # v5, so both validation jobs execute an unintended development revision and remain behind the released v5 action fixes until Dependabot replaces the pin.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect — a26af69be951a213d495a4c3e4e4022e16d87065 is the released tag, not an intermediate commit. From the tags API:

actions/setup-python@a26af69b  tags=[v5.6.0, v5]

It carries both v5.6.0 and the v5 major tag, so it is the current head of the v5 release line. Every pin in this PR was resolved the same way — via the git refs API, dereferencing annotated tags to their commits — precisely so the pins land on release commits rather than arbitrary revisions.

The comment reads # v5 rather than # v5.6.0 because the pin deliberately reproduces the ref that was already in use, keeping this PR free of behavior changes. Dependabot rewrites both the SHA and that comment on its first run.

🤖 Generated with Claude Code

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.

1 participant