Skip to content

Commit 5127c95

Browse files
authored
[elastic. azure, gcp] Mitigate STJ vulnerabilities (open-telemetry#2198)
1 parent 2f0ee5a commit 5127c95

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

build/Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-->
1111
<PackageReference Include="System.Text.Encodings.Web"
1212
Version="$(SystemTextEncodingsWebMinimumOutOfBandPkgVer)"
13-
Condition="'$(SystemTextJsonMinimumRequiredPkgVer)' == '4.7.2' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
13+
Condition="($(SystemTextJsonMinimumRequiredPkgVer.StartsWith('[4.7.2')) OR '$(SystemTextJsonMinimumRequiredPkgVer)' == '4.7.2') AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
1414
<PackageReference Include="System.Text.Json"
1515
Version="$(SystemTextJsonMinimumRequiredPkgVer)"
1616
Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />

src/OpenTelemetry.Instrumentation.ElasticsearchClient/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
* Updated OpenTelemetry core component version(s) to `1.9.0`.
1616
([#1888](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1888))
1717

18+
* Lowered the `System.Text.Json` reference to `4.7.2` for `net462` and
19+
`netstandard2.0` targets in response to
20+
[CVE-2024-43485](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485).
21+
([#2198](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2198))
22+
1823
## 1.0.0-beta.5
1924

2025
Released 2023-Oct-24

src/OpenTelemetry.Instrumentation.ElasticsearchClient/OpenTelemetry.Instrumentation.ElasticsearchClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
<Description>Elasticsearch instrumentation for OpenTelemetry .NET.</Description>
88
<PackageTags>$(PackageTags);distributed-tracing</PackageTags>
99
<MinVerTagPrefix>Instrumentation.ElasticsearchClient-</MinVerTagPrefix>
10+
<SystemTextJsonMinimumRequiredPkgVer>$(SystemTextJsonMinimumOutOfBandPkgVer)</SystemTextJsonMinimumRequiredPkgVer>
1011
</PropertyGroup>
1112

12-
<!-- Do not run Package Baseline Validation as this package has never released a stable version.
13+
<!-- Do not run Package Baseline Validation as this package has never released a stable version.
1314
Remove this property once we have released a stable version and add PackageValidationBaselineVersion property. -->
1415
<PropertyGroup>
1516
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
1617
</PropertyGroup>
1718

1819
<ItemGroup>
1920
<PackageReference Include="OpenTelemetry" Version="$(OpenTelemetryCoreLatestVersion)" />
20-
<PackageReference Include="System.Text.Json" Version="6.0.4" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

src/OpenTelemetry.Resources.Azure/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* Drop support for .NET 6 as this target is no longer supported and add .NET 8 target.
66
([#2165](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2165))
77

8+
* Added direct reference to `System.Text.Json` for the `net8.0` target with
9+
minimum version of `8.0.5` in response to
10+
[CVE-2024-43485](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485).
11+
([#2198](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2198))
12+
813
## 1.0.0-beta.9
914

1015
Released 2024-Sep-24

src/OpenTelemetry.Resources.Azure/OpenTelemetry.Resources.Azure.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Description>OpenTelemetry Resource Detectors for Azure cloud environments.</Description>
66
<PackageTags>$(PackageTags);ResourceDetector</PackageTags>
77
<MinVerTagPrefix>Resources.Azure-</MinVerTagPrefix>
8+
<SystemTextJsonMinimumRequiredPkgVer>$(SystemTextJsonMinimumOutOfBandPkgVer)</SystemTextJsonMinimumRequiredPkgVer>
89
</PropertyGroup>
910

1011
<!-- Do not run Package Baseline Validation as this package has never released a stable version.
@@ -15,9 +16,6 @@
1516

1617
<ItemGroup>
1718
<PackageReference Include="OpenTelemetry" Version="$(OpenTelemetryCoreLatestVersion)" />
18-
<PackageReference Include="System.Text.Json" Version="4.7.2" />
19-
<!-- System.Text.Encodings.Web is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-ghhp-997w-qr28 -->
20-
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
2119
</ItemGroup>
2220

2321
<ItemGroup>

src/OpenTelemetry.Resources.Gcp/CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
is accessible via `AddGcpDetector` extension method on `ResourceBuilder`.
77
([#1691](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1691))
88

9-
For more details, please refer to the [README](README.md).
10-
119
* Updated OpenTelemetry core component version(s) to `1.9.0`.
1210
([#1888](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1888))
11+
12+
* Drop support for .NET 6 as this target is no longer supported and add .NET 8 target.
13+
([#2167](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2167))
14+
15+
* Added direct reference to `System.Text.Json` for the `net8.0` target with
16+
minimum version of `8.0.5` in response to
17+
[CVE-2024-43485](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485).
18+
([#2198](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2198))

src/OpenTelemetry.Resources.Gcp/OpenTelemetry.Resources.Gcp.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Description>OpenTelemetry Resource Detectors for Google Cloud Platform environments.</Description>
66
<PackageTags>$(PackageTags);ResourceDetector</PackageTags>
77
<MinVerTagPrefix>Resources.Gcp-</MinVerTagPrefix>
8+
<SystemTextJsonMinimumRequiredPkgVer>$(SystemTextJsonMinimumOutOfBandPkgVer)</SystemTextJsonMinimumRequiredPkgVer>
89
</PropertyGroup>
910

1011
<!-- Do not run Package Baseline Validation as this package has never released a stable version.
@@ -16,9 +17,6 @@
1617
<ItemGroup>
1718
<PackageReference Include="Google.Api.Gax" Version="4.8.0" />
1819
<PackageReference Include="OpenTelemetry" Version="$(OpenTelemetryCoreLatestVersion)" />
19-
<PackageReference Include="System.Text.Json" Version="4.7.2" />
20-
<!-- System.Text.Encodings.Web is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-ghhp-997w-qr28 -->
21-
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
2220
</ItemGroup>
2321

2422
<ItemGroup>

0 commit comments

Comments
 (0)