Skip to content

Commit

Permalink
dotnet list package --vulnerable --include-transitive (#4884)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed May 13, 2022
1 parent 4a4502f commit 3184110
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions run-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ if ($isWindows -or $Env:WinDir)
dotnet vstest ./tests/NLog.UnitTests/bin/Release/net45/NLog.UnitTests.dll
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }

dotnet list ./src package --vulnerable --include-transitive | findstr /S /c:"has the following vulnerable packages"
if (-Not $LastExitCode -eq 1)
{
dotnet list ./src package --vulnerable --include-transitive
exit 1
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion tests/NLog.UnitTests/NLog.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">

<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> <!-- Because of NSubstitute + Castle.Core-->
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp2.1' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="4.5.0" />
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="5.0.0" />
<PackageReference Include="System.DirectoryServices.Protocols" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 3184110

Please sign in to comment.