Skip to content

Pin workflow actions to immutable SHAs and add Dependabot SHA update policy - #1772

Merged
mthalman merged 3 commits into
mainfrom
copilot/pin-github-actions-to-commit-shas
Aug 20, 2026
Merged

Pin workflow actions to immutable SHAs and add Dependabot SHA update policy#1772
mthalman merged 3 commits into
mainfrom
copilot/pin-github-actions-to-commit-shas

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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: pin github/issue-labeler to commit c1b0f9f52a63158c4adc09425e858e87b32e9685 (v3.4).
    • .github/workflows/backport.yml: pin reusable workflow dotnet/arcade/.github/workflows/backport-base.yml to commit a18c4ece1b67d70252b4cff6c562a7c2697adebe.
  • Dependabot policy for GitHub Actions

    • Added .github/dependabot.yml with package-ecosystem: github-actions.
    • Configured weekly updates and cooldown.default-days: 7 to delay adoption of newly released versions.
  • Reference snippet

    # before
    uses: dotnet/arcade/.github/workflows/backport-base.yml@main
    - uses: github/issue-labeler@v3.4
    
    # after
    uses: dotnet/arcade/.github/workflows/backport-base.yml@a18c4ece1b67d70252b4cff6c562a7c2697adebe
    - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4

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
Copilot AI requested a review from mthalman August 20, 2026 16:23
Comment thread .github/workflows/backport.yml Outdated
jobs:
backport:
uses: dotnet/arcade/.github/workflows/backport-base.yml@main
uses: dotnet/arcade/.github/workflows/backport-base.yml@a18c4ece1b67d70252b4cff6c562a7c2697adebe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot - Doesn't this need a trailing comment so Dependabot knows how to update to latest commit? Does it support branch name comments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
Copilot AI requested a review from mthalman August 20, 2026 18:19
@mthalman
mthalman marked this pull request as ready for review August 20, 2026 18:20
@mthalman
mthalman requested a review from a team as a code owner August 20, 2026 18:20
Copilot AI linked an issue Aug 20, 2026 that may be closed by this pull request
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.

Pin GitHub Actions to commit SHAs

3 participants