Skip to content

Pin GitHub Actions by SHA and add 5-day Dependabot cooldown#7880

Merged
achamayou merged 3 commits into
mainfrom
copilot/investigate-pinning-github-actions
May 13, 2026
Merged

Pin GitHub Actions by SHA and add 5-day Dependabot cooldown#7880
achamayou merged 3 commits into
mainfrom
copilot/investigate-pinning-github-actions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

Summary

Hardens the supply chain of our GitHub Actions workflows by pinning every action reference to an immutable commit SHA, and configures Dependabot to wait 5 days after a new release before opening an update PR.

Changes

.github/workflows/*.yml (12 files)

Every uses: line is rewritten from owner/action@<tag> to owner/action@<40-char-sha> # <tag>. The trailing comment preserves the human-readable tag so reviewers can see at a glance which version is pinned, and Dependabot recognises this format and will update both the SHA and the comment together.

Resolved pins:

Action Tag (comment) SHA
actions/attest-build-provenance v4 a2bbfa2…
actions/checkout v6 de0fac2…
actions/configure-pages v6 45bfe01…
actions/deploy-pages v5 cd2ce8f…
actions/download-artifact v8 3e5f45b…
actions/setup-node v6 48b55a0…
actions/upload-artifact v7 043fb46…
actions/upload-pages-artifact v5 fc324d3…
github/codeql-action/{init,analyze} v4 68bde55…
bencherdev/bencher v0.6.5 99117a6…

bencherdev/bencher — behaviour change to flag

Previously referenced as @main, a moving branch with no release semantics. It is now pinned to the SHA of the latest release tag (v0.6.5), which happens to be the same commit main currently points at. Going forward, Dependabot will propose updates only when a new release tag is published, rather than every commit landing on main. Please confirm this is the desired behaviour.

.github/dependabot.yml

Added a 5-day cooldown for the github-actions ecosystem and switched its schedule to daily so updates land promptly once the cooldown elapses. The npm and pip ecosystems are unchanged.

- package-ecosystem: "github-actions"
  directory: "/"
  schedule:
    interval: "daily"
  cooldown:
    default-days: 5

The 5-day delay is a deliberate trade-off: it reduces the risk of pulling in a freshly tagged-but-compromised release, at the cost of delaying legitimate security fixes to Actions by up to 5 days. Actions only run in CI (not in production), so this is a reasonable balance.

Verification

  • All workflow files and the Dependabot config parse cleanly as YAML.
  • No source code or tests are affected; CI itself will exercise the new pins on this PR.
  • No CHANGELOG.md entry is required (CI-only change, not user-facing).

@achamayou
Copy link
Copy Markdown
Member

@copilot did you miss an actions or workflows?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 12, 2026

@copilot did you miss an actions or workflows?

Double-checked: all 12 files under .github/workflows/ are covered, and grep -rE 'uses: [^@]+@[^0-9a-f]' .github/workflows/ returns nothing — every uses: is now pinned to a 40-char SHA. There are also no action.yml/action.yaml composite actions in the repo, so nothing else to pin.

@achamayou achamayou marked this pull request as ready for review May 12, 2026 15:32
@achamayou achamayou requested a review from a team as a code owner May 12, 2026 15:32
Copilot AI review requested due to automatic review settings May 12, 2026 15:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Hardens the CI supply chain by pinning all GitHub Actions workflow uses: references to immutable commit SHAs, and updates Dependabot scheduling to control when workflow dependency updates are proposed.

Changes:

  • Pin all GitHub Actions and third-party action references in workflows from @<tag>/@main to @<sha> # <tag>.
  • Pin bencherdev/bencher to the v0.6.5 commit SHA rather than a moving branch.
  • Update Dependabot’s github-actions schedule to daily and add a proposed 5-day delay before surfacing updates.

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md
  • .github/instructions/changelog.instructions.md

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/release.yml Pins checkout, upload-artifact, and download-artifact actions to SHAs.
.github/workflows/release-attestation.yml Pins attest-build-provenance to a SHA.
.github/workflows/pypi.yml Pins checkout to a SHA.
.github/workflows/npm.yml Pins checkout and setup-node to SHAs.
.github/workflows/long-verification.yml Pins checkout and upload-artifact to SHAs.
.github/workflows/long-test.yml Pins checkout and upload-artifact to SHAs.
.github/workflows/doc.yml Pins Pages-related actions (configure-pages, upload-pages-artifact, deploy-pages) to SHAs.
.github/workflows/codeql-analysis.yml Pins checkout and CodeQL actions (init, analyze) to SHAs.
.github/workflows/ci.yml Pins checkout and upload-artifact to SHAs across CI jobs.
.github/workflows/ci-verification.yml Pins checkout and upload-artifact to SHAs in verification jobs.
.github/workflows/bencher.yml Pins checkout, upload-artifact, and bencherdev/bencher to SHAs.
.github/workflows/bencher-ab.yml Pins checkout, upload-artifact, and download-artifact to SHAs.
.github/dependabot.yml Switches github-actions updates to daily and adds a 5-day “cooldown” stanza.

Comment thread .github/dependabot.yml
@achamayou achamayou disabled auto-merge May 13, 2026 13:33
@achamayou achamayou merged commit f6327ff into main May 13, 2026
25 of 26 checks passed
@achamayou achamayou deleted the copilot/investigate-pinning-github-actions branch May 13, 2026 13:33
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.

5 participants