Fix - Nuke NU1903: Package 'System.Security.Cryptography.Xml' 10.0.1 has a known high severity vulnerability
[C#, .NET, NukeBuild]
You may get the following build warning when using NukeBuild:
warning NU1903: Package 'System.Security.Cryptography.Xml' 10.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-37gx-xxp4-5rgx
The error is because the package, or one of its dependencies, has a high severity vulnerability.
The details of the packages involved are as outlined here, as well as the details of the fix.
This package, System.Security.Cryptography.Xml, is a transient dependency, and the problem is that the dependency happens to be a vulnerable one.
The fix for this is to directly installed a patched version.
dotnet add package System.Security.Cryptography.Xml
This is 10.0.6 as of the time of writing this.
The project should now build without any warnings.
Happy hacking!