Skip to content

Commit 31e28ad

Browse files
authored
Downgrade STJ to 8.0.4 (#109818)
* Downgrade STJ to 8.0.4 We can't yet rely on a STJ/8.0.5 package as desktop msbuild doesn't have binding redirects for it yet. - Suppress the src/tasks vulnerability warning as STJ isn't used at runtime for msbuild tasks. - Suppress the ones about HostModel's usage. We want to use a live STJ instead but that needs a separate PR (more work). * Update STJ and add temporary suppressions
1 parent 099bf1e commit 31e28ad

File tree

11 files changed

+52
-5
lines changed

11 files changed

+52
-5
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<runtimenativeSystemIOPortsVersion>10.0.0-alpha.1.24527.3</runtimenativeSystemIOPortsVersion>
137137
<!-- Keep toolset versions in sync with dotnet/msbuild and dotnet/sdk -->
138138
<SystemCollectionsImmutableToolsetVersion>8.0.0</SystemCollectionsImmutableToolsetVersion>
139-
<SystemTextJsonToolsetVersion>8.0.5</SystemTextJsonToolsetVersion>
139+
<SystemTextJsonToolsetVersion>8.0.4</SystemTextJsonToolsetVersion>
140140
<SystemReflectionMetadataToolsetVersion>8.0.0</SystemReflectionMetadataToolsetVersion>
141141
<SystemReflectionMetadataLoadContextToolsetVersion>8.0.0</SystemReflectionMetadataLoadContextToolsetVersion>
142142
<!-- Runtime-Assets dependencies -->

src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
2727
</ItemGroup>
2828

29+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
30+
<ItemGroup>
31+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
32+
</ItemGroup>
33+
2934
<ItemGroup>
3035
<Compile Include="$(CoreClrProjectRoot)tools\Common\Compiler\Win32Resources\ResourceData.cs" Link="Win32Resources\ResourceData.cs" />
3136
<Compile Include="$(CoreClrProjectRoot)tools\Common\Compiler\Win32Resources\ResourceData.Reader.cs" Link="Win32Resources\ResourceData.Reader.cs" />

src/installer/tests/AppHost.Bundle.Tests/AppHost.Bundle.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@
1414
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
1515
</ItemGroup>
1616

17+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
18+
<ItemGroup>
19+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
20+
</ItemGroup>
21+
1722
</Project>

src/installer/tests/HostActivation.Tests/HostActivation.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
1414
</ItemGroup>
1515

16+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
17+
<ItemGroup>
18+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
19+
</ItemGroup>
20+
1621
</Project>

src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
<PackageReference Include="System.Formats.Asn1" Version="$(SystemFormatsAsn1Version)" ExcludeAssets="All" />
1313
</ItemGroup>
1414

15-
<Import Project="$(RepositoryEngineeringDir)PackageDownloadAndReference.targets" />
16-
1715
<ItemGroup>
1816
<ProjectReference Include="..\TestUtils\TestUtils.csproj" />
1917
<OrderProjectReference Include="@(PkgprojProjectToBuild)" />
@@ -34,4 +32,11 @@
3432
BuildInParallel="$(BuildInParallel)" />
3533
</Target>
3634

35+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
36+
<ItemGroup>
37+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
38+
</ItemGroup>
39+
40+
<Import Project="$(RepositoryEngineeringDir)PackageDownloadAndReference.targets" />
41+
3742
</Project>

src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
1414
</ItemGroup>
1515

16+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
17+
<ItemGroup>
18+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
19+
</ItemGroup>
20+
1621
<ItemGroup>
1722
<PackageReference Include="Microsoft.NET.HostModel.TestData" Version="$(MicrosoftNETHostModelTestDataVersion)" />
1823
</ItemGroup>

src/installer/tests/TestUtils/TestUtils.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
1212
</ItemGroup>
1313

14+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
15+
<ItemGroup>
16+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
17+
</ItemGroup>
18+
1419
<ItemGroup>
1520
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
1621
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />

src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="LightInject.Microsoft.DependencyInjection" Version="3.7.1" />
2424
<PackageReference Include="Grace.DependencyInjection.Extensions" Version="7.1.0" />
2525
<PackageReference Include="Stashbox.Extensions.Dependencyinjection" Version="4.2.3" />
26-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" />
26+
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
2727
</ItemGroup>
2828

2929
<!-- These packages don't support .NETFramework -->

src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
<None Include="data\**\*" Link="data\%(RecursiveDir)%(FileName)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
5858
</ItemGroup>
5959

60+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
61+
<ItemGroup>
62+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
63+
</ItemGroup>
64+
6065
<Target Name="UpdateRunScriptCommands" BeforeTargets="GenerateRunScript" DependsOnTargets="_SetPackageVersionForWorkloadsTesting">
6166
<Error Condition="'$(TestUsingWorkloads)' == 'true' and '$(PackageVersionForWorkloadManifests)' == ''" Text="%24(PackageVersionForWorkloadManifests) is not set. PackageVersion=$(PackageVersion)." />
6267

src/mono/wasm/symbolicator/WasmSymbolicator.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" PrivateAssets="All" ExcludeAssets="All" />
1414
</ItemGroup>
1515

16+
<!-- Suppress System.Text.Json/8.0.4 advisory as desktop msbuild doesn't yet provide binding redirects for the non-vulnerable version (8.0.5). -->
17+
<ItemGroup>
18+
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4" />
19+
</ItemGroup>
20+
1621
<ItemGroup>
1722
<None Include="..\data\wasm-symbol-patterns.txt" CopyToOutputDirectory="PreserveNewest" />
1823
</ItemGroup>

0 commit comments

Comments
 (0)