Repository navigation
Add task to remove blocked audit sources from NuGet.config - #5607
Merged
Merged
Conversation
This reverts commit 5b22ac2.
Remove nuget.org from auditSources during nuget-client VMR builds to prevent internet access at restore time. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates VMR repo-project build infrastructure to avoid NuGet restore-time internet access caused by NuGet audit in nuget-client, by removing the blocked nuget.org audit source from its NuGet.Config instead of disabling NuGet audit globally.
Changes:
- Introduce an MSBuild task to remove blocked entries from the
auditSourcessection ofNuGet.config. - Wire the new task into the shared
UpdateNuGetConfigflow, gated by a per-repo property. - Stop passing
/p:NuGetAudit=falseglobally viarepo-projects/Directory.Build.props.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| repo-projects/nuget-client.proj | Enables the new NuGet.config audit-source cleanup specifically for nuget-client builds. |
| repo-projects/Directory.Build.targets | Registers and executes the new task during UpdateNuGetConfig when opted in. |
| repo-projects/Directory.Build.props | Removes the prior global MSBuild argument that disabled NuGet audit. |
| eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/RemoveBlockedAuditSourcesFromNuGetConfig.cs | Adds the new task that edits auditSources to remove blocked sources (e.g., nuget.org). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
steveisok
approved these changes
Mar 20, 2026
ViktorHofer
approved these changes
Mar 20, 2026
Member
Author
|
/backport to release/10.0.1xx |
Contributor
|
Started backporting to |
Contributor
|
@akoeplinger backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Revert "[main] Disable Nuget Audit in VMR builds (#5605)"
Applying: Add task to remove blocked audit sources from NuGet.config
Using index info to reconstruct a base tree...
M repo-projects/Directory.Build.targets
M repo-projects/nuget-client.proj
Falling back to patching base and 3-way merge...
Auto-merging repo-projects/Directory.Build.targets
CONFLICT (content): Merge conflict in repo-projects/Directory.Build.targets
Auto-merging repo-projects/nuget-client.proj
CONFLICT (content): Merge conflict in repo-projects/nuget-client.proj
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 0002 Add task to remove blocked audit sources from NuGet.config
Error: The process '/usr/bin/git' failed with exit code 128 |
akoeplinger
added a commit
that referenced
this pull request
Mar 20, 2026
Port of #5607 to release/10.0.1xx. Remove nuget.org from auditSources during nuget-client VMR builds to prevent internet access at restore time instead of turning off NuGetAudit completely. Co-authored-by: Copilot <[email protected]>
akoeplinger
added a commit
that referenced
this pull request
Mar 20, 2026
Port of #5607 to release/10.0.2xx. Remove nuget.org from auditSources during nuget-client VMR builds to prevent internet access at restore time instead of turning off NuGetAudit completely. Co-authored-by: Copilot <[email protected]>
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 20, 2026
Port of #5607 to release/10.0.2xx. Remove nuget.org from auditSources during nuget-client VMR builds to prevent internet access at restore time instead of turning off NuGetAudit completely. Co-authored-by: Copilot <[email protected]>
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.
Follow up to feedback from #5600
Remove nuget.org from auditSources during nuget-client VMR builds to prevent internet access at restore time instead of turning off NuGetAudit completely.