From 684c80c31a1fd828b9f1fc16225b9c21a828934e Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 10 Dec 2024 13:13:11 +0100 Subject: [PATCH] C#: Address review comments. --- .../NugetPackageRestorer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs index 17547a0ec87f..393e37579b71 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs @@ -606,7 +606,12 @@ private bool IsFeedReachable(string feed, int timeoutMilliSeconds, int tryCount, { if (chain is null || cert is null) { - logger.LogWarning("Certificate validation trivially failed due to missing chain or certificate."); + var msg = cert is null && chain is null + ? "certificate and chain" + : chain is null + ? "chain" + : "certificate"; + logger.LogWarning($"Dependabot proxy certificate validation failed due to missing {msg}"); return false; } chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust;