Skip to content

C#: Rollback NuGet CLI proxy usage. - #22888

Open
michaelnebel wants to merge 3 commits into
github:mainfrom
michaelnebel:csharp/nugetcliproxy
Open

michaelnebel wants to merge 3 commits into
github:mainfrom
michaelnebel:csharp/nugetcliproxy

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This is rollback of this PR.
The NuGet CLI doesn't use the content of SSL_CERT_FILE.

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.

🟢 Approval recommended

The rollback is narrowly scoped, affected call sites are consistent, and no blocking issues remain.

No open issues 🎉

What changed in this PR

Restores the C# extractor’s previous packages.config restore behavior by rolling back NuGet CLI proxy and certificate environment setup, since NuGet does not honor SSL_CERT_FILE.

Changes:

  • Remove NuGet subprocess proxy configuration and its associated factory and caller plumbing, while preserving feed-manager proxy support.
  • Add a change note documenting the rollback.
File Description
csharp/​ql/​lib/​change-notes/​2026-10-26-nugetcli-proxy-config-rollback.md Documents the rollback.
csharp/​extractor/​Semmle.Extraction.CSharp.DependencyFetching/​PackagesConfigRestorer.cs Removes proxy injection and subprocess environment configuration.
csharp/​extractor/​Semmle.Extraction.CSharp.DependencyFetching/​NugetPackageRestorer.cs Removes the unused proxy field and updates the factory call.

Review effort: Max

@michaelnebel
michaelnebel requested review from jketema and mbg October 26, 2026 12:00
@michaelnebel
michaelnebel marked this pull request as ready for review October 26, 2026 12:00
@michaelnebel
michaelnebel requested a review from a team as a code owner October 26, 2026 12:00
hvitved
hvitved previously approved these changes Oct 26, 2026
jketema
jketema previously approved these changes Oct 26, 2026

@mbg mbg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of comments: one about whether this should affect just the mono case or not, and one suggestion for the changelog.

Comment on lines -214 to -216
// Configure the proxy settings, if applicable.
registryProxy?.SetProcessEnvironment(pi);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We know that running this with mono doesn't work because mono doesn't respect the environment variable for the certificate. But does it work without mono and would it make sense to keep that case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As far as I can tell SSL_CERT_FILE is not respected by the NuGet CLI on any operating system (not on windows either). The support was introduced with dotnet nuget. I have asked various AIs as well; They claim the same, with the reasoning "It is not supported due to lack of documentation that it should be supported".
Have you found other information?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Have you found other information?

No, I don't know what the situation with NuGet itself is. I just had theunderstanding that it definitely was a problem with mono and that it was the initial blocker, but had no insights into whether it does or doesn't work even without mono in the picture.

Comment thread csharp/ql/lib/change-notes/2026-10-26-nugetcli-proxy-config-rollback.md Outdated
…llback.md

Co-authored-by: Michael B. Gale <mbg@github.com>
@michaelnebel
michaelnebel dismissed stale reviews from jketema and hvitved via 7acd459 October 26, 2026 14:22

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants