Skip to content

ci: pin softprops/action-gh-release to SHA in deploy workflow#198

Closed
BenjaminMichaelis wants to merge 2 commits into
mainfrom
agents/nuget-trusted-publishing-setup
Closed

ci: pin softprops/action-gh-release to SHA in deploy workflow#198
BenjaminMichaelis wants to merge 2 commits into
mainfrom
agents/nuget-trusted-publishing-setup

Conversation

@BenjaminMichaelis
Copy link
Copy Markdown
Member

What changed

Pins softprops/action-gh-release to a specific commit SHA in the deploy workflow, rather than a floating v3 tag.

Before:

uses: softprops/action-gh-release@v3

After:

uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3

Why

Floating version tags (e.g. @v3) can be silently moved by the action author to point at a different — potentially malicious — commit. Pinning to a SHA ensures the workflow always runs the exact code that was reviewed, regardless of what the tag points to in the future. This is a GitHub security best practice for third-party actions.

The rest of the deploy workflow (NuGet/login@v1, actions/*) was already using either first-party actions or a trusted pinned action, so no other changes were needed.

Context

This was part of setting up NuGet trusted publishing (OIDC) for IntelliTect.Multitool. The deploy workflow already had id-token: write and NuGet/login@v1 correctly configured — this PR just hardens the one remaining unpinned third-party action.

- actions/checkout@v6 → @v4
- actions/setup-dotnet@v5 → @v4
- actions/upload-artifact@v7 → @v4
- actions/download-artifact@v8 → @v4
- softprops/action-gh-release@v3 → pin to SHA (v2)
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.

1 participant