Skip to content

Pin backport actions to SHAs - #16996

Merged
JanProvaznik merged 1 commit into
dotnet:mainfrom
rainersigwald:pin-backport-to-sha
Jun 10, 2026
Merged

Pin backport actions to SHAs#16996
JanProvaznik merged 1 commit into
dotnet:mainfrom
rainersigwald:pin-backport-to-sha

Conversation

@rainersigwald

Copy link
Copy Markdown
Member

This can be required by repo configuration and is considered a GitHub Actions security best practice.

I turned the setting on in dotnet/msbuild and got errors like https://github.com/dotnet/msbuild/actions/runs/27234807068.

To double check:

This can be required by repo configuration and is considered a GitHub
Actions security best practice.
Copilot AI review requested due to automatic review settings June 9, 2026 21:28

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

Updates the shared backport workflow to follow GitHub Actions security guidance by pinning third-party actions to immutable commit SHAs, improving supply-chain integrity for repos that consume this workflow.

Changes:

  • Pin actions/github-script usages to a specific commit SHA (annotated as v9.0.0).
  • Pin actions/checkout usage to a specific commit SHA (annotated as v6.0.3).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JanProvaznik
JanProvaznik merged commit fa3e5ef into dotnet:main Jun 10, 2026
2 of 4 checks passed
@JanProvaznik

Copy link
Copy Markdown
Member

/backport to release/10.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

@JanProvaznik backporting to release/10.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Pin backport actions to SHAs
Using index info to reconstruct a base tree...
M	.github/workflows/backport-base.yml
Falling back to patching base and 3-way merge...
Auto-merging .github/workflows/backport-base.yml
CONFLICT (content): Merge conflict in .github/workflows/backport-base.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Pin backport actions to SHAs
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

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.

4 participants