Skip to content

Commit 9a8e293

Browse files
authored
Update NuGetAuditSuppress info in NU1901-4 docs (#3332)
1 parent 57cf76b commit 9a8e293

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

docs/reference/errors-and-warnings/NU1901-NU1904.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ For example, `<NuGetAuditLevel>high</NuGetAuditLevel>`.
4747

4848
If you would like to suppress a specific advisory, add an MSBuild [NuGetAuditSuppress](../../concepts/Auditing-Packages.md#excluding-advisories) item.
4949
For example `<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-g3q9-xf95-8hp5" />`.
50+
`NuGetAuditSuppress` is available from VS 17.11 and .NET 8.0.400 SDK for projects using `PackageReference`, and from VS 17.12 for projects using `packages.config`.
5051

5152
If you do not want NuGet to check for packages with known vulnerabilities during restore, add `<NuGetAudit>false</NuGetAudit>` inside a `<PropertyGroup>` in your project file, or a [`Directory.Build.props` file](/visualstudio/msbuild/customize-by-directory).
5253
If you would like to run NuGet Audit on developer machines, but disable it on CI pipelines, you can take advantage of MSBuild importing environment variables, and create a NuGetAudit environment variable set to `false` in your pipeline definition.
53-
54-
> [!NOTE]
55-
> The initial release of NuGetAudit [does not provide a way to suppress specific advisories (URLs)](https://github.com/NuGet/Home/issues/11926).
56-
> It is a feature we intend on adding based on prioritization of other improvements.
57-
>
58-
> As a mitigation, you can add an appropriate `NoWarn` to your `PackageReference` declarations.
59-
> For example, `<PackageReference Include="Contoso.Library" Version="1.0.0" NoWarn="NU1901" />`.
60-
> However, be aware that this will prevent new vulnerabilities of the same severity from being reported to you.

0 commit comments

Comments
 (0)