-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): Check transitive NuGet dependencies
- Loading branch information
1 parent
f769ee5
commit f9df0a4
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: NuGet vulnerabilities | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 1-5" | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
|
||
jobs: | ||
nuget-vulnerabilities: | ||
name: NuGet vulnerabilities | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
- uses: actions/setup-dotnet@v2.1.0 | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Check vulnerable packages | ||
id: packages | ||
run: | | ||
packages=$(dotnet list package --include-transitive --vulnerable) | ||
echo "PACKAGES<<EOF" >> $GITHUB_ENV | ||
echo "$packages" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
echo "$packages" | ||
- name: Found vulnerable packages | ||
run: exit 1 | ||
if: ${{ contains(env.PACKAGES, 'has the following vulnerable packages') }} |
This file contains 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