Skip to content

fix(deps): override tuistory's @hono/node-server to 2.1.8 - #1231

Merged
kevincodex1 merged 1 commit into
mainfrom
fix/deps-hono-node-server-2
Nov 17, 2026
Merged

kevincodex1 merged 1 commit into
mainfrom
fix/deps-hono-node-server-2

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What and why

Closes Dependabot alert #13: GHSA-rmxm-3fg6-px4f (moderate) on @hono/node-server. serveStatic decodes the request path a second time, so middleware on a static prefix can be bypassed.

#1230 moved to 1.19.19, which carries upstream's backport of this fix. The advisory lists only 2.1.3 as patched, so Dependabot keeps flagging every 1.x release. No in-range version can clear it: tuistory asks for ^1.19.9, and @hono/node-ws 1.3.1 (the latest) declares a ^1.19.11 peer.

This PR adds @hono/node-server: ^2.1.6 to the existing tuistory-scoped overrides, next to zod. The lock resolves 2.1.8. The floor is 2.1.6, not 2.1.3, because 2.x before 2.1.6 is still affected by GHSA-jpvv-r467-5p4w. zero-release package already carries the overrides into the helpers manifest (#1230). Only package.json and package-lock.json change.

Compatibility

  • API: v2 keeps the same public API. tuistory uses createAdaptorServer, and @hono/node-ws attaches to the server's upgrade event. node-ws imports nothing from @hono/node-server at runtime; it declares it only as a peer.
  • Node floor (CodeRabbit flagged this as minor): 2.x declares engines.node >=20. This does not raise the helper's real floor:
    • On main, tuistory's tree already requires Node 20 or later: @clack/prompts (>=20.12.0, a direct tuistory dependency), kill-port-process, pid-port and marked (>=20).
    • The vendored agent-browser needs Node 24.
    • The repo engines.node >=18 describes the published wrapper (bin/zero.js). npm never resolves the vendored helpers for consumers, so no engine mismatch reaches users.
    • Whether to raise the wrapper's own floor is a separate decision, so it's not part of this PR.

Verification

Ran on a real go run ./cmd/zero-release package staging (macOS arm64, Node 24):

  • npm ci installs @hono/node-server 2.1.8 for both tuistory and @hono/node-ws, with no peer error (npm ls shows it deduped).
  • npm audit --package-lock-only reports 0 vulnerabilities.
  • The vendored tuistory launches, types, waits on, snapshots and closes a session through its relay.
  • The local-only guard still returns 403 for a foreign Host and for a cross-origin Origin, on plain requests and on the /attach WebSocket upgrade. A raw backslash path still gets 400.
  • /attach upgrades, streams the session buffer, and input sent over the socket reaches the shell.
  • Only Node 24 was available locally, so I did not run the helper under Node 20 or 22.

Required checks all pass: make fmt-check, go vet ./..., go test ./..., go run ./cmd/zero-release build, go run ./cmd/zero-release smoke, make vulncheck, git diff HEAD --check. make lint-static (advisory) reports the same 4 findings already on main, in files this PR does not touch.

No new Go test: this is a dependency-only change, and carrying overrides into the release staging is already covered by TestStageLocalControlHelpersCarriesPackageOverrides from #1230.

Summary by CodeRabbit

  • Chores
    • Made an internal maintenance update. There are no changes to the app’s features or behavior in this release.

Dependabot still flags GHSA-rmxm-3fg6-px4f (moderate) on
@hono/node-server 1.19.19 after #1230: serveStatic decodes the request
path a second time, so middleware on a static prefix can be bypassed.
Upstream backported the fix to 1.19.19, but the advisory lists 2.1.3
as the first patched version, so the alert stays open on every 1.x
release.

tuistory asks for ^1.19.9 and @hono/node-ws 1.3.1 (the latest) declares
a ^1.19.11 peer, so no in-range version clears the alert. package.json
now overrides @hono/node-server under tuistory to ^2.1.6, next to the
existing zod override, and the lock resolves 2.1.8. 2.1.6 is the floor
because 2.x before it is still affected by GHSA-jpvv-r467-5p4w.
zero-release package already carries the overrides into the helpers
manifest (#1230).

v2 keeps the public API. tuistory uses createAdaptorServer and attaches
@hono/node-ws to the server's upgrade event; node-ws imports nothing
from @hono/node-server at runtime. The one new requirement is
engines.node >=20 for the helper (Node 18 is end of life, and the
vendored agent-browser already needs 24).

Verified on a real `zero-release package` staging (macOS arm64, Node 24):
npm ci installs @hono/node-server 2.1.8 for both tuistory and
@hono/node-ws with no peer error, and `npm audit` reports 0
vulnerabilities. The vendored tuistory launches, types, waits on and
closes a session through the relay. Its local-only guard still answers
403 to a foreign Host and a cross-origin Origin, on plain requests and
on the /attach WebSocket upgrade. A raw backslash path still gets 400.
/attach upgrades, streams the session buffer, and input sent over the
socket reaches the shell.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The package configuration adds a tuistory-scoped override that sets @hono/node-server to ^2.1.6.

Changes

Tuistory dependency override

Layer / File(s) Summary
Set the tuistory dependency override
package.json
The tuistory override sets @hono/node-server to ^2.1.6.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • Twigpine/zero#1230: Adds an earlier tuistory-scoped override for @hono/node-server; this PR updates that override to ^2.1.6.

Suggested reviewers: anandh8x, vasanthdev2004

Merge Risk: Minimal · up to bc3d7

This change moves tuistory's @hono/node-server dependency to the patched 2.x line through the same override mechanism the repository already uses for other helper dependencies. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the dependency override for tuistory's @hono/node-server and the target version 2.1.8. The raw summary describes an override pinned to ^2.1.6 and the objectives say the lockfile resolv…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the dependency override for tuistory's @hono/node-server and the target version 2.1.8. The raw summary describes an override pinned to ^2.1.6 and the objectives say the lockfile resolves to 2.1.8, so the title matches the main change. The title says 'fix(deps)' and the change addresses a Dependabot advisory, which fits a dependency fix. The title is specific and concise.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c4e99cd and bc3d703.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 1

  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 3 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Zero automated PR review

Verdict: No blockers found

Blockers

  • None found.

Validation

  • [pass] Diff hygiene: git diff --check
  • [pass] Tests: go test ./...
  • [pass] Build: go run ./cmd/zero-release build
  • [pass] Smoke build: go run ./cmd/zero-release smoke

Scope

Head: bc3d703b9000
Changed files (2): package-lock.json, package.json

This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality.

@kevincodex1
kevincodex1 merged commit b10940e into main Nov 17, 2026
16 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