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 832e14a commit 2a14a6a
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,10 @@ jobs:
8.0.x
- 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 src/Elmah.Io.Functions/Elmah.Io.Functions.csproj 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
with:
project: 'src/Elmah.Io.Functions/Elmah.Io.Functions.csproj'
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
Expand Down

0 comments on commit 2a14a6a

Please sign in to comment.