Add NugetAudit msbuild settings (#2821)

This commit is contained in:
Jacob Viau 2024-11-06 11:20:33 -08:00 коммит произвёл GitHub
Родитель 4c8db67dbc
Коммит 87e8056c84
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -11,8 +11,20 @@
<TargetsRoot>$(EngRoot)build/</TargetsRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PropertyGroup>
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true'">true</ContinuousIntegrationBuild>
<CI>$(ContinuousIntegrationBuild)</CI>
</PropertyGroup>
<PropertyGroup>
<!-- Nuget audit as warnings only, even in TreatWarningsAsErrors. -->
<!-- Except for in CI, critical will fail the build. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903</WarningsNotAsErrors>
<WarningsNotAsErrors Condition="'$(CI)' == 'false'">$(WarningsNotAsErrors)NU1904</WarningsNotAsErrors>
<WarningsAsErrors Condition="'$(CI)' == 'true'">$(WarningsAsErrors)NU1904</WarningsAsErrors>
<NuGetAuditLevel>moderate</NuGetAuditLevel> <!-- warn on moderate severity only. -->
<NuGetAuditMode>all</NuGetAuditMode> <!-- audit transitive dependencies. -->
</PropertyGroup>
</Project>