Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/vulnerabilities.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: List vulnerable packages

# Deliberately NOT triggered on `pull_request`.
#
# `dotnet package list --vulnerable` consults live advisory data, so a GHSA published
# overnight against one of our transitive dependencies would turn every open PR red -
# halting unrelated work until the dependency is updated, which is routine maintenance
# rather than a defect in the PR. Running on a schedule keeps the signal without making
# it a gate on everybody's work.
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # once a day
pull_request:

jobs:
list-vulnerable-packages:
Expand All @@ -31,5 +37,8 @@ jobs:
shell: bash
run: |
dotnet package list --project Sentry.slnx --vulnerable --include-transitive --no-restore | tee vulnerable.txt
# https://github.com/getsentry/sentry-dotnet/issues/2814
# ! grep 'has the following vulnerable packages' vulnerable.txt

if grep -q 'has the following vulnerable packages' vulnerable.txt; then
echo "::error::Vulnerable packages detected - see the job output above for the affected projects and advisories."
exit 1
fi
Loading