Skip to content

feat: check the whole dependency tree, add devcompass why, drop npm-check-updates - #13

Open
AjayBThorat-20 wants to merge 1 commit into
fix/windows-supportfrom
feat/whole-tree-scan-and-why
Open

AjayBThorat-20 wants to merge 1 commit into
fix/windows-supportfrom
feat/whole-tree-scan-and-why

Conversation

@AjayBThorat-20

@AjayBThorat-20 AjayBThorat-20 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

What and why

Most vulnerabilities in a real project are in transitive dependencies, and the OSV check only looked at direct ones.

  • A dependency graph built from package-lock.json alone (npm; pnpm/yarn/bun, a missing lockfile or lockfileVersion 1 report incomplete instead of an empty graph). Edges come from the lockfile's install paths, so it's complete before npm install has run.
  • The OSV check covers every installed name@version. On express@4.17.1 + lodash it finds 7 vulnerable packages instead of 4. Queries are chunked (200 per request, 4 in flight).
  • devcompass why <package> prints every path from the project to each installed version of a package.
  • npm-check-updates is gone (−6.3 MB). The outdated check uses the registry client DevCompass already ships; wanted is now the highest version the declared range allows, not always latest.
  • Lockfile-only fixes for new follow-redirects and zod advisories.

Stacked on #12.

Merging the stack: use Create a merge commit, not squash (squashing makes every later PR show these commits again). After merging the PR below this one, click Delete branch on it; GitHub then retargets this PR to main and CI runs.

How I tested it

  • npm run test:coverage on Node 24.21.0, clean npm ci, network disabled: 152/152 pass, 38.66% lines
  • npm audit --audit-level=high currently fails on GHSA-mrwp-f3q8-3g9p (follow-redirects, published after this branch was made); the lockfile fix is in feat: rank vulnerabilities by exploit risk (CISA KEV + FIRST EPSS) #14
  • analyze on express@4.17.1 + lodash: 7 vulnerable packages (was 4)
  • Unit tests: a direct qs@6.9.0 and express's nested qs@6.7.0 are separate nodes with the right edges, and why lists every path to each

🤖 Generated with Claude Code

…-check-updates

- A dependency graph built from package-lock.json alone (npm; pnpm/yarn/bun,
  no lockfile or lockfileVersion 1 report incomplete). Edges are resolved
  from the lockfile's install paths, so the graph is complete before
  `npm install` and links optional platform packages to their own nested
  dependencies.
- The OSV check covers every installed name@version in that graph, not just
  direct dependencies (falls back to direct ones without a usable graph).
  On express@4.17.1 + lodash this finds 7 vulnerable packages instead of 4.
  OSV queries are chunked, 200 packages per request, 4 in flight.
- `devcompass why <package>` prints every path from the project to each
  installed version of a package.
- The outdated check uses the registry client instead of npx
  npm-check-updates (-6.3 MB). The cache now keeps the published version
  list, so `wanted` is the highest version the declared range allows.
- Lockfile-only fixes for new follow-redirects and zod advisories.
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