Skip to content

security: pin third-party GitHub Actions to commit SHAs + least-privilege permissions#81

Merged
KedoKudo merged 1 commit into
nextfrom
security/pin-actions-sha-2026-06-22
Jun 22, 2026
Merged

security: pin third-party GitHub Actions to commit SHAs + least-privilege permissions#81
KedoKudo merged 1 commit into
nextfrom
security/pin-actions-sha-2026-06-22

Conversation

@KedoKudo

Copy link
Copy Markdown
Contributor

What

Supply-chain hardening of GitHub Actions workflows:

  • SHA-pin all third-party actions to full 40-char commit SHAs, retaining a trailing # version comment for readability.
  • Add a conservative top-level permissions: contents: read block to pure-CI workflows that have no existing top-level permissions block and use no privileged features.

First-party actions/* and github/* actions are intentionally left tag-pinned per group convention.

Why

Pinning third-party actions to immutable commit SHAs protects against tag-hijacking / mutable-tag supply-chain attacks. Least-privilege default permissions limit the blast radius of a compromised action. From the 2026-06-22 workspace GitHub Actions security audit.

Pins applied

Action Pinned SHA
prefix-dev/setup-pixi@v0.9.6 5185adfbffb4bd703da3010310260805d89ebb11
peter-evans/create-pull-request@v8 5f6978faf089d4d20b00c7766989d076bb2fc7f1
pypa/gh-action-pypi-publish@release/v1 cef221092ed1bacb1cc03d23a2d87d1d172e277b (v1.14.0)

(4 occurrences total across 3 files: setup-pixi appears in all three files — twice in package.yml.)

Permissions

  • unittest.yml — added top-level permissions: contents: read (pure CI, no privileged features).
  • package.ymlnot modified (release pipeline uses id-token, anaconda upload, gh-action-pypi-publish); keeps its existing job-level id-token: write.
  • update-lockfiles.ymlnot modified (already has a top-level permissions: block and uses peter-evans/create-pull-request).

Notes

  • No dtolnay/rust-toolchain or taiki-e/install-action usages exist in this repo, so those special-case rules did not apply.
  • No behavior change intended; CI on this PR validates.

🤖 Assisted with Claude Code

…lege permissions

Pin all third-party actions to full 40-char commit SHAs (version comments retained) and add a top-level least-privilege 'permissions: contents: read' block to pure-CI workflows. dtolnay/rust-toolchain gains an explicit 'toolchain: stable' input so the SHA pin preserves channel selection. From the 2026-06-22 workspace GitHub Actions security audit.

Assisted-With: Claude Opus 4.8 <noreply@anthropic.com>
@KedoKudo KedoKudo merged commit eafea3c into next Jun 22, 2026
2 checks passed
@KedoKudo KedoKudo deleted the security/pin-actions-sha-2026-06-22 branch June 22, 2026 16:52
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