Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
<clear />
<add key="sqlclient" value="https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/sqlclient/nuget/v3/index.json" />
</packageSources>
<auditSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
</configuration>
47 changes: 37 additions & 10 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,54 @@
<NuGetRoot Condition="'$(NuGetRoot)' == ''">$(RepoRoot).nuget\</NuGetRoot>
<NuGetCmd>$(NuGetRoot)nuget.exe</NuGetCmd>
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904;NU1905</WarningsNotAsErrors>
<BuildSimulator Condition="'$(BuildSimulator)' != 'true'">false</BuildSimulator>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildSimulator)' == 'true'">
<DefineConstants>$(DefineConstants);ENCLAVE_SIMULATOR</DefineConstants>
</PropertyGroup>

<!-- NuGet Audit Settings -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<PropertyGroup>
<!--
See the NuGet Audit documentation here:

Comment thread
paulmedynski marked this conversation as resolved.
https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages
-->

<!--
ADO does not support audit/vulnerability feeds, so the audit feed is specified (in
nuget.config) as nuget.org. OneBranch default network isolation does not allow connections
to nuget.org. To avoid this issue, we will disable auditing for official builds, but leave it
enabled for local builds.
@TODO: If/when auditing is enabled for central feeds services, this can be removed.
We always want NuGet auditing enabled. There are no build scenarios
where auditing should be disabled.
-->
<NuGetAudit>false</NuGetAudit>
<NuGetAudit>true</NuGetAudit>

<!-- We want all dependencies audited. -->
<NuGetAuditMode>all</NuGetAuditMode>

<!-- We want all possible audit severity messages. -->
<NuGetAuditLevel>low</NuGetAuditLevel>
</PropertyGroup>

<!-- Build Warning/Error Settings -->
<PropertyGroup>
<NuGetAuditMode>all</NuGetAuditMode>
<!-- We treat all warnings as errors. -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Comment thread
paulmedynski marked this conversation as resolved.

<!--
There may be a few specific warnings that should _not_ be considered an
error. This list should be used sparingly to avoid important warnings
being ignored.
-->
<WarningsNotAsErrors></WarningsNotAsErrors>

<!--
If a build is failing due to vulnerable dependencies, you may temporarily
uncomment the following line to treat the audit warnings as non-errors.
This should only be done as a temporary measure while addressing the
vulnerable dependencies. See:

https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904
-->
<!-- <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> -->
</PropertyGroup>

<!-- Packaging for source link-->
Expand Down
5 changes: 0 additions & 5 deletions src/Microsoft.Data.SqlClient/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
<ReferenceType Condition="'$(ReferenceType)'==''">Project</ReferenceType>
</PropertyGroup>

<!-- Audit Settings -->
<PropertyGroup>
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>

<!--These properties can be modified locally to target .NET version of choice to build and test entire test suite-->
<PropertyGroup>
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net462</TargetNetFxVersion>
Expand Down
5 changes: 0 additions & 5 deletions tools/GenAPI/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@

<!-- Import parent Directory.build.props -->
<Import Project="..\..\src\Directory.Build.props" />

<!-- Audit Settings -->
<PropertyGroup>
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>
</Project>
Loading