Skip to content

Add a nightly NuGet audit run so new advisories surface on their own schedule - #21

Merged
lgamorim merged 1 commit into
masterfrom
feature/ci-nightly-audit
Aug 13, 2026
Merged

Add a nightly NuGet audit run so new advisories surface on their own schedule#21
lgamorim merged 1 commit into
masterfrom
feature/ci-nightly-audit

Conversation

@lgamorim

Copy link
Copy Markdown
Owner

Why

NuGet audit validates against the live advisory database at restore time, so a green CI check can silently go stale with zero code change. This is exactly how master went red on 2026-08-13: GHSA-q939-rpr3-3284 was published hours after #17's CI had passed, and the stale-green merge carried the failure onto master, attributed to an unrelated OS-matrix change.

A scheduled restore on master catches new advisories within a day and attributes the failure to the advisory itself instead of to whoever happens to merge next. Together with the ruleset's new strict required-status-checks policy (which blocks stale-green merges at the button), this closes both halves of the window.

What

One workflow, one job, three steps — checkout, setup .NET, dotnet restore:

  • Restore is the whole check. TreatWarningsAsErrors in Directory.Build.props already escalates NU19xx audit warnings to restore failures, so no build or tests are needed — the CI matrix covers those on every push.
  • schedule (03:00 UTC) + workflow_dispatch only — never reports on PRs, so it stays outside the required-checks list, same as Docs.
  • Linux only — the advisory database is identical everywhere; the 08-13 failure was byte-for-byte the same on all three OS legs.
  • Activates on merge — GitHub runs cron workflows only from the default branch.

A red run notifies the repo owner by email via GitHub's default workflow-failure notification.

🤖 Generated with Claude Code

…schedule

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>
@lgamorim
lgamorim merged commit 982b08a into master Aug 13, 2026
8 checks passed
@lgamorim
lgamorim deleted the feature/ci-nightly-audit branch August 13, 2026 15:49
@lgamorim lgamorim added this to the Phase 6 — Ship (1.0.x) milestone Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant