|
62 | 62 | <NuGetRoot Condition="'$(NuGetRoot)' == ''">$(RepoRoot).nuget\</NuGetRoot> |
63 | 63 | <NuGetCmd>$(NuGetRoot)nuget.exe</NuGetCmd> |
64 | 64 | <!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location --> |
65 | | - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
66 | | - <WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904;NU1905</WarningsNotAsErrors> |
67 | 65 | <BuildSimulator Condition="'$(BuildSimulator)' != 'true'">false</BuildSimulator> |
68 | 66 | </PropertyGroup> |
69 | 67 | <PropertyGroup Condition="'$(BuildSimulator)' == 'true'"> |
70 | 68 | <DefineConstants>$(DefineConstants);ENCLAVE_SIMULATOR</DefineConstants> |
71 | 69 | </PropertyGroup> |
72 | 70 |
|
73 | 71 | <!-- NuGet Audit Settings --> |
74 | | - <PropertyGroup Condition="'$(TF_BUILD)' == 'true'"> |
| 72 | + <PropertyGroup> |
| 73 | + <!-- |
| 74 | + See the NuGet Audit documentation here: |
| 75 | +
|
| 76 | + https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages |
| 77 | + --> |
| 78 | + |
75 | 79 | <!-- |
76 | | - ADO does not support audit/vulnerability feeds, so the audit feed is specified (in |
77 | | - nuget.config) as nuget.org. OneBranch default network isolation does not allow connections |
78 | | - to nuget.org. To avoid this issue, we will disable auditing for official builds, but leave it |
79 | | - enabled for local builds. |
80 | | - @TODO: If/when auditing is enabled for central feeds services, this can be removed. |
| 80 | + We always want NuGet auditing enabled. There are no build scenarios |
| 81 | + where auditing should be disabled. |
81 | 82 | --> |
82 | | - <NuGetAudit>false</NuGetAudit> |
| 83 | + <NuGetAudit>true</NuGetAudit> |
| 84 | + |
| 85 | + <!-- We want all dependencies audited. --> |
| 86 | + <NuGetAuditMode>all</NuGetAuditMode> |
| 87 | + |
| 88 | + <!-- We want all possible audit severity messages. --> |
| 89 | + <NuGetAuditLevel>low</NuGetAuditLevel> |
83 | 90 | </PropertyGroup> |
| 91 | + |
| 92 | + <!-- Build Warning/Error Settings --> |
84 | 93 | <PropertyGroup> |
85 | | - <NuGetAuditMode>all</NuGetAuditMode> |
| 94 | + <!-- We treat all warnings as errors. --> |
| 95 | + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 96 | + |
| 97 | + <!-- |
| 98 | + There may be a few specific warnings that should _not_ be considered an |
| 99 | + error. This list should be used sparingly to avoid important warnings |
| 100 | + being ignored. |
| 101 | + --> |
| 102 | + <WarningsNotAsErrors></WarningsNotAsErrors> |
| 103 | + |
| 104 | + <!-- |
| 105 | + If a build is failing due to vulnerable dependencies, you may temporarily |
| 106 | + uncomment the following line to treat the audit warnings as non-errors. |
| 107 | + This should only be done as a temporary measure while addressing the |
| 108 | + vulnerable dependencies. See: |
| 109 | +
|
| 110 | + https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904 |
| 111 | + --> |
| 112 | + <!-- <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> --> |
86 | 113 | </PropertyGroup> |
87 | 114 |
|
88 | 115 | <!-- Packaging for source link--> |
|
0 commit comments