Skip to content

Commit b7c89bf

Browse files
authored
Enable NugetAudit (open-telemetry#4342)
* Enable NugetAudit * Bump .NET Auto to 1.12.0 * Fix NugetAudit issues * NuGetAudit for Nuke project
1 parent e623eb1 commit b7c89bf

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

Common.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
6+
7+
<NuGetAudit>true</NuGetAudit>
8+
<NuGetAuditMode>all</NuGetAuditMode>
9+
<NuGetAuditLevel>low</NuGetAuditLevel>
610
</PropertyGroup>
711

812
<!-- StyleCop -->

build/Directory.Packages.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<ItemGroup>
55
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />
66
<PackageVersion Include="Nuke.Common" Version="9.0.4" />
7+
<!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-h4j7-5rxr-p4wc -->
8+
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.14.8" />
79
<PackageVersion Include="Nuget.CommandLine" Version="6.14.0" />
810
</ItemGroup>
911
</Project>

build/_build.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@
1111
<ImplicitUsings>enable</ImplicitUsings>
1212
<LangVersion>13.0</LangVersion>
1313
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
14+
<NuGetAudit>true</NuGetAudit>
15+
<NuGetAuditMode>all</NuGetAuditMode>
16+
<NuGetAuditLevel>low</NuGetAuditLevel>
1417
</PropertyGroup>
1518

1619
<ItemGroup>
1720
<PackageReference Include="Mono.Cecil" />
1821
<PackageReference Include="Nuke.Common" />
22+
<!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-h4j7-5rxr-p4wc -->
23+
<PackageReference Include="Microsoft.Build.Tasks.Core" />
1924
<PackageReference Include="Nuget.CommandLine" ExcludeAssets="all" />
2025
</ItemGroup>
2126
<ItemGroup>

test/test-applications/nuget-packages/TestApplication.NugetSample/TestApplication.NugetSample.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44
<OutputType>Exe</OutputType>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<!-- Tag v1.11.0 is not available on the main branch. It leads to create CI/local builds with 1.10.0-aplha.something version
9-
These versions are wronlgy detected as vulnerable by NuGet Audit. It can be removed when we release next version from main. -->
10-
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-vc29-vg52-6643" />
11-
</ItemGroup>
12-
137
<ItemGroup>
148
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="$(NuGetPackageVersion)" Condition=" '$(NuGetPackageVersion)' != '' " />
15-
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.11.0" Condition=" '$(NuGetPackageVersion)' == '' " />
9+
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.12.0" Condition=" '$(NuGetPackageVersion)' == '' " />
1610
</ItemGroup>
1711
</Project>

tools/DependencyListGenerator/DependencyListGenerator.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<ItemGroup>
1212
<PackageReference Include="McMaster.Extensions.CommandLineUtils" />
1313
<PackageReference Include="NuGet.ProjectModel" />
14+
<!-- System.Security.Cryptography.Pkcs is an indirect reference from NuGet.ProjectModel. Fixes https://github.com/advisories/GHSA-447r-wph3-92pm -->
15+
<PackageReference Include="System.Security.Cryptography.Pkcs" />
1416
<PackageReference Include="System.IO.Abstractions" />
1517
</ItemGroup>
1618

tools/Directory.Packages.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
55
<PackageVersion Include="Microsoft.Build" Version="17.14.8" />
66
<PackageVersion Include="NuGet.ProjectModel" Version="6.14.0" />
7+
<!-- System.Security.Cryptography.Pkcs is an indirect reference from NuGet.ProjectModel. Fixes https://github.com/advisories/GHSA-447r-wph3-92pm -->
8+
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="6.0.5"/>
79
<PackageVersion Include="System.IO.Abstractions" Version="22.0.14" />
810
<PackageVersion Include="Valleysoft.DockerfileModel" Version="1.2.0" />
911
<PackageVersion Include="YamlDotNet" Version="16.3.0" />

0 commit comments

Comments
 (0)