Skip to content

fix(deps): clear npm audit, and fail on any advisory a user would install - #168

Merged
jasdeepkhalsa merged 1 commit into
mainfrom
fix/clean-npm-audit
Nov 7, 2026
Merged

jasdeepkhalsa merged 1 commit into
mainfrom
fix/clean-npm-audit

Conversation

@jasdeepkhalsa

Copy link
Copy Markdown
Member

Clears npm audit across the repo, and makes CI fail on any advisory that someone installing SupaForge would get.

What users install

Published 0.0.41, installed into an empty directory, had one moderate advisory: minimatch GHSA-g3hv-75wg-m249, pulled in by @oclif/core.

  • The latest @oclif/core (5.1.11) still requires minimatch ^10.2.5, and the fix is in 11.0.1. Upstream's bump is fix(deps): bump minimatch from 10.2.6 to 11.0.1 oclif/core#1664, open.
  • SupaForge can't fix this for its users yet:
    • An overrides entry in our package.json only applies inside this repo, never to someone installing the package.
    • A shipped npm-shrinkwrap.json holding minimatch 11 was tested: it lands in the tarball, but npm ignores the pinned version because 11 is outside oclif's range, and installs 10.2.6 anyway.
  • oclif only uses minimatch to match its own plugin names, never user input. With the override in place, the CLI and its tests run on minimatch 11.

So it is the single entry in packages/cli/scripts/audit-exceptions.json, with the reason and when to remove it.

Changes

  • check-package.mjs already installs the packed tarball into an empty directory and runs it. Now it also audits that install:
    • It fails on any advisory not in audit-exceptions.json.
    • It fails on an exception that no longer applies, so the list only shrinks.
    • It runs on PRs, on main, weekly, in the release dry run, and before publishing.
    • I checked both failure modes locally: an empty exceptions file fails on the minimatch advisory, and a made-up entry fails as stale.
  • CLI lockfile:
    • @hono/node-server 2.1.6 for GHSA-rmxm-3fg6-px4f (moderate, via the MCP SDK).
    • Overrides take minimatch to 11.0.5 and esbuild to 0.28 (GHSA-g7r4-m6w7-qqqr, dev only).
    • Build, tsc and all 1950 unit tests pass.
  • VS Code lockfile: overrides for minimatch, glob, diff and serialize-javascript, all dev tooling (vsce, mocha, test-cli). This also covers the daily Dependabot runs that were failing on the same packages. vsce package still works.
  • security.yml:
    • Each package's lockfile (cli, mcp, and now vscode) must audit clean at any severity.
    • Before, the bar was runtime high, or critical with dev tooling.

npm audit: 0 vulnerabilities in cli, mcp and vscode.

🤖 Generated with Claude Code

…tall

- cli: @hono/node-server 2.1.6 (GHSA-rmxm-3fg6-px4f); overrides take
  minimatch to 11 and esbuild to 0.28 in the repo's own tree.
- vscode: overrides for minimatch, glob, diff and serialize-javascript,
  all pulled in by vsce, mocha and test-cli.
- security.yml: every package's lockfile must audit clean at any severity,
  vscode included.
- check-package.mjs audits the packed tarball installed into an empty
  directory - what a user and an MCP directory's scanner get - and fails
  on any advisory not in scripts/audit-exceptions.json, or on an exception
  that no longer applies.

The one exception is minimatch under @oclif/core: oclif's latest release
still requires ^10.2.5, and neither overrides nor a shipped shrinkwrap
reach a user's install (npm resolves a dependency's range afresh).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasdeepkhalsa
jasdeepkhalsa merged commit 07deeb3 into main Nov 7, 2026
39 checks passed
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