Skip to content

Commit f6bdf75

Browse files
authored
Update dependencies and enable nuget audit (direct mode) (#1358)
* Update dependencies to avoid referencing vulnerable dependencies * Enable NuGet Audit (direct dependencies only)
1 parent 3e13825 commit f6bdf75

5 files changed

+15
-8
lines changed

NuGet.config

+4
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313
<disabledPackageSources>
1414
<clear />
1515
</disabledPackageSources>
16+
<auditSources>
17+
<clear />
18+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
19+
</auditSources>
1620
</configuration>

eng/BuildTask.targets

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@
8787

8888
<!-- Desktop MSBuild compatibilty -->
8989
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
90-
<PackageReference Update="System.Text.Json" Version="7.0.1" />
91-
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
92-
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
93-
<PackageReference Update="System.Collections.Immutable" Version="7.0.0" />
94-
<PackageReference Update="System.Reflection.Metadata" Version="7.0.0" />
90+
<PackageReference Update="System.Text.Json" Version="8.0.5" />
91+
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
92+
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
93+
<PackageReference Update="System.Collections.Immutable" Version="8.0.0" />
94+
<PackageReference Update="System.Reflection.Metadata" Version="8.0.1" />
9595
</ItemGroup>
9696

9797
<!-- Publish .NET assets and include them in the package under tools/net directory. -->

eng/Versions.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<MicrosoftBuildTasksCoreVersion>17.8.3</MicrosoftBuildTasksCoreVersion>
1717
<MicrosoftIORedistVersion>6.0.1</MicrosoftIORedistVersion>
1818
<!-- nuget -->
19-
<NuGetVersioningVersion>5.7.0</NuGetVersioningVersion>
19+
<NuGetVersioningVersion>6.12.1</NuGetVersioningVersion>
2020
<!-- runtime -->
21-
<SystemTextJsonVersion>7.0.3</SystemTextJsonVersion>
21+
<SystemTextJsonVersion>8.0.5</SystemTextJsonVersion>
2222
</PropertyGroup>
2323
</Project>

src/Directory.Build.props

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<GenerateResxSource>true</GenerateResxSource>
1010

1111
<IncludeSymbols Condition="'$(DebugType)' != 'embedded' and '$(UsingMicrosoftNoTargetsSdk)' != 'true'">true</IncludeSymbols>
12+
13+
<!-- Only upgrade NuGetAudit warnings to errors for official builds. -->
14+
<WarningsNotAsErrors Condition="'$(OfficialBuild)' != 'true'">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
1215
</PropertyGroup>
1316

1417
</Project>

src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<NoWarn>$(NoWarn);NU5128</NoWarn>
1414
</PropertyGroup>
1515
<ItemGroup>
16-
<PackageReference Include="System.Text.Json" />
16+
<PackageReference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
1717
</ItemGroup>
1818
</Project>

0 commit comments

Comments
 (0)