Skip to content

ci: pin GitHub Actions to commit SHAs - #244

Merged
sjvans merged 1 commit into
mainfrom
pin-actions-sha
Jul 28, 2026
Merged

ci: pin GitHub Actions to commit SHAs#244
sjvans merged 1 commit into
mainfrom
pin-actions-sha

Conversation

@sjvans

@sjvans sjvans commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Pin all third-party GitHub Actions in the CI and release workflows to full commit SHAs (with version comments) instead of floating/mutable tags. This hardens the workflows against supply-chain risks from mutable tags.

Following the same approach as cap-js/advanced-event-mesh#76.

Changes

ci.yml

  • actions/checkout9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
  • actions/setup-node48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0

release.yml

  • actions/checkout9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
  • actions/setup-node48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
  • martinbeentjes/npm-get-version-action3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
  • schwma/parse-changelog-action1c2b2005ccf594cc3a45d33c10af4ab924d3a1c5 # v1.2.0
  • ncipollo/release-action@v1339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0

Note: ncipollo/release-action was previously on the floating @v1 tag; it is pinned to the commit v1 currently resolves to (v1.21.0).

Pin all third-party actions in the CI and release workflows to full
commit SHAs (with version comments) instead of floating/mutable tags,
following the pattern in cap-js/advanced-event-mesh#76.
@sjvans
sjvans requested a review from a team as a code owner July 27, 2026 09:45
@hyperspace-pr-bot

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Pin GitHub Actions to Full Commit SHAs for Supply-Chain Security

Chore

🔒 Hardened CI and release workflows by pinning all third-party GitHub Actions references from mutable version tags to immutable full commit SHAs (with version comments for readability). This protects against supply-chain attacks where a mutable tag could be silently redirected to malicious code.

Changes

  • .github/workflows/ci.yml: Pinned actions/checkout and actions/setup-node to their full commit SHAs.
  • .github/workflows/release.yml: Pinned actions/checkout, actions/setup-node, martinbeentjes/npm-get-version-action, schwma/parse-changelog-action, and ncipollo/release-action (previously on the floating @v1 tag) to their full commit SHAs.

Summary of pinned actions:

Action Previous Reference Pinned SHA Version
actions/checkout @v7.0.0 9c091bb... v7.0.0
actions/setup-node @v6.4.0 48b55a0... v6.4.0
martinbeentjes/npm-get-version-action @v1.3.1 3cf2730... v1.3.1
schwma/parse-changelog-action @v1.2.0 1c2b200... v1.2.0
ncipollo/release-action @v1 ⚠️ 339a818... v1.21.0

⚠️ ncipollo/release-action was previously on the floating @v1 tag and is now pinned to the specific commit that v1 currently resolves to (v1.21.0).


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.29.2

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR correctly applies the supply-chain hardening practice of pinning GitHub Actions to full commit SHAs with version comments. However, the version comment annotations for actions/checkout (# v7.0.0) and actions/setup-node (# v6.4.0) appear incorrect — neither action has ever reached those major versions (both are on v4.x as of today). This is a significant concern: the whole value of SHA pinning depends on the comment accurately identifying which version the SHA corresponds to, so reviewers can audit and Dependabot update PRs can be evaluated meaningfully. The author should verify these SHAs against the upstream repositories and correct the version comments before merging.

PR Bot Information

Version: 1.29.2

  • Event Trigger: pull_request.opened
  • Experiment Variant: control
  • Correlation ID: de4909d0-899f-11f1-9067-004c6371431e
  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content

Comment thread .github/workflows/release.yml
@sjvans
sjvans requested a review from schwma July 27, 2026 09:46
@sjvans
sjvans merged commit 500e37f into main Jul 28, 2026
4 checks passed
@sjvans
sjvans deleted the pin-actions-sha branch July 28, 2026 07:38
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.

2 participants