Skip to content

chore(actions): pin all actions to full-length commit SHAs - #2761

Open
wuhuizuo wants to merge 1 commit into
pingcap:masterfrom
wuhuizuo:chore/pin-actions-sha
Open

wuhuizuo wants to merge 1 commit into
pingcap:masterfrom
wuhuizuo:chore/pin-actions-sha

Conversation

@wuhuizuo

@wuhuizuo wuhuizuo commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Every GitHub Actions reference in .github/workflows/ was resolved through a mutable tag (or, in one case, a branch). If an upstream tag is moved, the same commit of this repository starts executing different third-party code with the workflow's GITHUB_TOKEN and secrets.

What is changed and how it works?

All uses: entries are pinned to the full-length commit SHA they currently resolve to, keeping the original tag as a trailing comment. No action version is upgraded and no workflow logic is modified.

-        uses: actions/checkout@v6
+        uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

1 reference(s) needed manual handling because they pointed at a branch, which pinning tools do not resolve automatically:

  • uses: actions-js/push@968f4695ca558093eadb24ad83cc5891f47e0cdc # master

Such references are pinned to the current commit of that branch and no longer follow upstream changes; they are updated by the dependency bot from now on.

Verification: pinact run --check reports no remaining unpinned references.

Check List

Tests

  • No code

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@ti-chi-bot
ti-chi-bot Bot requested review from kaaaaaaang and nexustar December 4, 2026 03:47
@ti-chi-bot

ti-chi-bot Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bb7133 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 4, 2026
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The listed GitHub Actions workflows now reference actions by pinned commit SHAs instead of version tags. Version comments identify the pinned releases. Workflow triggers, configuration, and job behavior remain unchanged.

Changes: Workflow action pinning

Layer / File(s) Summary
Pin actions across workflows
.github/workflows/install.yaml, .github/workflows/integrate-*.yaml, .github/workflows/lint.yaml, .github/workflows/release-tiup.yaml, .github/workflows/reprotest.yaml, .github/workflows/server-private-files.yaml
The workflows use pinned commit SHAs for checkout, Go setup, artifact upload, Codecov, release, and Homebrew actions. Comments identify the corresponding action versions. Existing workflow configuration remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: dveeden, zanmato1984

Merge Risk: Minimal · up to 3f6e0

This change pins GitHub Actions to commit SHAs without changing workflow behavior. It reduces supply-chain exposure and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "chore(actions): pin all actions to full-length commit SHAs" matches the changeset. The raw summary and PR objectives both show that tag references in uses: lines across the workflow files w…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem (mutable action tags allow upstream code changes to run with GITHUB_TOKEN and secrets), the change (all uses: entries pinned to full commit SHAs with the original ta…
Full details: Title check

Explanation

The title "chore(actions): pin all actions to full-length commit SHAs" matches the changeset. The raw summary and PR objectives both show that tag references in uses: lines across the workflow files were replaced with 40-character commit SHAs, with version comments kept. The title is specific and concise, and it names the main change.

Full details: Description check

Explanation

The description states the problem (mutable action tags allow upstream code changes to run with GITHUB_TOKEN and secrets), the change (all uses: entries pinned to full commit SHAs with the original tag kept as a comment, no version upgrades, no logic changes), a diff example, handling of the branch-pinned actions-js/push reference, and verification via pinact. It fills in the template's sections. The 'What is changed' section is detailed, and the Check List marks 'No code' with release notes set to NONE. The 'close #xxx' issue link was removed and not replaced, and no issue link is given. The 'Related changes' item on cherry-picking is left unchecked, which is acceptable. Overall the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the workflow trail,
Each action has a pinned detail.
No floating tags drift down the lane,
The jobs keep running just the same.
I nibble clover, pleased to see,
A steady SHA for every key.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd326ccc-e28c-4c21-8ef7-b40cfd5bd6ae
Commits

Reviewing files that changed from the base of the PR and between d9d2e87 and 3f6e079.

Files selected for processing: 11

  • .github/workflows/install.yaml
  • .github/workflows/integrate-cluster-cmd.yaml
  • .github/workflows/integrate-cluster-scale.yaml
  • .github/workflows/integrate-dm.yaml
  • .github/workflows/integrate-playground-ng.yaml
  • .github/workflows/integrate-playground.yaml
  • .github/workflows/integrate-tiup.yaml
  • .github/workflows/lint.yaml
  • .github/workflows/release-tiup.yaml
  • .github/workflows/reprotest.yaml
  • .github/workflows/server-private-files.yaml

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@wuhuizuo
wuhuizuo force-pushed the chore/pin-actions-sha branch from 8ca2874 to 3f6e079 Compare December 4, 2026 03:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant