Skip to content

Conversation

@arturcic
Copy link
Member

@arturcic arturcic commented Nov 2, 2025

uses OIDC token exchange for nuget api key retrieval, instead of storing the api key in github secrets.

Copilot AI review requested due to automatic review settings November 2, 2025 20:27
@arturcic arturcic added this to the 6.x milestone Nov 2, 2025
@arturcic arturcic added the build label Nov 2, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates NuGet package publishing from using a static API key secret to GitHub OIDC token-based authentication. This improves security by eliminating the need to store long-lived credentials.

  • Implements OIDC token exchange flow for NuGet.org authentication
  • Removes the NUGET_API_KEY secret dependency from the workflow
  • Converts the publish task to async to support the OIDC token retrieval

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
build/publish/Tasks/PublishNuget.cs Adds OIDC token exchange logic and converts task to async
.github/workflows/_publish.yml Removes NUGET_API_KEY secret reference
Comments suppressed due to low confidence (1)

.github/workflows/_publish.yml:11

  • Missing required permissions for OIDC token access. The workflow needs permissions: id-token: write to allow the publish job to retrieve GitHub OIDC tokens. Add a permissions section to the publish job with id-token: write.
  publish:
    name: ${{ matrix.taskName }}
    runs-on: windows-2025

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

@arturcic arturcic force-pushed the feature/trusted-publishing branch from 7bcb2bc to 21f0a77 Compare November 2, 2025 20:41
@arturcic arturcic changed the title publish nuget packages using Trusted Publiishing publish nuget packages using Trusted Publishing Nov 2, 2025
uses OIDC token exchange for nuget api key retrieval, instead of storing the api key in github secrets.
@arturcic arturcic force-pushed the feature/trusted-publishing branch from 21f0a77 to 211c840 Compare November 2, 2025 21:05
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 2, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
5 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@arturcic arturcic merged commit 711b630 into GitTools:main Nov 2, 2025
85 checks passed
@arturcic arturcic deleted the feature/trusted-publishing branch November 2, 2025 21:28
@mergify
Copy link
Contributor

mergify bot commented Nov 2, 2025

Thank you @arturcic for your contribution!

@arturcic arturcic modified the milestones: 6.x, 6.5.0 Nov 5, 2025
@gittools-bot
Copy link
Contributor

🎉 This issue has been resolved in version 6.5.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants