diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index b5f63e7..f492bc5 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -36,7 +36,15 @@ jobs: run: dotnet tool install -g nbgv - name: Set Version run: nbgv cloud - + - name: Checking Vulnerable Nuget Packages + run: | + $outout = dotnet list package --vulnerable --include-transitive 2>&1 | tee build.log + echo "Analyze dotnet vulnerable nuget package command log output..." + echo $output + if ($output -match "critical|high|moderate|low") { + Write-Host "Security Vulnerabilities found in Nuget Packages on the log output" + exit 1 + } - name: Build run: dotnet build --configuration Release --no-restore