List vulnerable packages #5858
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
name: List vulnerable packages | |
on: | |
workflow_dispatch: | |
schedule: | |
# once a day | |
- cron: '0 0 * * *' | |
jobs: | |
List-vulnerable-packages: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Using macos-12 because we need Xcode 13.3 or later to build Sentry.Samples.Maui. (macos-latest currently points at macos-11 which uses Xcode 13.2) | |
# Using windows-2019 because windows-latest is much slower and we don't need anything in particular from it. | |
os: [ubuntu-latest, windows-2019, macos-12] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Environment | |
uses: ./.github/actions/environment | |
# We only need to restore to check for vulnerable packages | |
- name: Restore .NET Dependencies | |
run: dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo | |
# The dotnet list package command doesn't change its exit code on detection, so tee to a file and scan it | |
# See https://github.com/NuGet/Home/issues/11315#issuecomment-1243055173 | |
- name: List vulnerable packages | |
shell: bash | |
run: | | |
dotnet list package --vulnerable --include-transitive | tee vulnerable.txt | |
sh -c "! grep 'has the following vulnerable packages' vulnerable.txt" |