chore(ci): add scheduled dependency-audit scan against dev - #264
Merged
parthrohit22 merged 2 commits intoAug 7, 2026
Merged
Conversation
…igin#263) The Frontend job's live npm-audit gate blocks PRs on external advisory timing, not code changes -- three unrelated PRs went red today from newly published CVEs (Second-Origin#256, Second-Origin#258). This adds a daily scheduled workflow that re-runs the same audit against dev independent of any open PR, filing (or closing) a labelled issue so dev stays caught up and a PR rarely gets blindsided. Does not change ci.yml's existing per-PR gate at all -- same strictness, just an earlier warning.
Branched from dev before Second-Origin#257 merged, so this inherited the same still-open nanoid advisory blocking Second-Origin#259/Second-Origin#264's Frontend check. Same fix: patched version 3.3.17 is within the major already in use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The `Frontend` job's live `npm audit` gate (`scripts/dependency-audit.mjs`) blocks every PR on whatever the GitHub Advisory Database looks like at the exact moment CI runs — not on the PR's own diff. Three unrelated PRs went red today from newly published CVEs within a few hours of each other (#256, then a fresh nanoid advisory blocking #259's rebuild, tracked together as the trigger for #258/#263). Owner-selected fix (of three options presented): keep the per-PR gate exactly as strict as today, and add a scheduled scan against `dev` so it rarely gets the chance to blindside an unrelated PR in the first place.
Linked issue
Closes #263
Roadmap alignment
CI/process reliability, not a product capability — doesn't map onto a §23/§28 citation, same pattern as #257/#259.
What changed
New `.github/workflows/dependency-audit-schedule.yml`:
Does not touch `ci.yml` or the existing per-PR `Frontend` job at all — the per-PR gate keeps its current strictness unchanged; this is purely additive.
Acceptance criteria completed
Testing performed
GitHub Actions' `workflow_dispatch` requires the workflow file to already exist on the repository's default branch (`main`) before it can be manually triggered — a genuine chicken-and-egg limitation for testing a brand-new workflow pre-merge, not something resolvable from this branch. I validated the YAML syntax and manually reviewed the `gh issue`/`gh label` logic and `GITHUB_TOKEN` permissions (`issues: write` declared), but have not seen it execute for real. Recommend triggering it once manually via `gh workflow run dependency-audit-schedule.yml` right after this merges, to confirm the clean-`dev` path runs end-to-end before trusting the cron.
Screenshots
Not applicable — CI workflow change, no UI impact.
Security and data considerations
Uses the automatic `GITHUB_TOKEN` (scoped via the `permissions:` block to `contents: read`, `issues: write` only — no write access to code, no secrets referenced). No new dependency, no new external service, no change to what's exposed or how the existing per-PR audit gate behaves.
Dependencies and blocked work
None.
Scope changes or remaining work
Per the "Testing performed" note above: a real post-merge `workflow_dispatch` run confirming the clean-`dev` path (comment/close logic untriggered since nothing's currently open) is the actual verification step for this PR's second acceptance criterion, and can't happen before merge. Flagging explicitly rather than claiming it as done.
Contributor checklist