Skip to content

Pin GitHub Actions to full-length commit SHAs - #11786

Merged
Timothee Guerin (timotheeguerin) merged 3 commits into
microsoft:mainfrom
timotheeguerin:actions-sha
Aug 28, 2026
Merged

Timothee Guerin (timotheeguerin) merged 3 commits into
microsoft:mainfrom
timotheeguerin:actions-sha

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Our workflows reference third-party and first-party actions by mutable tags (actions/checkout@v7, pnpm/action-setup@v6, …). A tag can be repointed at any commit, so anyone who can move a tag in one of those repos can silently run arbitrary code inside our CI — including on jobs that hold write tokens.

Every uses: in .github/ is now pinned to an immutable commit SHA, with the human-readable version kept as a trailing comment:

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

All pinned SHAs were verified to resolve from the tag they claim, and no unpinned uses: references remain.

Picks up the action-pinning portion of #11730; the Dependabot github-actions ecosystem entry is intentionally left out of this PR.

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@azure-sdk-automation

azure-sdk-automation Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copilot AI 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.

Pull request overview

This pull request hardens the repo’s CI supply chain by replacing mutable tag-based uses: references in .github/ workflows (and the shared composite setup action) with immutable full-length commit SHAs, retaining the human-readable version as an inline comment.

Changes:

  • Pinned actions/* references (e.g., checkout, setup-node, upload-artifact, download-artifact, Pages actions) to full commit SHAs across multiple workflows.
  • Pinned third-party actions used in workflows (e.g., pnpm/action-setup, dorny/paths-filter, github/codeql-action, github/gh-aw/...) to full commit SHAs with version comments.
  • Updated the repo’s composite setup action (.github/actions/setup) to use pinned SHAs for pnpm + node setup.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/website-gh-pages.yml Pin checkout and GitHub Pages actions to SHAs.
.github/workflows/verify-labels.yml Pin checkout to SHA.
.github/workflows/sync-labels.yml Pin checkout to SHA.
.github/workflows/python-integration.yml Pin checkout/artifact actions to SHAs.
.github/workflows/preview.yml Pin checkout and setup-dotnet to SHAs.
.github/workflows/merge-release-in-main.yml Pin checkout to SHA.
.github/workflows/external-integration.yml Pin setup-node/checkout/pnpm setup actions to SHAs.
.github/workflows/dependabot-pnpm-install.yml Pin checkout to SHA.
.github/workflows/core-ci.yml Pin checkout/setup-dotnet/upload-artifact to SHAs.
.github/workflows/copilot-setup-steps.yml Pin checkout and gh-aw setup-cli action to SHAs.
.github/workflows/consistency.yml Pin checkout/upload-artifact to SHAs in multiple jobs.
.github/workflows/commenter.yml Pin checkout/download-artifact to SHAs.
.github/workflows/codeql.yml Pin checkout and CodeQL action steps to SHAs.
.github/workflows/ci.yml Pin checkout; clarify pinned dorny/paths-filter version comment.
.github/workflows/ci-emitter-diff-python.yml Pin checkout and setup-python to SHAs.
.github/workflows/check-agentic-workflows.yml Pin checkout to SHA.
.github/actions/setup/action.yml Pin pnpm/action-setup and actions/setup-node to SHAs inside the composite action.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/check-agentic-workflows.yml Outdated
Comment thread .github/workflows/consistency.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 28, 2026 16:37

Copilot AI 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.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.

Merged via the queue into microsoft:main with commit f6897a6 Aug 28, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants