ci: move dependency audit off the critical path, enable OSV alerts #161
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!161
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/dependency-audit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two related changes to what CI spends time on.
1. Move the dependency audit off the critical path
pnpm auditresolves the whole workspace graph and cross-references theadvisory database locally. On this monorepo that pegs a core for ~15 minutes.
Measured on task 3592: 894s of the job's 979s — 91% of
Checks— whilecheckout, install, typecheck, lint, unit tests, build and openspec together
took ~85s.
Because
e2ehasneeds: checks, that delay hit the E2E suite too. And thestep was
continue-on-error: true, so none of it gated anything.Measured directly today: with the audit killed mid-run,
Checksfinished in317s instead of 1667s.
Advisories change when the advisory database changes, not when someone edits a
file, so it now runs daily at 06:30 UTC (offset from
disk-maintenance's 04:30and
staging-cleanup's Monday 04:00), plusworkflow_dispatch.Deliberate change: the scheduled run is allowed to FAIL, matching the
reasoning already in
disk-maintenance.yml— a scheduled-run failure is thenotification. A permanently-green nightly writing advisories into a summary
nobody opens would be worse than what it replaced.
2. Enable OSV vulnerability alerts in Renovate
renovate.json5already said this was the missing piece:This is that configuration. Renovate fixes advisories by opening a PR, rather
than reporting them. OSV.dev rather than the GitHub advisory API, which
Renovate cannot use on Forgejo.
vulnerabilityAlertsoverrides two globals for security PRs only:schedule— the global window is Monday mornings, so an advisory landingTuesday would wait six days
minimumReleaseAge— the 3-day soak catches a compromised release, but anunpatched advisory is exploited during it. This is a genuine trade against
deliberate reasoning; reverse it if you weigh those risks differently.
Deliberately NOT set:
labels(Renovate can attach but not create them onForgejo, so an unknown label is dropped silently) and
automerge(these crossthe version lines
pnpm.overridesfreezes on purpose — see #44/#35).Unverified: whether
vulnerabilityAlertstakes precedence over thepackageRulesentry disabling major/minor forpnpm.overrides. That is theexact gap this is meant to close, so it needs one Renovate cycle to confirm.
If it does not take precedence, part 2 is cosmetic and needs another approach.
Part 1 is safe to merge on its own. Part 2 is the one that wants a cycle of
observation.
Until now nothing in this repo was advisory-driven. The CI dependency audit only reported, and the pnpm.overrides rule states outright that an advisory needing a minor/major bump 'has to be done by hand ... while osvVulnerabilityAlerts is unconfigured'. This is that configuration. OSV.dev rather than the GitHub advisory API, which Renovate cannot use on Forgejo. vulnerabilityAlerts overrides two global settings for security PRs only: - schedule: the global window is Monday mornings, so an advisory landing on a Tuesday would wait six days - minimumReleaseAge: the 3-day soak catches a compromised release, but an unpatched advisory is exploited during it Deliberately NOT set: labels (Renovate can attach but not create them on Forgejo, so an unknown label is dropped silently) and automerge (these cross the version lines pnpm.overrides freezes on purpose). Unverified: whether vulnerabilityAlerts takes precedence over the packageRules entry that disables major/minor for pnpm.overrides. That is the exact gap this is meant to close, so it needs watching for one cycle.