Skip to content

Commit 63d5517

Browse files
committed
C#: Add list of registries to DependabotProxy
1 parent 6b2f348 commit 63d5517

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System;
2-
using System.Diagnostics;
2+
using System.Collections.Generic;
33
using System.IO;
44
using System.Security.Cryptography.X509Certificates;
55
using Semmle.Util;
@@ -9,6 +9,21 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
99
{
1010
public class DependabotProxy : IDisposable
1111
{
12+
/// <summary>
13+
/// Represents configurations for package registries.
14+
/// </summary>
15+
public struct RegistryConfig
16+
{
17+
/// <summary>
18+
/// The type of package registry.
19+
/// </summary>
20+
public string Type { get; set; }
21+
/// <summary>
22+
/// The URL of the package registry.
23+
/// </summary>
24+
public string URL { get; set; }
25+
}
26+
1227
private readonly string host;
1328
private readonly string port;
1429

@@ -17,6 +32,10 @@ public class DependabotProxy : IDisposable
1732
/// </summary>
1833
internal string Address { get; }
1934
/// <summary>
35+
/// The URLs of package registries that are configured for the proxy.
36+
/// </summary>
37+
internal HashSet<string> RegistryURLs { get; }
38+
/// <summary>
2039
/// The path to the temporary file where the certificate is stored.
2140
/// </summary>
2241
internal string? CertificatePath { get; private set; }
@@ -75,6 +94,7 @@ private DependabotProxy(string host, string port)
7594
this.host = host;
7695
this.port = port;
7796
this.Address = $"http://{this.host}:{this.port}";
97+
this.RegistryURLs = new HashSet<string>();
7898
}
7999

80100
public void Dispose()

0 commit comments

Comments
 (0)