Skip to content

Commit

Permalink
fix invalid windows command
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineatstariongroup committed Dec 3, 2024
1 parent 820345f commit 312b4a4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/nuget-reference-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,17 @@ jobs:

- name: Checking NuGet vulnerabilites
run: |
set -e
dotnet list EA-ModelKit.sln package --outdated --include-transitive
dotnet list EA-ModelKit.sln package --deprecated --include-transitive
dotnet list EA-ModelKit.sln package --vulnerable --include-transitive 2>&1 | tee vulnerabilities.log
echo "Analyze dotnet list package command log output..."
if grep -q -i "\bcritical\b\|\bhigh\b\|\bmoderate\b\|\blow\b" vulnerabilities.log; then
echo "Security Vulnerabilities found"
Write-Host "Analyze dotnet list package command log output..."
$logContent = Get-Content vulnerabilities.log
if ($logContent -match '\bcritical\b|\bhigh\b|\bmoderate\b|\blow\b') {
Write-Host "Security Vulnerabilities found"
exit 1
else
echo "No Security Vulnerabilities found"
} else {
Write-Host "No Security Vulnerabilities found"
exit 0
fi
}
shell: pwsh

0 comments on commit 312b4a4

Please sign in to comment.