Skip to content

ci: pin actions to commit SHAs - #2

Open
YuvalR-adaptive6 wants to merge 1 commit into
mainfrom
security/pin-actions-sha
Open

YuvalR-adaptive6 wants to merge 1 commit into
mainfrom
security/pin-actions-sha

Conversation

@YuvalR-adaptive6

Copy link
Copy Markdown

What

Pins 2 third-party and internal action / reusable-workflow references in GitHub Actions workflows and composite actions to full 40-character commit SHAs, keeping the version as a trailing comment (for example actions/checkout@ # v4.4.0).

Versions are not changed: each tag or branch is resolved to the commit it points to today (annotated tags dereferenced). The comment shows the most specific tag on that commit, so a floating v4 shows up as v4.4.0. Generated with pinact, branch refs resolved via the GitHub API, checked with actionlint (no new findings).

Why

The org is about to enable "Require actions to be pinned to a full-length commit SHA". Once on, any workflow still using a tag or branch ref fails to start. Tags and branches are mutable, so a compromised or hijacked upstream tag would otherwise run new code in our CI with our secrets; a commit SHA cannot be moved.

Notes

  • preventive/action.yml references this repo's own adaptive6/actions/preventive/dist@main. It is now pinned to the current main commit a2d8de0, so every future dist rebuild needs this pin bumped in the same change, or consumers keep running the old dist.

Asana: https://app.asana.com/1/1206371752592560/project/1206372017962686/task/1220763056500215

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 12:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change pinning both preventive action references to full commit SHAs.

No open issues 🎉

What changed in this PR

Pins both action references in the preventive composite action to full commit SHAs, supporting the organization’s upcoming SHA-pinning requirement and preventing mutable references from changing CI behavior.

Changes:

  • Pins actions/checkout, retaining v2.8.0 as a trailing comment.
  • Pins the internal results parser to a fixed commit; future parser rebuilds require updating this pin.
File Description
preventive/​action.yml Replaces two mutable action references with full 40-character commit SHAs.

Review effort: Balanced

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