Skip to content

Audit gate: declare the audit's scope in the npm audit spawn - #2900

Merged
chalin merged 6 commits into
docsy:mainfrom
chalin:chalin-m24-npm-audit-include-dev-2026-1028
Oct 29, 2026
Merged

chalin merged 6 commits into
docsy:mainfrom
chalin:chalin-m24-npm-audit-include-dev-2026-1028

Conversation

@chalin

@chalin chalin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
  • Scope: the audit gate's npm audit spawn declares what it audits, so the caller's npm config can't narrow it
    • every dependency kind (omit's whole domain), online against the public registry, the lock as committed
    • header states what the gate asserts and audits, and the one residual (workspace config)
  • Out of scope:
    • overridesComment pointer: next PR
    • exception matching by path, theme-lock coverage: parent task
    • no new detector, no relock
  • Closes a false-clean class: under NODE_ENV=production, an omit setting, offline, package-lock=false (npm audits a re-resolved tree instead of the lock) or a registry whose advisory endpoint answers empty, the report shrinks or empties while metadata.dependencies still counts the full lock, so the gate's coverage assertion stays green
  • Proves each flag red-first against throwaway locks carrying a live advisory (dev, dev+optional, peer, offline, lock-vs-manifest divergence, empty-answer registry): green without the flag, red with it; on the real lock the gate stays 7/7 with and without those settings in the environment

@chalin chalin added this to the 0.19.0 milestone Oct 29, 2026
@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for docsydocs ready!

Name Link
🔨 Latest commit 54268bd
🔍 Latest deploy log https://app.netlify.com/projects/docsydocs/deploys/6ae3b42964fed0a962ededa5
😎 Deploy Preview https://deploy-preview-2900--docsydocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

- Pins every dependency kind, online, and the lock as committed, so the caller's npm config can't narrow the audit (r1.1, r1.3, r1.4)
- Header states what the gate asserts and audits, and the one residual (workspace selection)
@chalin chalin changed the title Audit gate: include dev dependencies in the npm audit spawn Audit gate: declare the audit's scope in the npm audit spawn Oct 29, 2026
- A caller's registry config pointing at a mirror whose advisory endpoint answers empty turned the gate green (r2.1)
- Header: the root lock (install:safe reads two), workspace config named by key; flags point at the header
- Coverage assertion's label no longer says "installed" over a lock-only audit
@chalin
chalin marked this pull request as ready for review October 29, 2026 21:40
@chalin
chalin requested a review from a team October 29, 2026 21:40
@chalin
chalin merged commit 4cd6e98 into docsy:main Oct 29, 2026
14 checks passed
@chalin
chalin deleted the chalin-m24-npm-audit-include-dev-2026-1028 branch October 29, 2026 21:45
@chalin chalin modified the milestones: 0.19.0, 0.18.1 Oct 30, 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