Skip to content

Commit 4448369

Browse files
committed
C#: Check that private package registry feeds are reachable
1 parent 92eab47 commit 4448369

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,13 @@ private bool IsFeedReachable(string feed, int timeoutMilliSeconds, int tryCount,
708708
private bool CheckFeeds(out HashSet<string> explicitFeeds)
709709
{
710710
(explicitFeeds, var allFeeds) = GetAllFeeds();
711+
HashSet<string> feedsToCheck = explicitFeeds;
711712

712-
var allFeedsReachable = this.CheckFeeds(explicitFeeds);
713+
// If private package registries are configured for C#, then check those
714+
// in addition to the ones that are configured in `nuget.config` files.
715+
this.dependabotProxy?.RegistryURLs.ForEach(url => feedsToCheck.Add(url));
716+
717+
var allFeedsReachable = this.CheckFeeds(feedsToCheck);
713718

714719
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
715720
if (inheritedFeeds.Count > 0)

0 commit comments

Comments
 (0)