Skip to content

CI: Pin third-party GitHub Actions to commit SHAs#5972

Merged
rogerbarreto merged 1 commit into
microsoft:mainfrom
rogerbarreto:issues/lock-workflow-versioning
May 20, 2026
Merged

CI: Pin third-party GitHub Actions to commit SHAs#5972
rogerbarreto merged 1 commit into
microsoft:mainfrom
rogerbarreto:issues/lock-workflow-versioning

Conversation

@rogerbarreto
Copy link
Copy Markdown
Member

@rogerbarreto rogerbarreto commented May 20, 2026

Closes #5999

CI: Pin third-party GitHub Actions to commit SHAs

Replaces every floating tag in our workflow and composite action files
with an immutable 40-character commit SHA, keeping the original `# vX`
comment so Dependabot can still propose version bumps. 186 occurrences
across 25 workflows and 2 composite actions.

Also widens the github-actions Dependabot entry to use the plural
`directories` key with `/.github/actions/*` so composite actions under
`.github/actions/<name>/action.yml` are kept up to date. Previously
Dependabot only scanned `.github/workflows` and the repo-root
`action.yml`, leaving our `python-setup` and `sample-validation-setup`
composite actions unmaintained.
Copilot AI review requested due to automatic review settings May 20, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Hardens CI supply-chain security by pinning all third-party GitHub Actions references to immutable commit SHAs (while retaining the original tag in a trailing comment for update visibility), and expands Dependabot scanning so composite actions under .github/actions/* are included.

Changes:

  • Pin third-party action uses: references to 40-char commit SHAs across workflows and composite actions.
  • Widen Dependabot’s github-actions scan scope to include .github/actions/* composite actions.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/stale-issue-pr-ping.yml Pin actions/checkout and actions/setup-python to SHAs.
.github/workflows/python-tests.yml Pin actions/checkout and pmeier/pytest-results-action to SHAs.
.github/workflows/python-test-coverage.yml Pin actions/checkout and actions/upload-artifact to SHAs.
.github/workflows/python-test-coverage-report.yml Pin actions/checkout, actions/download-artifact, and coverage comment action to SHAs.
.github/workflows/python-sample-validation.yml Pin actions/checkout, artifact upload/download, and cache actions to SHAs.
.github/workflows/python-release.yml Pin actions/checkout and softprops/action-gh-release to SHAs.
.github/workflows/python-merge-tests.yml Pin actions/checkout, dorny/paths-filter, azure/login, artifact/cache, and reporting actions to SHAs.
.github/workflows/python-lab-tests.yml Pin actions/checkout, dorny/paths-filter, and test reporting action to SHAs.
.github/workflows/python-integration-tests.yml Pin actions/checkout, azure/login, artifact/cache, and actions/github-script to SHAs.
.github/workflows/python-docs.yml Pin actions/checkout and astral-sh/setup-uv to SHAs.
.github/workflows/python-dev-dependency-upgrade.yml Pin actions/checkout to a SHA.
.github/workflows/python-dependency-range-validation.yml Pin actions/checkout, artifact upload, and actions/github-script to SHAs.
.github/workflows/python-code-quality.yml Pin actions/checkout, actions/cache, and j178/prek-action to SHAs.
.github/workflows/merge-gatekeeper.yml Pin actions/github-script to a SHA.
.github/workflows/markdown-link-check.yml Pin actions/checkout and umbrelladocs/action-linkspector to SHAs.
.github/workflows/label-title-prefix.yml Pin actions/github-script to a SHA.
.github/workflows/label-pr.yml Pin actions/labeler to a SHA.
.github/workflows/label-issues.yml Pin actions/github-script to a SHA.
.github/workflows/issue-triage.yml Pin actions/checkout, actions/github-script, actions/setup-python, astral-sh/setup-uv, and azure/login to SHAs.
.github/workflows/dotnet-verify-samples.yml Pin actions/checkout, actions/setup-dotnet, azure/login, and artifact upload to SHAs.
.github/workflows/dotnet-integration-tests.yml Pin actions/checkout, actions/setup-dotnet, and azure/login to SHAs.
.github/workflows/dotnet-format.yml Pin actions/checkout and jitterbit/get-changed-files to SHAs.
.github/workflows/dotnet-build-and-test.yml Pin actions/checkout, actions/setup-dotnet, azure/login, reporting, artifact/cache, and actions/github-script actions to SHAs.
.github/workflows/devflow-pr-review.yml Pin actions/github-script, actions/checkout, actions/setup-python, and astral-sh/setup-uv to SHAs.
.github/workflows/codeql-analysis.yml Pin actions/checkout and github/codeql-action/* to SHAs.
.github/dependabot.yml Expand github-actions updates to scan both workflows and composite actions via directories.
.github/actions/sample-validation-setup/action.yml Pin actions/setup-node and azure/login to SHAs.
.github/actions/python-setup/action.yml Pin astral-sh/setup-uv to a SHA.

Comment thread .github/workflows/dotnet-build-and-test.yml
@rogerbarreto rogerbarreto changed the title ci: pin third-party GitHub Actions to commit SHAs CI: Pin third-party GitHub Actions to commit SHAs May 20, 2026
@rogerbarreto rogerbarreto self-assigned this May 20, 2026
@rogerbarreto rogerbarreto added this pull request to the merge queue May 20, 2026
Merged via the queue into microsoft:main with commit 01a3c5b May 20, 2026
29 checks passed
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.

CI: Pin third-party GitHub Actions to commit SHAs

4 participants