Skip to content

Conversation

@mbg
Copy link
Member

@mbg mbg commented Feb 3, 2026

Mirrors the equivalent PR for Go: #21252

This PR adds a new diagnostic for when the C# extractor successfully discovers private registries. The goal of this is to make this easy to see on the Tool Status Page, rather than requiring users to follow the process in https://docs.github.com/en/code-security/how-tos/view-and-interpret-data/viewing-code-scanning-logs#determining-whether-code-scanning-default-setup-used-any-private-registries

@mbg mbg self-assigned this Feb 3, 2026
@mbg mbg requested a review from a team as a code owner February 3, 2026 15:29
Copilot AI review requested due to automatic review settings February 3, 2026 15:29
@github-actions github-actions bot added the C# label Feb 3, 2026
Copy link
Contributor

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 adds a new diagnostic message for C# extraction when private package registries are successfully discovered. This mirrors the equivalent functionality added in the Go extractor (PR #21252) and makes it easier for users to see private registry usage on the Tool Status Page.

Changes:

  • Updated DependabotProxy.GetDependabotProxy() to accept an IDiagnosticsWriter parameter and emit a diagnostic when private registries are detected
  • Modified DependencyManager to pass the diagnosticsWriter to DependabotProxy.GetDependabotProxy()
  • Added System.Linq import to support LINQ operations for formatting registry URLs

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs Passes diagnosticsWriter parameter to DependabotProxy.GetDependabotProxy() call
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs Adds diagnosticsWriter parameter, imports System.Linq, and emits diagnostic message when private registries are discovered

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.

4 participants