Skip to content

fix(deps): update the SDK's transitive dependencies to clear npm audit - #96

Merged
dangrondahl merged 1 commit into
mainfrom
fix/audit-shipped-deps
Oct 23, 2026
Merged

dangrondahl merged 1 commit into
mainfrom
fix/audit-shipped-deps

Conversation

@dangrondahl

@dangrondahl dangrondahl commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

npm audit --omit=dev reports 8 advisories (1 critical, 3 high) in the locked runtime dependencies. This lockfile is what the .mcpb bundle installs from (pack-mcpb.sh copies it before npm install --omit=dev), so that's where users get them, along with CI and any scan of the repo. The npm package doesn't ship a lockfile, so npx users already resolve current versions within the SDK's ranges. All of them come in indirectly through @modelcontextprotocol/sdk:

Package Before → after Pulled in by
proxy-addr (critical) 2.0.7 → 2.0.8 express
hono 4.12.12 → 4.13.13 SDK
@hono/node-server 1.19.13 → 2.1.5 SDK (allows ^1.19.9 || ^2.0.5)
fast-uri 3.1.0 → 3.1.9 ajv
ip-address, express-rate-limit 10.1.0 → 10.7.4, 8.3.2 → 8.7.1 SDK
qs, body-parser 6.15.1 → 6.16.1, 2.2.2 → 2.4.0 express

Most of these belong to the SDK's HTTP server transports, which this server doesn't use, since it only speaks stdio. Scanners still flag them in the release.

Nothing would have fixed them otherwise. The weekly Dependabot version updates bump only direct dependencies, and Dependabot security updates were off. The repo also showed 0 Dependabot alerts, because the dependency graph was off. Both are being switched on in the repo settings.

What

npm audit fix --omit=dev. Only package-lock.json changes, and package.json is untouched. Every new version stays within the range its parent declares. The other lockfile changes (content-type, type-is, iconv-lite, hasown, side-channel, es-object-atoms) are patch or minor bumps that npm needed to resolve the fixed versions.

Checked

  • npm audit --omit=dev: 0 vulnerabilities, down from 8.
  • npm install --package-lock-only leaves the lockfile unchanged, so it's consistent with package.json.
  • Locally: build, typecheck, 122 tests, and the smoke test against dist/. Before the rebase onto chore: bump @modelcontextprotocol/sdk from 1.30.1 to 1.32.1 #79's merge commit I also ran it against the unzipped .mcpb (manifest validated). The bundle ships @hono/node-server 2.1.5. CI repeats all of this, plus the bundle on Node 22.0.0.

Not in this PR

npm audit --omit=dev reported 8 advisories (1 critical, 3 high) in what
ships in the npm package and the .mcpb bundle, all pulled in by
@modelcontextprotocol/sdk: express and its body-parser, qs, proxy-addr,
express-rate-limit/ip-address, hono and @hono/node-server, and ajv's
fast-uri. Most of that is the SDK's HTTP server transport stack, which this
server doesn't use, since it only speaks stdio. Scanners still flag the
release.

This is npm audit fix --omit=dev: lockfile only, no package.json change.
Every new version stays within the ranges its parent declares.
@hono/node-server moves to 2.x, which the SDK allows (^1.19.9 || ^2.0.5).
The weekly version updates never touch these, since they bump only direct
dependencies, and Dependabot security updates were off.

Dev-only advisories are left alone: mcpb's node-forge and tmp have no fix
yet, and vite/vitest move with the vitest 5 PR.
@claude

claude Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Claude finished @dangrondahl's task in 2m 3s —— View job


Review: lockfile-only transitive dependency bump

  • Read CLAUDE.md invariants and the PR diff
  • Verify the change is lockfile-only and consistent with package.json
  • Check every bumped version stays inside its parent's declared range
  • Check CI results

No blocking findings. The diff touches only package-lock.json; no src/, workflow, or package.json change, so none of CLAUDE.md's invariants (three tools, no configured org, the error-object contract, the User-Agent version) are in play.

What I verified

Every new version satisfies the range its parent declares, including the one that isn't obvious:

  • @modelcontextprotocol/sdk@1.32.1 declares "@hono/node-server": "^1.19.9 || ^2.0.5" (package-lock.json:747), so 2.1.5 is inside the SDK's own supported range — the 1.x → 2.x jump is sanctioned by the SDK, not forced past it. Same for express-rate-limit ^8.2.1 → 8.7.1 and hono ^4.11.4 → 4.13.13.
  • express@5.2.1 (package-lock.json:1763-1791): body-parser ^2.2.1 → 2.4.0, qs ^6.14.0 → 6.16.1, proxy-addr ^2.0.7 → 2.0.8, type-is ^2.0.1 → 2.1.0. All satisfied.
  • The new requirements the bumped packages introduce are all already met by what's locked: raw-body ^3.0.2 → 3.0.2, http-errors ^2.0.1 → 2.0.1, es-define-property ^1.0.1 → 1.0.1 (new edge from qs), object-inspect ^1.13.4 → 1.13.4, side-channel-list ^1.0.1 → 1.0.1, debug ^4.4.3 → 4.4.3 (new edge from express-rate-limit). No dangling range.
  • The duplicated content-type@2.1.0 under body-parser and type-is is correct rather than sloppy: both the SDK (:750) and express (:1767) still pin ^1.0.5, so 1.0.5 has to stay hoisted.
  • Node floor: @hono/node-server tightened engines.node from >=18.14.1 to >=20, and the new body-parser/type-is/content-type all declare >=18. All below the consumer floor of >=22, so nothing on CLAUDE.md's "raising the Node floor" checklist has to move, and the bundle's 22.0.0 smoke test is unaffected.
  • npm ci passing in CI confirms the lockfile is in sync with the untouched package.json.
  • CI: ✅ success (build, typecheck, tests, smoke against dist/, pack, mcpb validate, bundle smoke on 22.0.0).
  • Commit 8bf603a and the PR title are both valid Conventional Commits (fix(deps):).

Two notes, neither blocking

The PR says the advisories are fixed "both in the npm package and in the .mcpb bundle." npm strips package-lock.json from published tarballs, so npx -y @kosli/mcp-server consumers resolve fresh from ^1.29.0 and were already getting these versions or newer. What this lockfile actually fixes is the .mcpb bundle (scripts/pack-mcpb.sh copies the lockfile before npm install --omit=dev), CI, and any scan of the repo itself — which is the part that was being flagged, so the outcome stands.

Nothing in ci.yml runs npm audit --omit=dev, so this can regress silently between the Dependabot security updates being enabled out of band. Worth considering as a follow-up rather than here.

Nicely scoped PR: the description's claims each turned out to be checkable and correct, which made this quick to verify.
· branch fix/audit-shipped-deps

@dangrondahl
dangrondahl enabled auto-merge (squash) October 23, 2026 09:43
@dangrondahl
dangrondahl merged commit 58f037b into main Oct 23, 2026
5 checks passed
@dangrondahl
dangrondahl deleted the fix/audit-shipped-deps branch October 23, 2026 09:45
@dangrondahl dangrondahl mentioned this pull request Oct 23, 2026
5 tasks
dangrondahl added a commit that referenced this pull request Oct 23, 2026
Release prep for **0.6.0**. A draft for now: it gets rebased once #97
(CodeQL) merges, then marked ready.

`npm version minor --no-git-tag-version` moves `package.json`,
`package-lock.json` and the generated `src/version.ts` together.
`manifest.json` gets the version at pack time. Nothing else changes.

## What's in 0.6.0 (since 0.5.0)

### ⚠️ Changes that affect existing setups
- **No configured org (#65).** `KOSLI_ORG` and the Desktop extension's
*Organization* setting are removed. Every org-scoped call names its org
through the execute tools' `org` input, so no request lands in an org
the caller didn't name. An existing config that still sets `KOSLI_ORG`
starts fine and logs that the value is ignored, but calls that relied on
the default are now refused until an org is given.
- **Node ≥ 22 (#38).** It was ≥ 20.

### Fixes
- **Evidence downloads work again (#88, fixes #86).** Since 16 Oct,
every `get_attestation_evidence` call failed: our token was forwarded to
the pre-signed S3 URL. Text files come back as text, and binary files
return a clear error.
- **The `.mcpb` bundle starts on Node 22.0 – 22.6 (#87).** It didn't
before.
- **No known vulnerabilities in the bundled dependencies (#96).** `npm
audit --omit=dev` is clean.

### Features
- **`org` input on the execute tools (#65).**
- **`User-Agent` carries the version (#41):**
`kosli-mcp-server/<version>`.

### Dependencies
- **Runtime:** `@modelcontextprotocol/sdk` 1.29.0 → 1.32.1 (#29, #71,
#79).
- **Dev:** TypeScript 7 (#45), with emitted output byte-identical to
5.9. vitest 5 (#93).
- **Catalog:** regenerated from the OpenAPI spec (#50, #53, #60, #69,
#78).

### Release confidence (CI only)
Typecheck of tests and scripts, a stdio smoke test against `dist/` and
the unzipped bundle (including Node 22.0.0), `mcpb validate`, and
`release.yml` publishing only after every check (#87). There's also a
phased Claude review (#90), Dependabot grouping with a 7-day cooldown,
and CodeQL (#97).

## Checked locally on this branch

- Build, typecheck, 122 tests.
- The smoke test reports `server advertises version 0.6.0`, both from
`dist/` and from the unzipped bundle.
- `kosli-mcp-server-0.6.0.mcpb`: the manifest says 0.6.0 and `mcpb
validate` passes.

## Before tagging (after merge)
- [ ] Rebase onto `main` once #97 merges, then mark ready.
- [ ] Install the 0.6.0 `.mcpb` in Claude Desktop, including an upgrade
over 0.5.0 with an org configured.
- [ ] Run `KOSLI_API_TOKEN=… KOSLI_SMOKE_ORG=<org> npm run smoke` on
`main`.
- [ ] Download one piece of evidence via `get_attestation_evidence`.
- [ ] `git tag -a v0.6.0 -m "v0.6.0" <merge commit> && git push origin
v0.6.0`. `release.yml` does the rest.
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.

2 participants