Skip to content

Commit

Permalink
Switched to elmahio/github-check-vulnerable-nuget-packages-action@v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed May 14, 2024
1 parent e5c5749 commit a5d6984
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ jobs:
- name: Install dependencies
run: dotnet restore

- name: Check for vulnerable packages
run: |
set -e # This will cause the script to exit on the first error
OUTPUT=$(dotnet list package --vulnerable)
echo "$OUTPUT"
if echo "$OUTPUT" | grep -q 'no vulnerable packages'; then
echo "No vulnerable packages found"
else
if echo "$OUTPUT" | grep -q 'vulnerable'; then
echo "Vulnerable packages found"
exit 1
fi
fi
- name: Check vulnerable NuGet packages
uses: elmahio/github-check-vulnerable-nuget-packages-action@v1

- name: Build
run: dotnet build --configuration Release --no-restore

Expand Down

0 comments on commit a5d6984

Please sign in to comment.