Skip to content

List vulnerable packages #5993

List vulnerable packages

List vulnerable packages #5993

name: List vulnerable packages
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # once a day
pull_request:
jobs:
list-vulnerable-packages:
name: List vulnerable packages
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
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.sln --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 Sentry.sln package --vulnerable --include-transitive | tee vulnerable.txt
# https://github.com/getsentry/sentry-dotnet/issues/2814
# ! grep 'has the following vulnerable packages' vulnerable.txt