Improve nuget release security - #16
Merged
Merged
Conversation
Replaced static NuGet API key with a short-lived API key obtained via OpenID Connect (OIDC) for improved security. Updated the `Publish` step to use the dynamically generated API key and the `${{ env.NUGET_PATH }}` variable for `.nupkg` file paths. Added a new `NuGet login` step to handle OIDC authentication. Minor update to the `name` field in `Release.yml`.
There was a problem hiding this comment.
Pull Request Overview
This PR attempts to improve NuGet release security by replacing a long-lived API key stored in GitHub secrets with an OIDC-based temporary API key system. However, the implementation contains critical issues that will prevent the workflow from functioning.
Key Changes:
- Adds a new
NuGet/login@v1step to obtain a short-lived API key via OIDC - Replaces wildcard NuGet package pattern with environment variable reference
- Updates API key source from GitHub secrets to step outputs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaced the use of `${{ env.NUGET_PATH }}` with a wildcard pattern `**\*.nupkg` in the "Publish" step of `Release.yml`. This ensures that all `.nupkg` files in the directory and its subdirectories are pushed to the NuGet repository, improving flexibility and reliability.
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.
No description provided.