Skip to content

Commit f512a41

Browse files
authored
Don't treat NuGet audit Warnings as Errors and fix warning (#1443)
.NET 9 Preview 6 now also scans transitive dependencies, which causes a build failure in the test projects: warning NU1902: Package 'BouncyCastle.Cryptography' 2.2.1 has a known moderate severity vulnerability, GHSA-8xfc-gm6g-vgpv Don't treat these as errors and update Testcontainers to fix the warning.
1 parent 1f356b4 commit f512a41

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
2424
</PropertyGroup>
2525

26+
<!-- don't treat NuGet Audit warnings as errors -->
27+
<PropertyGroup>
28+
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
29+
</PropertyGroup>
30+
2631
<!--
2732
Disable nullable warnings on old frameworks because of missing annotations.
2833
-->

test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1717
<PackageReference Include="MSTest.TestAdapter" Version="3.2.1" />
1818
<PackageReference Include="MSTest.TestFramework" Version="3.2.1" />
19-
<PackageReference Include="Testcontainers" Version="3.7.0" />
19+
<PackageReference Include="Testcontainers" Version="3.9.0" />
2020
<!--
2121
Testcontainers has a dependency on SSH.NET which causes build warnings during assembly resolution:
2222

0 commit comments

Comments
 (0)