// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 using LibraryVersionsGenerator.Models; namespace LibraryVersionsGenerator; internal static class PackageVersionDefinitions { public static IReadOnlyCollection Definitions => [ new() { IntegrationName = "Azure", NugetPackageName = "Azure.Storage.Blobs", TestApplicationName = "TestApplication.Azure", Versions = [ // new("12.13.0"), // all lower versions than 12.22.2 contains references impacted by https://github.com/advisories/GHSA-8g4q-xg66-9fp4 new("12.22.2"), new("*") ] }, new() { IntegrationName = "Elasticsearch", NugetPackageName = "Elastic.Clients.Elasticsearch", TestApplicationName = "TestApplication.Elasticsearch", Versions = [ /* new("8.0.0"), new("8.10.0"), all lower versions than 8.15.10 contains references impacted by https://github.com/advisories/GHSA-8g4q-xg66-9fp4 */ new("8.15.10"), new("*") ] }, new() { IntegrationName = "EntityFrameworkCore", NugetPackageName = "Microsoft.EntityFrameworkCore.Sqlite", TestApplicationName = "TestApplication.EntityFrameworkCore", Versions = [ new("6.0.36"), // new("7.0.20"), all versions contains references to vulnerable packages https://github.com/advisories/GHSA-hh2w-p6rv-4g7w new("8.0.23"), new("9.0.12"), new("10.0.0", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]), new("*", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]) ] }, new() { IntegrationName = "EntityFrameworkCorePomeloMySql", NugetPackageName = "Pomelo.EntityFrameworkCore.MySql", TestApplicationName = "TestApplication.EntityFrameworkCore.Pomelo.MySql", Versions = [ new("6.0.3"), new("7.0.0"), new("8.0.3"), new("*") ] }, new() { IntegrationName = "GraphQL", NugetPackageName = "GraphQL", TestApplicationName = "TestApplication.GraphQL", Versions = [ new GraphQLVersion("7.5.0") { MicrosoftDIVersion = "7.5.0", ServerTransportsAspNetCoreVersion = "7.5.0", ServerUIGraphiQLVersion = "7.5.0" }, new GraphQLVersion("8.0.2") { MicrosoftDIVersion = "8.0.2", ServerTransportsAspNetCoreVersion = "8.0.2", ServerUIGraphiQLVersion = "8.0.2" }, new GraphQLVersion("*") { MicrosoftDIVersion = "*", ServerTransportsAspNetCoreVersion = "*", ServerUIGraphiQLVersion = "*" }, ] }, new() { IntegrationName = "GrpcNetClient", NugetPackageName = "Grpc.Net.Client", TestApplicationName = "TestApplication.GrpcNetClient", Versions = [ new("2.52.0"), new("*") ] }, new() { IntegrationName = "log4net", NugetPackageName = "log4net", TestApplicationName = "TestApplication.Log4NetBridge", Versions = [ // versions below 2.0.10 have critical vulnerabilities // versions below 2.0.13 have known bugs e.g. https://issues.apache.org/jira/browse/LOG4NET-652 // versions below 3.3.0 have known security vulnerabilities https://github.com/advisories/GHSA-4f7c-pmjv-c25w new("3.3.0"), new("*") ] }, new() { IntegrationName = "NLog", NugetPackageName = "NLog", TestApplicationName = "TestApplication.NLogBridge", Versions = [ // NLog 5.0+ required for Layout typed layout support and .NET build-trimming new NLogVersion("5.0.0") { NLogExtensionsLoggingVersion = "5.0.0" }, new NLogVersion("5.3.4") { NLogExtensionsLoggingVersion = "5.3.15" }, // 5.3.0 - breaking change in the instrumented method contract new NLogVersion("6.0.0") { NLogExtensionsLoggingVersion = "6.0.0" }, // 6.0.0 - breaking change in the instrumented method contract new NLogVersion("*") { NLogExtensionsLoggingVersion = "*" } ] }, new() { IntegrationName = "MassTransit", NugetPackageName = "MassTransit", TestApplicationName = "TestApplication.MassTransit", Versions = [ // new("8.0.0"), // all lower versions than 8.3.0 contains references impacted by // https://github.com/advisories/GHSA-8g4q-xg66-9fp4 new("8.3.0"), new("*") ] }, new() { IntegrationName = "SqlClientMicrosoft", NugetPackageName = "Microsoft.Data.SqlClient", TestApplicationName = "TestApplication.SqlClient.Microsoft", Versions = [ // new("1.1.4"), - high vulnerability https://github.com/dotnet/announcements/issues/292, test should be skipped // new("2.1.7"), transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj // new("3.1.7", supportedTargetFrameworks: new[] { "net8.0" }, supportedExecutionFrameworks: new[] { "net8.0" }), // 3.1.* is not supported on .NET Framework. For details check: https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243, transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj // new("4.0.6"), transitive vulnerabilities https://github.com/advisories/GHSA-rxg9-xrhp-64gj new("5.2.3"), new("6.1.5"), new("*") ] }, new() { IntegrationName = "SqlClientSystem", NugetPackageName = "System.Data.SqlClient", TestApplicationName = "TestApplication.SqlClient.System", Versions = [ new("4.8.6"), new("*") ] }, new() { IntegrationName = "MongoDB", NugetPackageName = "MongoDB.Driver", TestApplicationName = "TestApplication.MongoDB", Versions = [ // new("2.7.0"), - high vulnerability https://github.com/advisories/GHSA-7j9m-j397-g4wx, < 2.19.0 new("2.19.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net462"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]), new("2.30.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net462"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]), new("3.0.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net472"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]), new("3.5.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net472"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]), new("3.7.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net472"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]), // first version with native OTel support new("*", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0", "net472"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0", "net462"]) ] }, new() { IntegrationName = "MySqlConnector", NugetPackageName = "MySqlConnector", TestApplicationName = "TestApplication.MySqlConnector", Versions = [ new("2.0.0"), new("*") ] }, new() { IntegrationName = "MySqlData", NugetPackageName = "MySql.Data", TestApplicationName = "TestApplication.MySqlData", Versions = [ // new("8.1.0"), transitive vulnerability, https://github.com/advisories/GHSA-rxg9-xrhp-64gj, <9.0.0 new("9.0.0"), new("*") ] }, new() { IntegrationName = "Npgsql", NugetPackageName = "Npgsql", TestApplicationName = "TestApplication.Npgsql", Versions = [ // new("6.0.0"), - high vulnerability https://github.com/advisories/GHSA-x9vc-6hfv-hg8c, <= 6.0.10, <= 7.0.6, and <= 8.0.2 test should be skipped // new("6.0.11"), - transitive vulnerabilities https://github.com/advisories/GHSA-8g4q-xg66-9fp4 <= 6.0.12, <=7.0.8, <=8.0.4 test should be skipped new("8.0.9"), new("9.0.4", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]), new("*", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]) ] }, new() { IntegrationName = "NServiceBus", NugetPackageName = "NServiceBus", TestApplicationName = "TestApplication.NServiceBus", Versions = [ // new("8.0.0"), - transitive vulnerabilities https://github.com/advisories/GHSA-8g4q-xg66-9fp4, <=8.2.3 new("8.2.6"), // new("9.1.0", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]), // breaking change, new Meter name - transitive vulnerabilities <= 9.2.9 new("9.2.10", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]), // new("10.0.0", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]), // transitive vulnerabilities <= 10.1.2 new("10.1.3", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]), new("*", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]) ] }, new() { IntegrationName = "OracleMda", NugetPackageName = "Oracle.ManagedDataAccess", TestApplicationName = "TestApplication.OracleMda.NetFramework", Versions = [ // new("23.4.0", supportedTargetFrameworks: new[] { "net472" }, supportedExecutionFrameworks: new[] { "net462" }), transitive vulnerability https://github.com/advisories/GHSA-447r-wph3-92pm, <= 23.5.0 new("23.5.1", supportedTargetFrameworks: ["net472"], supportedExecutionFrameworks: ["net462"]), new("*", supportedTargetFrameworks: ["net472"], supportedExecutionFrameworks: ["net462"]) ] }, new() { IntegrationName = "OracleMdaCore", NugetPackageName = "Oracle.ManagedDataAccess.Core", TestApplicationName = "TestApplication.OracleMda.Core", Versions = [ // new("23.4.0"), transitive vulnerability https://github.com/advisories/GHSA-447r-wph3-92pm, <= 23.5.0 new("23.5.1"), new("*") ] }, new() { IntegrationName = "Quartz", NugetPackageName = "Quartz", TestApplicationName = "TestApplication.Quartz", Versions = [ // new("3.4.0"), - transitive vulnerability https://github.com/advisories/GHSA-rxg9-xrhp-64gj, <= 3.5.0 new("3.6.0"), new("*") ] }, new() { IntegrationName = "RabbitMq", NugetPackageName = "RabbitMQ.Client", TestApplicationName = "TestApplication.RabbitMq", Versions = [ new("5.1.2"), new("6.8.1"), new("7.0.0"), new("*") ] }, new() { IntegrationName = "SqliteMicrosoft", NugetPackageName = "Microsoft.Data.Sqlite", TestApplicationName = "TestApplication.Sqlite.Microsoft", Versions = [ new("8.0.0"), new("9.0.0"), new("10.0.0"), new("*") ] }, new() { IntegrationName = "StackExchangeRedis", NugetPackageName = "StackExchange.Redis", TestApplicationName = "TestApplication.StackExchangeRedis", Versions = [ new("2.6.122"), new("2.12.14"), new("*", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]) ] }, new() { IntegrationName = "WCFCoreClient", NugetPackageName = "System.ServiceModel.Http", TestApplicationName = "TestApplication.Wcf.Client.DotNet", Versions = [ new("4.10.2"), new("6.2.0"), new("8.1.2"), new("*", supportedTargetFrameworks: ["net10.0"], supportedExecutionFrameworks: ["net10.0"]) ] }, new() { IntegrationName = "Kafka", NugetPackageName = "Confluent.Kafka", TestApplicationName = "TestApplication.Kafka", Versions = [ // new("1.4.0", supportedPlatforms: ["x64"]), 1.8.0 and lower versions have transitive vulnerabilities https://github.com/confluentinc/confluent-kafka-dotnet/blob/fa0f92a4593e5a19b5a052b633ddf47fee47588c/CHANGELOG.md#security // new("1.6.2"), // First version that supports both arm64 and x64, 1.8.0 and lower versions have transitive vulnerabilities https://github.com/confluentinc/confluent-kafka-dotnet/blob/fa0f92a4593e5a19b5a052b633ddf47fee47588c/CHANGELOG.md#security new("1.8.2"), // 1.8.0-1.8.1 are known to have issues with arm64, 1.8.0 and lower versions have transitive vulnerabilities https://github.com/confluentinc/confluent-kafka-dotnet/blob/fa0f92a4593e5a19b5a052b633ddf47fee47588c/CHANGELOG.md#security new("1.9.2"), // First version supported on macOS ARM64 new("*") ] }, new() { IntegrationName = "AssemblyRedirection", NugetPackageName = "System.Diagnostics.DiagnosticSource", TestApplicationName = "TestApplication.AssemblyRedirection", Versions = [ // Use case 1: Lower version than instrumentation tool ships // net8.0: 8.0.0 (instrumentation redirects to 10.0.0) // net9.0: 9.0.0 (instrumentation redirects to 10.0.0) // net462: 6.0.0 (instrumentation redirects to 10.0.2) new("8.0.0", supportedTargetFrameworks: ["net8.0"], supportedExecutionFrameworks: ["net8.0"]), new("9.0.0", supportedTargetFrameworks: ["net9.0"], supportedExecutionFrameworks: ["net9.0"]), new("6.0.0", supportedTargetFrameworks: ["net462"], supportedExecutionFrameworks: ["net462"]), // Use case 2: Equal to instrumentation tool version // net8.0: 10.0.0 (equal to instrumentation 10.0.0) // net9.0: 10.0.0 (equal to instrumentation 10.0.0) // net462: 10.0.9 (equal to instrumentation 10.0.9) // net10.0: 10.0.9 (framework override to 10.0.0, validates build parameter was respected) new("10.0.0", supportedTargetFrameworks: ["net8.0", "net9.0"], supportedExecutionFrameworks: ["net8.0", "net9.0"]), new("10.0.9", supportedTargetFrameworks: ["net462", "net10.0"], supportedExecutionFrameworks: ["net462", "net10.0"]), ] }, new() { IntegrationName = "WCFCoreServer", NugetPackageName = "CoreWCF.Primitives", TestApplicationName = "TestApplication.Wcf.Core", Versions = [ new("1.8.1", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]), new("*", supportedTargetFrameworks: ["net10.0", "net9.0", "net8.0"], supportedExecutionFrameworks: ["net10.0", "net9.0", "net8.0"]) ] } ]; internal sealed record PackageVersionDefinition { public required string IntegrationName { get; init; } public required string NugetPackageName { get; init; } public required string TestApplicationName { get; init; } public required IReadOnlyCollection Versions { get; init; } } }