Skip to content

Commit 4435b88

Browse files
committed
feat: configure nuget audit
1 parent 1317b59 commit 4435b88

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Directory.Packages.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
5+
<!-- https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages -->
6+
<NuGetAudit>true</NuGetAudit>
7+
<NuGetAuditMode>all</NuGetAuditMode>
8+
<!-- https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904 -->
9+
<WarningsAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsAsErrors>
510
</PropertyGroup>
611
<ItemGroup>
712
<PackageVersion Condition="'$(TargetFramework)'=='net8.0'" Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.11" />

src/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
3-
<PropertyGroup>
3+
<PropertyGroup>
4+
<NuGetAuditMode>direct</NuGetAuditMode>
45
<GenerateDocumentationFile>true</GenerateDocumentationFile>
56
<NoWarn>$(NoWarn);1591</NoWarn>
67
<PackageReadmeFile>README.md</PackageReadmeFile>

0 commit comments

Comments
 (0)