Repository navigation
fix(deps): override tuistory's @hono/node-server to 2.1.8 - #1231
Conversation
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.
|
No actionable comments were generated in the recent review. WalkthroughThe package configuration adds a tuistory-scoped override that sets ChangesTuistory dependency override
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: Merge Risk:
|
Zero automated PR reviewVerdict: No blockers found Blockers
Validation
ScopeHead: This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality. |
What and why
Closes Dependabot alert #13: GHSA-rmxm-3fg6-px4f (moderate) on
@hono/node-server.serveStaticdecodes 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.3as 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-ws1.3.1 (the latest) declares a^1.19.11peer.This PR adds
@hono/node-server: ^2.1.6to the existing tuistory-scopedoverrides, 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 packagealready carries the overrides into the helpers manifest (#1230). Onlypackage.jsonandpackage-lock.jsonchange.Compatibility
createAdaptorServer, and@hono/node-wsattaches to the server'supgradeevent. node-ws imports nothing from@hono/node-serverat runtime; it declares it only as a peer.engines.node >=20. This does not raise the helper's real floor:main, tuistory's tree already requires Node 20 or later:@clack/prompts(>=20.12.0, a direct tuistory dependency),kill-port-process,pid-portandmarked(>=20).agent-browserneeds Node 24.engines.node >=18describes the published wrapper (bin/zero.js). npm never resolves the vendored helpers for consumers, so no engine mismatch reaches users.Verification
Ran on a real
go run ./cmd/zero-release packagestaging (macOS arm64, Node 24):npm ciinstalls@hono/node-server2.1.8 for both tuistory and@hono/node-ws, with no peer error (npm lsshows it deduped).npm audit --package-lock-onlyreports 0 vulnerabilities./attachWebSocket upgrade. A raw backslash path still gets 400./attachupgrades, streams the session buffer, and input sent over the socket reaches the shell.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 onmain, in files this PR does not touch.No new Go test: this is a dependency-only change, and carrying
overridesinto the release staging is already covered byTestStageLocalControlHelpersCarriesPackageOverridesfrom #1230.Summary by CodeRabbit