Pin workflow actions to immutable SHAs and add Dependabot SHA update policy - #1772
Merged
Conversation
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Pin GitHub Actions to commit SHAs for security
Pin workflow actions to immutable SHAs and add Dependabot SHA update policy
Aug 20, 2026
mthalman
reviewed
Aug 20, 2026
| jobs: | ||
| backport: | ||
| uses: dotnet/arcade/.github/workflows/backport-base.yml@main | ||
| uses: dotnet/arcade/.github/workflows/backport-base.yml@a18c4ece1b67d70252b4cff6c562a7c2697adebe |
Member
There was a problem hiding this comment.
@copilot - Doesn't this need a trailing comment so Dependabot knows how to update to latest commit? Does it support branch name comments?
Contributor
Author
There was a problem hiding this comment.
Good catch. I added a trailing hint comment on that pin in commit 1fda4a0:
uses: dotnet/arcade/.github/workflows/backport-base.yml@a18c4ece1b67d70252b4cff6c562a7c2697adebe # main
Dependabot supports these trailing comments and uses them when updating pinned SHAs.
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
mthalman
approved these changes
Aug 20, 2026
lbussell
approved these changes
Aug 20, 2026
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change hardens workflow supply-chain posture by removing mutable action refs (
@main, version tags) and replacing them with commit SHAs. It also introduces Dependabot policy to keep pinned GitHub Actions SHAs current with a cooldown window.Workflow pinning
.github/workflows/labeler.yml: pingithub/issue-labelerto commitc1b0f9f52a63158c4adc09425e858e87b32e9685(v3.4)..github/workflows/backport.yml: pin reusable workflowdotnet/arcade/.github/workflows/backport-base.ymlto commita18c4ece1b67d70252b4cff6c562a7c2697adebe.Dependabot policy for GitHub Actions
.github/dependabot.ymlwithpackage-ecosystem: github-actions.cooldown.default-days: 7to delay adoption of newly released versions.Reference snippet