Browse Source

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, https://github.com/advisories/GHSA-8xfc-gm6g-vgpv

Don't treat these as errors and update Testcontainers to fix the warning.
mus65 1 năm trước cách đây
mục cha
commit
f512a41a1b

+ 5 - 0
Directory.Build.props

@@ -23,6 +23,11 @@
     <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
   </PropertyGroup>
 
+  <!-- don't treat NuGet Audit warnings as errors -->
+  <PropertyGroup>
+    <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
+  </PropertyGroup>
+
   <!--
         Disable nullable warnings on old frameworks because of missing annotations.
   -->

+ 1 - 1
test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj

@@ -16,7 +16,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
     <PackageReference Include="MSTest.TestAdapter" Version="3.2.1" />
     <PackageReference Include="MSTest.TestFramework" Version="3.2.1" />
-    <PackageReference Include="Testcontainers" Version="3.7.0" />
+    <PackageReference Include="Testcontainers" Version="3.9.0" />
     <!--
         Testcontainers has a dependency on SSH.NET which causes build warnings during assembly resolution: