Skip to content

Commit 3ea0b04

Browse files
committed
Merge branch 'main' into redsun82/bazel-9
2 parents a76c0b5 + b5e3168 commit 3ea0b04

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Semmle.Util;
66
using Semmle.Util.Logging;
77
using Newtonsoft.Json;
8+
using System.Linq;
89

910
namespace Semmle.Extraction.CSharp.DependencyFetching
1011
{
@@ -37,7 +38,8 @@ public record class RegistryConfig(string Type, string URL);
3738
/// </summary>
3839
internal X509Certificate2? Certificate { get; private set; }
3940

40-
internal static DependabotProxy? GetDependabotProxy(ILogger logger, TemporaryDirectory tempWorkingDirectory)
41+
internal static DependabotProxy? GetDependabotProxy(
42+
ILogger logger, IDiagnosticsWriter diagnosticsWriter, TemporaryDirectory tempWorkingDirectory)
4143
{
4244
// Setting HTTP(S)_PROXY and SSL_CERT_FILE have no effect on Windows or macOS,
4345
// but we would still end up using the Dependabot proxy to check for feed reachability.
@@ -112,6 +114,23 @@ public record class RegistryConfig(string Type, string URL);
112114
}
113115
}
114116

117+
// Emit a diagnostic for the discovered private registries, so that it is easy
118+
// for users to see that they were picked up.
119+
if (result.RegistryURLs.Count > 0)
120+
{
121+
diagnosticsWriter.AddEntry(new DiagnosticMessage(
122+
Language.CSharp,
123+
"buildless/analysis-using-private-registries",
124+
severity: DiagnosticMessage.TspSeverity.Note,
125+
visibility: new DiagnosticMessage.TspVisibility(true, true, true),
126+
name: "C# extraction used private package registries",
127+
markdownMessage: string.Format(
128+
"C# was extracted using the following private package registries:\n\n{0}\n",
129+
string.Join("\n", result.RegistryURLs.Select(url => string.Format("- `{0}`", url)))
130+
)
131+
));
132+
}
133+
115134
return result;
116135
}
117136

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void exitCallback(int ret, string msg, bool silent)
106106
return BuildScript.Success;
107107
}).Run(SystemBuildActions.Instance, startCallback, exitCallback);
108108

109-
dependabotProxy = DependabotProxy.GetDependabotProxy(logger, tempWorkingDirectory);
109+
dependabotProxy = DependabotProxy.GetDependabotProxy(logger, diagnosticsWriter, tempWorkingDirectory);
110110

111111
try
112112
{

java/kotlin-extractor/dev/wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import io
2828
import os
2929

30-
DEFAULT_VERSION = "2.3.0"
30+
DEFAULT_VERSION = "2.3.10"
3131

3232

3333
def options():

java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.10.",
2+
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.20.",
33
"severity": "error",
44
"source": {
55
"extractorName": "java",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Kotlin versions up to 2.3.10 are now supported.

0 commit comments

Comments
 (0)