build(deps): Bump actions/setup-dotnet from 5.0.0 to 5.0.1 #169
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Vulnerability Check' | |
| on: | |
| workflow_dispatch: | |
| # Schedule to run every week on Sunday at 00:00 UTC | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| pull_request: | |
| types: [opened, reopened, edited, synchronize] | |
| branches: | |
| - main | |
| jobs: | |
| nuget-vulnerabilities-check: | |
| name: "NuGet vulnerabilities" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/[email protected] | |
| - name: "Setup .NET" | |
| uses: actions/[email protected] | |
| with: | |
| global-json-file: 'global.json' | |
| - name: "Restore dependencies" | |
| run: dotnet restore | |
| - name: "Build" | |
| run: dotnet build --configuration Release --no-restore | |
| - name: "Checking NuGet vulnerabilities" | |
| run: | | |
| dotnet list package --vulnerable --include-transitive 2>&1 | tee build.log | |
| echo "Analyze dotnet list package command log output..." | |
| grep -q -i "\bcritical\b\|\bhigh\b\|\bmoderate\b\|\blow\b" build.log && { echo "Security Vulnerabilities found on the log output"; exit 1; } || exit 0 |