Open
Conversation
Contributor
There was a problem hiding this comment.
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 anIDiagnosticsWriterparameter and emit a diagnostic when private registries are detected - Modified
DependencyManagerto pass thediagnosticsWritertoDependabotProxy.GetDependabotProxy() - Added
System.Linqimport 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 |
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs
Show resolved
Hide resolved
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.
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