Move what the bundle imports into dependencies, so the blocking audit examines it - #608
Merged
Conversation
CommitLore — record lintTrailers: clean — 2 commits in Active constraints for the paths this PR touchesLimits (177)
Ruled out (358)
Truncated: 318 lines omitted — the comment hit GitHub's 65000 character limit. Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
… examines it
`npm audit --omit=dev` is the blocking half of the audit split I wrote for
that matters is what is bundled into it, and that must be zero. The
implementation contradicted the premise — every runtime package was declared
under `devDependencies`, so `--omit=dev` selected an empty set:
npm ls --omit=dev --depth=0
└── (empty)
`@modelcontextprotocol/sdk`, `ajv`, `ajv-formats` and `commander` are imported
directly by `src/` and end up in `dist/commitlore.mjs`. `js-yaml` is not — it
is used only by scripts and bench — so it stays a dev dependency. Moved the
four that are genuinely runtime; nothing else changed. Closes #606.
With the audit examining the real set, it found something real: `fast-uri`
(via `ajv`) and `hono` (via the MCP SDK's node server) carried two advisories,
high and moderate. `npm audit fix` resolved both to compatible versions with
no source change required.
Verified: `npm audit --omit=dev --audit-level=low` now finds 0 vulnerabilities
after finding 2 before the fix; `npx tsc --noEmit` clean; 129/129 across
mcp.test.ts, capture-pipeline-e2e.test.ts and validate.test.ts; dist rebuilt
on linux/amd64 (the platform CI's blocking check runs on) matches byte for
byte
Evidence: package.json
Evidence: package-lock.json
Blast: system
Undo: easy
Certainty: firm
Record-Id: r-8e1c40
Provenance: authored
CommitLore-Version: 2.0.0
`manifest.dependencies ?? {}).toEqual({})` was true only because nothing had
`dependencies` yet. #606 moved the four packages the bundle actually imports
there, so the blocking audit would examine them instead of an empty set — and
this test failed on the thing #606 was correcting.
What the test name says it protects is narrower than what it asserted:
`better-sqlite3`, a package this project once used and removed, must not
quietly reappear. That is still checked. The empty-object assertion was
collateral from a time when the two happened to coincide.
Verified: 6/6 in help-text-honesty.test.ts; dist rebuilt on linux/amd64
Evidence: test/help-text-honesty.test.ts
Blast: local
Undo: easy
Certainty: firm
Record-Id: r-2a5f19
Provenance: authored
CommitLore-Version: 2.0.0
MongLong0214
force-pushed
the
fix-606-audit-scope
branch
from
August 13, 2026 02:35
3142529 to
aa2efcc
Compare
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.
Closes #606.
npm audit --omit=devis the blocking half of the #545 audit split. The premise:dist/is what users receive, so that surface must be at zero vulnerabilities. The implementation contradicted it — every runtime package (@modelcontextprotocol/sdk,ajv,ajv-formats,commander) was declared underdevDependencies, so--omit=devaudited an empty set.Moved the four packages
src/actually imports intodependencies.js-yamlstays dev — it is used only by scripts/bench, never bundled.With the audit examining the real set, it found two real advisories:
fast-uri(via ajv, high) andhono(via the MCP SDK's node server, moderate).npm audit fixresolved both, no source change needed.Verified:
npm audit --omit=dev --audit-level=lowfinds 0 after finding 2;tscclean; 129/129 across mcp/capture-pipeline-e2e/validate; dist rebuilt on linux/amd64 matches byte for byte.