Skip to content

Commit 982b08a

Browse files
lgamorimclaude
andauthored
Add a nightly NuGet audit run so new advisories surface on their own schedule (#21)
NuGet audit validates against the live advisory database at restore time, so a green check can silently go stale: GHSA-q939-rpr3-3284 was published hours after PR #17's CI passed and turned master red the moment the stale-green PR merged. A scheduled restore on master catches new advisories within a day and attributes the failure to the advisory instead of to the next unrelated merge. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 35b7238 commit 982b08a

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Nightly Audit
2+
3+
# NuGet audit checks the live advisory database at restore time, so a newly
4+
# published vulnerability can turn a previously green master red with zero code
5+
# change (this is how GHSA-q939-rpr3-3284 broke the merge of the OS-matrix PR).
6+
# This nightly restore surfaces new advisories on their own schedule, attributed
7+
# to the advisory itself rather than to whoever happens to merge next.
8+
on:
9+
schedule:
10+
# 03:00 UTC, before the working day starts in any contributor timezone.
11+
- cron: '0 3 * * *'
12+
workflow_dispatch:
13+
14+
jobs:
15+
audit:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v7
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v6
24+
with:
25+
global-json-file: global.json
26+
27+
- name: Restore (NuGet audit)
28+
# TreatWarningsAsErrors in Directory.Build.props escalates NU19xx audit
29+
# warnings to restore failures, so a plain restore is the whole check.
30+
run: dotnet restore

0 commit comments

Comments
 (0)