From 37a42626ef250ae93120afc77a3821637a34b3c9 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Fri, 26 Apr 2024 10:28:01 -0700 Subject: [PATCH 1/7] Capability for driver to read from a binary log This adds a new option to the driver, `--binlog`. When this is specified the driver will read all C# invocations from the binary log and process them. --- .../Semmle.Extraction.CSharp/BUILD.bazel | 1 + .../Extractor/Extractor.cs | 51 ++++++++++++++++++- .../Extractor/Options.cs | 7 ++- .../Semmle.Extraction.CSharp/paket.references | 2 +- csharp/paket.dependencies | 1 + csharp/paket.lock | 21 ++++++++ csharp/paket.main.bzl | 6 +++ 7 files changed, 85 insertions(+), 4 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/BUILD.bazel b/csharp/extractor/Semmle.Extraction.CSharp/BUILD.bazel index dc3e549f71eb..6e535959a476 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/BUILD.bazel +++ b/csharp/extractor/Semmle.Extraction.CSharp/BUILD.bazel @@ -20,6 +20,7 @@ codeql_csharp_library( "//csharp/extractor/Semmle.Extraction", "//csharp/extractor/Semmle.Extraction.CSharp.Util", "//csharp/extractor/Semmle.Util", + "@paket.main//basic.compilerlog.util", "@paket.main//microsoft.build", "@paket.main//microsoft.codeanalysis.csharp", ], diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index f6913103ad8c..197baf6543e9 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -13,6 +13,8 @@ using Microsoft.CodeAnalysis.Text; using Semmle.Util; using Semmle.Util.Logging; +using Basic.CompilerLog; +using Basic.CompilerLog.Util; namespace Semmle.Extraction.CSharp { @@ -92,11 +94,56 @@ public static ILogger MakeLogger(Verbosity verbosity, bool includeConsole) /// Command line arguments as passed to csc.exe /// public static ExitCode Run(string[] args) + { + var options = Options.CreateWithEnvironment(args); + if (options.BinaryLogPath is string binlogPath) + { + using var fileStream = new FileStream(binlogPath, FileMode.Open, FileAccess.Read, FileShare.Read); + + // Filter out compiler calls that aren't interesting for examination + var predicate = bool (CompilerCall compilerCall) => + { + if (!compilerCall.IsCSharp) + { + return false; + } + + return compilerCall.Kind switch + { + CompilerCallKind.XamlPreCompile => false, + CompilerCallKind.Satellite => false, + CompilerCallKind.WpfTemporaryCompile => false, + _ => true + }; + }; + + var compilerCalls = BinaryLogUtil.ReadAllCompilerCalls(fileStream, predicate); + var exitCode = ExitCode.Ok; + foreach (var compilerCall in compilerCalls) + { + Console.WriteLine($"Processing {compilerCall.GetDiagnosticName()}"); + var compilerCallOptions = Options.CreateWithEnvironment([]); + compilerCallOptions.CompilerName = compilerCall.CompilerFilePath; + compilerCallOptions.CompilerArguments.AddRange(compilerCall.GetArguments()); + var ec = Run(compilerCallOptions); + if (ec != ExitCode.Ok) + { + exitCode = ec; + } + } + + return exitCode; + } + else + { + return Run(options); + } + } + + public static ExitCode Run(Options options) { var stopwatch = new Stopwatch(); stopwatch.Start(); - - var options = Options.CreateWithEnvironment(args); var workingDirectory = Directory.GetCurrentDirectory(); var compilerArgs = options.CompilerArguments.ToArray(); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs index 4fafffe98333..2a15cf562a52 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs @@ -25,13 +25,15 @@ public sealed class Options : CommonOptions /// /// All other arguments passed to the compilation. /// - public IList CompilerArguments { get; } = new List(); + public List CompilerArguments { get; } = new List(); /// /// Holds if assembly information should be prefixed to TRAP labels. /// public bool AssemblySensitiveTrap { get; private set; } = false; + public string? BinaryLogPath { get; set; } + public static Options CreateWithEnvironment(string[] arguments) { var options = new Options(); @@ -65,6 +67,9 @@ public override bool HandleOption(string key, string value) case "load-sources-from-project": ProjectsToLoad.Add(value); return true; + case "binlog": + BinaryLogPath = value; + return true; default: return base.HandleOption(key, value); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/paket.references b/csharp/extractor/Semmle.Extraction.CSharp/paket.references index 70cd7de8821f..d53881096fdf 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/paket.references +++ b/csharp/extractor/Semmle.Extraction.CSharp/paket.references @@ -1,3 +1,3 @@ Microsoft.Build Microsoft.CodeAnalysis.CSharp - +Basic.CompilerLog.Util \ No newline at end of file diff --git a/csharp/paket.dependencies b/csharp/paket.dependencies index 5634fbc67ded..c2f8df5181f8 100644 --- a/csharp/paket.dependencies +++ b/csharp/paket.dependencies @@ -4,6 +4,7 @@ source https://api.nuget.org/v3/index.json # behave like nuget in choosing transitive dependency versions strategy: min +nuget Basic.CompilerLog.Util nuget Mono.Posix.NETStandard nuget Newtonsoft.Json nuget xunit diff --git a/csharp/paket.lock b/csharp/paket.lock index df2c9a6585db..286269807232 100644 --- a/csharp/paket.lock +++ b/csharp/paket.lock @@ -3,7 +3,19 @@ STRATEGY: MIN RESTRICTION: == net8.0 NUGET remote: https://api.nuget.org/v3/index.json + Basic.CompilerLog.Util (0.7.3) + MessagePack (>= 2.5.129) + Microsoft.CodeAnalysis (>= 4.8) + Microsoft.CodeAnalysis.CSharp (>= 4.8) + Microsoft.CodeAnalysis.VisualBasic (>= 4.8) + Microsoft.Extensions.ObjectPool (>= 7.0.13) + MSBuild.StructuredLogger (>= 2.2.235) Humanizer.Core (2.14.1) + MessagePack (2.5.129) + MessagePack.Annotations (>= 2.5.129) + Microsoft.NET.StringTools (>= 17.6.3) + System.Runtime.CompilerServices.Unsafe (>= 6.0) + MessagePack.Annotations (2.5.129) Microsoft.Bcl.AsyncInterfaces (7.0) Microsoft.Build (17.8.3) Microsoft.Build.Framework (>= 17.8.3) @@ -15,6 +27,11 @@ NUGET System.Security.Principal.Windows (>= 5.0) System.Threading.Tasks.Dataflow (>= 7.0) Microsoft.Build.Framework (17.8.3) + Microsoft.Build.Utilities.Core (17.5) + Microsoft.Build.Framework (>= 17.5) + Microsoft.NET.StringTools (>= 17.5) + System.Collections.Immutable (>= 6.0) + System.Configuration.ConfigurationManager (>= 6.0) Microsoft.CodeAnalysis (4.8) Microsoft.CodeAnalysis.CSharp.Workspaces (4.8) Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.8) @@ -45,6 +62,7 @@ NUGET System.IO.Pipelines (>= 7.0) System.Threading.Channels (>= 7.0) Microsoft.CodeCoverage (17.9) + Microsoft.Extensions.ObjectPool (7.0.13) Microsoft.NET.StringTools (17.8.3) Microsoft.NET.Test.Sdk (17.9) Microsoft.CodeCoverage (>= 17.9) @@ -62,6 +80,9 @@ NUGET System.Runtime (>= 4.3) Microsoft.Win32.SystemEvents (7.0) Mono.Posix.NETStandard (1.0) + MSBuild.StructuredLogger (2.2.235) + Microsoft.Build.Framework (>= 17.5) + Microsoft.Build.Utilities.Core (>= 17.5) Newtonsoft.Json (13.0.3) System.Collections.Immutable (7.0) System.Composition (7.0) diff --git a/csharp/paket.main.bzl b/csharp/paket.main.bzl index 49f5b59e216f..2dd5fba50c6c 100644 --- a/csharp/paket.main.bzl +++ b/csharp/paket.main.bzl @@ -7,10 +7,14 @@ def main(): nuget_repo( name = "paket.main", packages = [ + {"name": "Basic.CompilerLog.Util", "id": "Basic.CompilerLog.Util", "version": "0.7.3", "sha512": "sha512-7z/L3IZWMQsxtBX5eRz0tSlZQl5NhJT9Ntfn4BfvIAT5cy1VPjsGPJtv0gJI5f398KvELGU7O37Aw/VrgmsH9w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net462": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net47": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net471": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net472": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net48": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net5.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net6.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net7.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net8.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp2.2": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp3.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp3.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netstandard2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Humanizer.Core", "id": "Humanizer.Core", "version": "2.14.1", "sha512": "sha512-yzqGU/HKNLZ9Uvr6kvSc3wYV/S5O/IvklIUW5WF7MuivGLY8wS5IZnLPkt7D1KW8Et2Enl0I3Lzg2vGWM24Xsw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "MessagePack", "id": "MessagePack", "version": "2.5.129", "sha512": "sha512-wpw2dHkE5AcvMYKE4MrWuoeZ2jeaneDlqAgplxm6yKqPXeUVI2h5DPrKjsljnJSNRZOm3tunasw18Q9xj/3UoA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net462": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net47": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net471": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net472": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net48": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "MessagePack.Annotations", "id": "MessagePack.Annotations", "version": "2.5.129", "sha512": "sha512-mr12dLr06Kp7Ra7+GUXHbuxt/gbi6RPGPw1mpSvZsubs7hJxzHDtYTb5KKuseu5cpzOUDfsGcaW+Bo0+lqCFAA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.Bcl.AsyncInterfaces", "id": "Microsoft.Bcl.AsyncInterfaces", "version": "7.0.0", "sha512": "sha512-Nb9B1lxCab0LZi0ijNLEpw4hgwt0Wl8QQM1DxIhJS2otChAtIVMfyGrYl3YzdSjspvBYPliJlr0kCtizNAVe3w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.Build", "id": "Microsoft.Build", "version": "17.8.3", "sha512": "sha512-jRz++ltVTU9xGAYSnI7fGwLIsg/AwINaxlXaJrcMszO+fyh1xJ8gKZkDz10foT/5y26jZC6G93wyp85NVHc+lA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Reflection.MetadataLoadContext", "System.Security.Principal.Windows", "System.Threading.Tasks.Dataflow", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net48": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Reflection.MetadataLoadContext", "System.Security.Principal.Windows", "System.Threading.Tasks.Dataflow", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Reflection.MetadataLoadContext", "System.Security.Principal.Windows", "System.Threading.Tasks.Dataflow", "System.Reflection.Metadata"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.Build.Framework", "id": "Microsoft.Build.Framework", "version": "17.8.3", "sha512": "sha512-xDOoj8lpNohM0Sieo4sJ47m/3SAquclF8wFZeAYYuDRHc8hII4XWPhSafFmw5A4TMGOyV08Z1TrrqES9HxMB3Q==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net462": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net47": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net471": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net472": ["System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net6.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net7.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netcoreapp2.1": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netcoreapp2.2": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netcoreapp3.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netcoreapp3.1": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"], "netstandard2.1": ["System.Runtime.CompilerServices.Unsafe", "System.Security.Principal.Windows"]}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "Microsoft.Build.Utilities.Core", "id": "Microsoft.Build.Utilities.Core", "version": "17.5.0", "sha512": "sha512-La1NFQ7SVz1pVGEUnG15BQG26jJkRMCiitySBXLhuTYf9IG6eZ5j5UFjnM4EFKSVKbictRv+D/F0dQtsCiK9ag==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net462": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net47": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net471": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net472": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager"], "net48": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager"], "net5.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net6.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "net7.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager"], "net8.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netcoreapp2.1": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netcoreapp2.2": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netcoreapp3.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netcoreapp3.1": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"], "netstandard2.1": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Security.Permissions"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.CodeAnalysis", "id": "Microsoft.CodeAnalysis", "version": "4.8.0", "sha512": "sha512-KETFTRJCjhDGnULVvVDbA0miI0EMnx9m9N+TAKfvVywtTcVYXEukp5NOUQNzzOpU7XH231Vv7V2k50qCz/teVw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net462": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net47": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net471": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net472": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net48": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net5.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net6.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net7.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "net8.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"], "netstandard2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.CodeAnalysis.Analyzers", "id": "Microsoft.CodeAnalysis.Analyzers", "version": "3.3.4", "sha512": "sha512-I+Riw6/6WjNICydoiNpDjN/GGP7u4XsL6VsI9lG/OjFufH3flvSEy/fxNhGDVGwZWwq/5BlnqX+LH2dmheaPfg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.CodeAnalysis.Common", "id": "Microsoft.CodeAnalysis.Common", "version": "4.8.0", "sha512": "sha512-R3u+gGs/RakiGqnBf80niDI56pCaN1g+2n66QmKqj6fAv6xw9uES2BtwtKOkQsiTEDqPm6Vk0OwrgsP1S+rSbA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net462": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net47": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net471": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net472": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net48": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, @@ -20,6 +24,7 @@ def main(): {"name": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "id": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "version": "4.8.0", "sha512": "sha512-KvjbWJc4bAgWfvbaIIBv1eHfjfkLxQzaCT6BtxmCZTQuFO+zEjewzbwA9QhK/PMaCOM686Fn+5fhiC6kzLwO4g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.CodeAnalysis.Workspaces.Common", "id": "Microsoft.CodeAnalysis.Workspaces.Common", "version": "4.8.0", "sha512": "sha512-pTFm2FbSn0MonSJN2XxSBrMwHUWRM7wUWZczQvJdXXo1gZBaNbH8o9/tcsXc/AmMJqPtC7rY0HRJ/Mm95STaxA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net462": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net47": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net471": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net472": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net48": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.CodeCoverage", "id": "Microsoft.CodeCoverage", "version": "17.9.0", "sha512": "sha512-QEb48Z408yBfe/f156te98pfHwjvLOKl+UC1Pzg7KH1PDXXgk8KN8ZOEdYGrAiG43pC99Oo39bCb2R5WE+e5VA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "Microsoft.Extensions.ObjectPool", "id": "Microsoft.Extensions.ObjectPool", "version": "7.0.13", "sha512": "sha512-N66kAzKBfcs4zIX/iVMUOhfn8Xv3Ye1QpLGS8IUSpCHa+Vxh2ZsdDiqd0Y2m7ryPU6FU2LOTnZ+0ymmm83vC6w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.NET.StringTools", "id": "Microsoft.NET.StringTools", "version": "17.8.3", "sha512": "sha512-3N/Ika66JZeORrIZ68fap6M0LSQ9+SQz277NxjA/dxETnR3dZwJXj67jAAc4FkijG6w//QzrC5NEregtIVjz1w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Runtime.CompilerServices.Unsafe"], "net7.0": ["System.Runtime.CompilerServices.Unsafe"], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.NET.Test.Sdk", "id": "Microsoft.NET.Test.Sdk", "version": "17.9.0", "sha512": "sha512-1WsHeRGhVUDonn7uT+vAGkYmJF57QTR+0PDpoIvDPq+vJtaNzrUHJbPFrU3aV+y68D+0wlj4QRop5fzvxFBJkA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": ["Microsoft.CodeCoverage"], "net47": ["Microsoft.CodeCoverage"], "net471": ["Microsoft.CodeCoverage"], "net472": ["Microsoft.CodeCoverage"], "net48": ["Microsoft.CodeCoverage"], "net5.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "net6.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "net7.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "net8.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.NETCore.Platforms", "id": "Microsoft.NETCore.Platforms", "version": "1.1.1", "sha512": "sha512-mDUJD1eLXIzmUnWCzWlmNQZGDp/cVGT8KyhzMcJNk2nlfdFUOoZai9idT8/FacJr8Nv8zhAmdf39FHm5qWUoGQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, @@ -29,6 +34,7 @@ def main(): {"name": "Microsoft.Win32.Primitives", "id": "Microsoft.Win32.Primitives", "version": "4.3.0", "sha512": "sha512-Nm8Hp51y9tYcK3xD6qk43Wjftrg1mdH24CCJsTb6gr7HS21U1uA+CKPGEtUcVZbjU1y8Kynzm5eoJ7Pnx5gm8A==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "net6.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "net7.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "net8.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp1.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp1.1": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp2.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp2.1": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp2.2": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp3.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netcoreapp3.1": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard1.4": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard1.5": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard1.6": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard2.0": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"], "netstandard2.1": ["Microsoft.NETCore.Platforms", "Microsoft.NETCore.Targets", "System.Runtime"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Microsoft.Win32.SystemEvents", "id": "Microsoft.Win32.SystemEvents", "version": "7.0.0", "sha512": "sha512-GO6SWx/wSZIFvxOn67Y6OiIGdz9JGCg5CRDDbSAAvBDQeZFbybu9sEOUb9w/vUlQv+A2XakTFZg9Ug1w+tgbWQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Mono.Posix.NETStandard", "id": "Mono.Posix.NETStandard", "version": "1.0.0", "sha512": "sha512-RtGiutQZJAmajvQ0QvBvh73VJye85iW9f9tjZlzF88idLxNMo4lAktP/4Y9ilCpais0LDO0tpoICt9Hdv6wooA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, + {"name": "MSBuild.StructuredLogger", "id": "MSBuild.StructuredLogger", "version": "2.2.235", "sha512": "sha512-9ige0SOByBirmeIYZ3fwlwbnXrYZA2trdZV7Mad8z7FiuGbVNOVkGYrzln/+G1eIvmRh9J0pt6xBLwqIYaMxyQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net462": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net47": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net471": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net472": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net48": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net5.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net6.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net7.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net8.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netcoreapp2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netcoreapp2.2": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netcoreapp3.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netcoreapp3.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "netstandard2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "Newtonsoft.Json", "id": "Newtonsoft.Json", "version": "13.0.3", "sha512": "sha512-mbJSvHfRxfX3tR/U6n1WU+mWHXswYc+SB/hkOpx8yZZe68hNZGfymJu0cjsaJEkVzCMqePiU6LdIyogqfIn7kg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "System.Collections.Immutable", "id": "System.Collections.Immutable", "version": "7.0.0", "sha512": "sha512-8ISvyTlddLTyUsR7fQ43jmdta4tgM6aGNrZItYgF43ct0i/x3tBdPIyFU9LnaFspt1P+HLtaMz8Bir5kIqPr+g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Runtime.CompilerServices.Unsafe"], "net462": ["System.Runtime.CompilerServices.Unsafe"], "net47": ["System.Runtime.CompilerServices.Unsafe"], "net471": ["System.Runtime.CompilerServices.Unsafe"], "net472": ["System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Runtime.CompilerServices.Unsafe"], "net7.0": [], "net8.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": []}, {"name": "System.Composition", "id": "System.Composition", "version": "7.0.0", "sha512": "sha512-+tzE7ykR8A8zNhvCbpLwfeWv6MsbR9V3ZG9dGuQ1/DKqpeP0qQeHsqgjv20njYmyj4uoEyw1VtSGr+v++fiwhg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net462": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net47": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net471": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net472": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net48": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net5.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net6.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net7.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "net8.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp2.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp2.2": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp3.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netcoreapp3.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"], "netstandard2.1": ["System.Composition.AttributedModel", "System.Composition.Convention", "System.Composition.Hosting", "System.Composition.Runtime", "System.Composition.TypedParts"]}, "targeting_pack_overrides": [], "framework_list": []}, From 872dcecd2edec94f62bb5d84243a2ca65da51cde Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 24 May 2024 14:41:23 +0200 Subject: [PATCH 2/7] Introduce extractor option for binlog --- csharp/autobuilder/Semmle.Autobuild.CSharp/BUILD.bazel | 1 + .../Semmle.Autobuild.CSharp/CSharpAutobuilder.cs | 3 ++- .../Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj | 1 + .../Semmle.Autobuild.CSharp/StandaloneBuildRule.cs | 4 +++- csharp/codeql-extractor.yml | 6 ++++++ .../extractor/Semmle.Extraction.CSharp.Driver/BUILD.bazel | 2 +- 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/BUILD.bazel b/csharp/autobuilder/Semmle.Autobuild.CSharp/BUILD.bazel index 904edb3ca559..b1143162a646 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/BUILD.bazel +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/BUILD.bazel @@ -14,6 +14,7 @@ codeql_csharp_binary( "//csharp/autobuilder/Semmle.Autobuild.Shared", "//csharp/extractor/Semmle.Extraction.CSharp", "//csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching", + "//csharp/extractor/Semmle.Extraction.CSharp.Driver:bin/Semmle.Extraction.CSharp.Driver", "//csharp/extractor/Semmle.Extraction.CSharp.Standalone:bin/Semmle.Extraction.CSharp.Standalone", "//csharp/extractor/Semmle.Util", "@paket.main//microsoft.build", diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs index dafda9a8f2ab..577eed2a0c8c 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs @@ -15,6 +15,7 @@ public class CSharpAutobuildOptions : AutobuildOptionsShared private const string extractorOptionPrefix = "CODEQL_EXTRACTOR_CSHARP_OPTION_"; public bool Buildless { get; } + public string? Binlog { get; } public override Language Language => Language.CSharp; @@ -29,7 +30,7 @@ public CSharpAutobuildOptions(IBuildActions actions) : base(actions) actions.GetEnvironmentVariable(extractorOptionPrefix + "BUILDLESS").AsBool("buildless", false) || actions.GetEnvironmentVariable(buildModeEnvironmentVariable)?.ToLower() == "none"; - + Binlog = actions.GetEnvironmentVariable(extractorOptionPrefix + "BINLOG"); } } diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj index 7c4f1d681773..515fecd5bec6 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj @@ -6,6 +6,7 @@ + diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs index 5b844e6cf6c8..e0e40213895f 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs @@ -10,7 +10,9 @@ internal class StandaloneBuildRule : IBuildRule { public BuildScript Analyse(IAutobuilder builder, bool auto) { - return BuildScript.Create(_ => Semmle.Extraction.CSharp.Standalone.Program.Main([])); + return builder.Options.Binlog is string binlog + ? BuildScript.Create(_ => Semmle.Extraction.CSharp.Driver.Main(["--binlog", binlog])) + : BuildScript.Create(_ => Semmle.Extraction.CSharp.Standalone.Program.Main([])); } } } diff --git a/csharp/codeql-extractor.yml b/csharp/codeql-extractor.yml index 6c3285c412b9..43c4adaafbf9 100644 --- a/csharp/codeql-extractor.yml +++ b/csharp/codeql-extractor.yml @@ -65,3 +65,9 @@ options: - progress+++ type: string pattern: "^(off|errors|warnings|(info|progress)|(debug|progress\\+)|(trace|progress\\+\\+)|progress\\+\\+\\+)$" + binlog: + title: Binlog + description: > + [EXPERIMENTAL] The value is a path to the MsBuild binary log file that should be extracted. + This option only works when `--build-mode none` is also specified. + type: string diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Driver/BUILD.bazel b/csharp/extractor/Semmle.Extraction.CSharp.Driver/BUILD.bazel index a32dc3a37650..c5e34f797766 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Driver/BUILD.bazel +++ b/csharp/extractor/Semmle.Extraction.CSharp.Driver/BUILD.bazel @@ -9,7 +9,7 @@ codeql_csharp_binary( "*.cs", "Properties/*.cs", ]), - visibility = ["//csharp:__pkg__"], + visibility = ["//csharp:__subpackages__"], deps = [ "//csharp/extractor/Semmle.Extraction.CSharp", ], From e095dcc85738f5e8c42bd19185d01218f20eca78 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 4 Jun 2024 16:42:20 +0200 Subject: [PATCH 3/7] Add integration test for `--binlog` --- .../all-platforms/binlog/Files.expected | 4 ++++ .../ql/integration-tests/all-platforms/binlog/Files.ql | 5 +++++ .../integration-tests/all-platforms/binlog/Program.cs | 1 + .../integration-tests/all-platforms/binlog/global.json | 5 +++++ .../integration-tests/all-platforms/binlog/test.csproj | 10 ++++++++++ .../ql/integration-tests/all-platforms/binlog/test.py | 5 +++++ 6 files changed, 30 insertions(+) create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/Files.expected create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/Files.ql create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/Program.cs create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/global.json create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/test.csproj create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/test.py diff --git a/csharp/ql/integration-tests/all-platforms/binlog/Files.expected b/csharp/ql/integration-tests/all-platforms/binlog/Files.expected new file mode 100644 index 000000000000..a1baf83e4780 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/Files.expected @@ -0,0 +1,4 @@ +| Program.cs:0:0:0:0 | Program.cs | +| obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs:0:0:0:0 | obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs | +| obj/Debug/net8.0/test.AssemblyInfo.cs:0:0:0:0 | obj/Debug/net8.0/test.AssemblyInfo.cs | +| obj/Debug/net8.0/test.GlobalUsings.g.cs:0:0:0:0 | obj/Debug/net8.0/test.GlobalUsings.g.cs | diff --git a/csharp/ql/integration-tests/all-platforms/binlog/Files.ql b/csharp/ql/integration-tests/all-platforms/binlog/Files.ql new file mode 100644 index 000000000000..bea5557a25f1 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/Files.ql @@ -0,0 +1,5 @@ +import csharp + +from File f +where f.fromSource() +select f diff --git a/csharp/ql/integration-tests/all-platforms/binlog/Program.cs b/csharp/ql/integration-tests/all-platforms/binlog/Program.cs new file mode 100644 index 000000000000..47eee48cc791 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/Program.cs @@ -0,0 +1 @@ +var dummy = "dummy"; \ No newline at end of file diff --git a/csharp/ql/integration-tests/all-platforms/binlog/global.json b/csharp/ql/integration-tests/all-platforms/binlog/global.json new file mode 100644 index 000000000000..5c3fd64fbd12 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "8.0.101" + } +} diff --git a/csharp/ql/integration-tests/all-platforms/binlog/test.csproj b/csharp/ql/integration-tests/all-platforms/binlog/test.csproj new file mode 100644 index 000000000000..91b464afeacc --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/test.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/csharp/ql/integration-tests/all-platforms/binlog/test.py b/csharp/ql/integration-tests/all-platforms/binlog/test.py new file mode 100644 index 000000000000..fd1af1571a25 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/test.py @@ -0,0 +1,5 @@ +import subprocess +from create_database_utils import * + +subprocess.check_call(["dotnet", "build", "/bl:test.binlog"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none", "-Obinlog=test.binlog"]) From b9e24e6619e16a1f354987bc08333d718c1a2f10 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 4 Jun 2024 16:44:14 +0200 Subject: [PATCH 4/7] Log message when binary log is used --- .../Extractor/Extractor.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index 197baf6543e9..8eb16cb6e46a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -96,8 +96,10 @@ public static ILogger MakeLogger(Verbosity verbosity, bool includeConsole) public static ExitCode Run(string[] args) { var options = Options.CreateWithEnvironment(args); + using var logger = MakeLogger(options.Verbosity, options.Console); if (options.BinaryLogPath is string binlogPath) { + logger.LogInfo($"Reading compiler calls from binary log {binlogPath}"); using var fileStream = new FileStream(binlogPath, FileMode.Open, FileAccess.Read, FileShare.Read); // Filter out compiler calls that aren't interesting for examination @@ -121,11 +123,13 @@ public static ExitCode Run(string[] args) var exitCode = ExitCode.Ok; foreach (var compilerCall in compilerCalls) { - Console.WriteLine($"Processing {compilerCall.GetDiagnosticName()}"); + var diagnosticName = compilerCall.GetDiagnosticName(); + Console.WriteLine($"Processing {diagnosticName}"); var compilerCallOptions = Options.CreateWithEnvironment([]); compilerCallOptions.CompilerName = compilerCall.CompilerFilePath; compilerCallOptions.CompilerArguments.AddRange(compilerCall.GetArguments()); - var ec = Run(compilerCallOptions); + logger.LogInfo($"Running extractor on arguments from binary log. Processing {diagnosticName}."); + var ec = Run(compilerCallOptions, logger); if (ec != ExitCode.Ok) { exitCode = ec; @@ -136,19 +140,17 @@ public static ExitCode Run(string[] args) } else { - return Run(options); + return Run(options, logger); } } - public static ExitCode Run(Options options) + public static ExitCode Run(Options options, ILogger logger) { var stopwatch = new Stopwatch(); stopwatch.Start(); var workingDirectory = Directory.GetCurrentDirectory(); var compilerArgs = options.CompilerArguments.ToArray(); - using var logger = MakeLogger(options.Verbosity, options.Console); - var canonicalPathCache = CanonicalPathCache.Create(logger, 1000); var pathTransformer = new PathTransformer(canonicalPathCache); From d2290091b2c7b447a6d46d6c59319f6e1cb4a325 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 4 Jun 2024 16:47:01 +0200 Subject: [PATCH 5/7] Fix integration test --- .../Assemblies.expected | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected b/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected index 26e38291aa14..38dee8ac6bd2 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected @@ -1,6 +1,10 @@ +| [...]/Basic.CompilerLog.Util.dll | | [...]/Humanizer.dll | +| [...]/MessagePack.Annotations.dll | +| [...]/MessagePack.dll | | [...]/Microsoft.Bcl.AsyncInterfaces.dll | | [...]/Microsoft.Build.Framework.dll | +| [...]/Microsoft.Build.Utilities.Core.dll | | [...]/Microsoft.Build.dll | | [...]/Microsoft.CSharp.dll | | [...]/Microsoft.CodeAnalysis.CSharp.Workspaces.dll | @@ -9,6 +13,7 @@ | [...]/Microsoft.CodeAnalysis.VisualBasic.dll | | [...]/Microsoft.CodeAnalysis.Workspaces.dll | | [...]/Microsoft.CodeAnalysis.dll | +| [...]/Microsoft.Extensions.ObjectPool.dll | | [...]/Microsoft.NET.StringTools.dll | | [...]/Microsoft.VisualBasic.Core.dll | | [...]/Microsoft.VisualBasic.dll | @@ -17,6 +22,7 @@ | [...]/Microsoft.Win32.SystemEvents.dll | | [...]/Mono.Posix.NETStandard.dll | | [...]/Newtonsoft.Json.dll | +| [...]/StructuredLogger.dll | | [...]/System.AppContext.dll | | [...]/System.Buffers.dll | | [...]/System.Collections.Concurrent.dll | From 38660a0db633d18a901e1530939f720070159ef8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 5 Jun 2024 10:30:16 +0200 Subject: [PATCH 6/7] Adjust exit code for binlog extraction --- .../Semmle.Extraction.CSharp/Extractor/Extractor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index 8eb16cb6e46a..610d8065711a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -120,7 +120,7 @@ public static ExitCode Run(string[] args) }; var compilerCalls = BinaryLogUtil.ReadAllCompilerCalls(fileStream, predicate); - var exitCode = ExitCode.Ok; + var allFailed = true; foreach (var compilerCall in compilerCalls) { var diagnosticName = compilerCall.GetDiagnosticName(); @@ -130,13 +130,13 @@ public static ExitCode Run(string[] args) compilerCallOptions.CompilerArguments.AddRange(compilerCall.GetArguments()); logger.LogInfo($"Running extractor on arguments from binary log. Processing {diagnosticName}."); var ec = Run(compilerCallOptions, logger); - if (ec != ExitCode.Ok) + if (ec != ExitCode.Failed) { - exitCode = ec; + allFailed &= false; } } - return exitCode; + return allFailed ? ExitCode.Failed : ExitCode.Ok; } else { From 767191a32d3772d8827666721a3d85264968aaff Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 10 Jun 2024 11:38:58 +0200 Subject: [PATCH 7/7] DO NOT MERGE: temporarily don't extract source generator output --- .../Semmle.Extraction.CSharp/Extractor/Extractor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index 610d8065711a..d61472e7ce2e 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -442,10 +442,10 @@ private static ExitCode AnalyseTracing( .Select(src => src.Path) .ToList(); - if (compilerArguments.GeneratedFilesOutputDirectory is not null) - { - paths.AddRange(Directory.GetFiles(compilerArguments.GeneratedFilesOutputDirectory, "*.cs", new EnumerationOptions { RecurseSubdirectories = true, MatchCasing = MatchCasing.CaseInsensitive })); - } + // if (compilerArguments.GeneratedFilesOutputDirectory is not null) + // { + // paths.AddRange(Directory.GetFiles(compilerArguments.GeneratedFilesOutputDirectory, "*.cs", new EnumerationOptions { RecurseSubdirectories = true, MatchCasing = MatchCasing.CaseInsensitive })); + // } return ReadSyntaxTrees( paths.Select(canonicalPathCache.GetCanonicalPath),