Skip to content

chore(release): 26.11.0-rc.2 - #93

Merged
chrnx-dev merged 41 commits into
developfrom
release/26.11.0-rc.2
Nov 23, 2026
Merged

chrnx-dev merged 41 commits into
developfrom
release/26.11.0-rc.2

Conversation

@chrnx-dev

Copy link
Copy Markdown
Contributor

What this changes

Release 26.11.0-rc.2. It fixes nine security issues found in an audit of 26.11.0-rc.1 and the Stable milestone items listed below. Their advisories are published once the tag is out on npm and JSR. See CHANGELOG.md for the full list and the behaviour changes.

Closes #59, closes #70, closes #71, closes #72, closes #74, closes #75, closes #76, closes #77, closes #79, closes #80, closes #81, closes #82, closes #83, closes #84, closes #85, closes #86, closes #87
Refs #26, #78

Checklist

  • The base branch above is develop
  • Commits are signed off (git commit -s)
  • npm run lint, npm run format:check, npm run typecheck, npm test, npm run complexity:check and npm run build pass locally
  • The runtime suites this change touches pass locally: test:all (Node, Deno, Bun, edge)
  • New behavior has a test
  • New public options are declared in src/app/types.ts and noted in README.md
  • Behavior is the same on Node, Deno and Bun, except where CHANGELOG.md says otherwise (Deno and Bun silently ignore the request/headers/keep-alive timeout options #76 timeouts)

Benchmarked against v26.11.0-rc.1 on Node, Deno and Bun (bench:compare). No regressions outside A/A noise.

The teapot matched an exported route on its pattern only, then ran the
route for whatever method the peer sent, so exporting GET /x let an
authenticated teacup call an unexported DELETE /x.

Gate on "${method} ${pattern}". A teacup already sends HEAD on a
remote GET as that GET (D16), so no HEAD mapping is needed.

Refs: GHSA-4q43-x4fp-c273
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bus.emit caught a listener's synchronous throw, but an async listener
fails by returning a rejected promise. Unhandled, that rejection exits
Node with code 1, so one broken plugin listener killed the process on
the first request.

Attach a no-op rejection handler when a listener returns a thenable.

Closes #70

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bun.serve cuts a request idle for idleTimeout (10s by default), which
is shorter than the 15s SSE keep-alive ping, so a stream that went
quiet was dropped with ECONNRESET.

serveBun now calls server.timeout(request, 0) for stream responses
only, so buffered requests keep Bun's idle protection. The method is
cast locally to leave the exported BunServer type unchanged.

Closes #71

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
No adapter checked the Origin header, so a page on any site could open
a WebSocket carrying the signed-in user's cookies and read what the
handler streamed. CORS does not apply to WebSockets.

An upgrade is now accepted when it has no Origin (not a browser), an
Origin on the request's own host, or one cors.origins allows; anything
else, Origin: null included, gets 403. Node checks in routeUpgrade; the
fetch adapters (Deno, Bun, edge) check before upgrading, through a
symbol-keyed check the app sets, like TLS_REQUESTED. The mesh control
channel is exempt because it authenticates with its secret.

The public API report is unchanged. Tests on Node, Deno, Bun and edge.

Refs: GHSA-p697-fpqx-pgf3
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A remote step that threw a plain Error sent its message to the teacup,
which rendered it in a 500 to the end client. A local throw renders
"Internal Server Error", so the hop leaked what the local path hides.

The teapot now sends the real message only for an HttpError or a status
below 500, and masks the rest; the full error stays in its
mesh:rpc:error event. The 'cannot transport' diagnostic becomes an
HttpError so it still reaches the developer. Same frame fields, no
protocol change.

Refs: GHSA-gm9h-7577-x57w
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A source that threw mid-stream sent err.message to the client verbatim,
while the same throw on a buffered route renders Internal Server Error.

The error frame now carries an HttpError's message and a generic one
for anything else, on every adapter (they share the encoders). The
stream:error event still receives the full error. The README notes how
a failed stream ends, since onError cannot reach a response that has
already sent its status.

Refs: GHSA-235j-fx64-w9p9
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
ctx.ip came from the left-most X-Forwarded-For entry, which the client
writes. A proxy appends the real address, so a client sending
X-Forwarded-For: 6.6.6.6 was seen as 6.6.6.6, defeating per-IP rate
limits, allowlists and audit logs.

Take the right-most entry, the one the trusted proxy appended, on Node
and the fetch adapters through one shared helper. A trailing blank
entry falls back to the socket peer. Tests updated on Node, Deno, Bun.

Refs: GHSA-53g8-83jp-gvw4
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The spec forbids Access-Control-Allow-Origin: * with credentials, so
core honoured the combination by echoing every request origin, null
included, with Allow-Credentials: true. Any site could then make
credentialed reads.

createApp now throws for it and names the alternatives: list the
trusted origins, or write the intent as a predicate where it is
visible. The option type is unchanged.

Refs: GHSA-fccm-q62j-48hr
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Static serving returned any file under the root, so GET /.env served
the file, and /.git/config or /.htpasswd would too if they ended up in
the public directory.

A path with any segment starting with '.' is now a miss (404), checked
on the decoded path so %2e cannot slip past. /.well-known/ stays
reachable for ACME and security.txt (RFC 8615); dotfiles inside it are
still hidden.

Refs: GHSA-hjcj-hr8v-rfg4
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Node checks headersTimeout and requestTimeout only every
connectionsCheckingInterval, 30s by default, so a slow-header socket
lived up to 40s. A WebSocket peer that disappeared without closing was
never reaped at all. A few hundred of either filled the default
maxConnections and every new connection was dropped.

Create the server with a 1s connectionsCheckingInterval, and ping each
Node WebSocket every 30s, terminating it if it missed the previous
ping. The timer is unref'd and cleared on close.

Refs: GHSA-g96c-wq2v-87vc
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
resolveScope seeded every provider and ran every step on the teapot for
each remote step call. An unexported step's side effects fired once per
RPC, and an unrelated step that threw broke every export.

Slice each exported step's closure once when the control channel is
built, the way finalizeGraph slices a route, and run only that. Unlike
a route, always-on observer steps are not added: the teacup's own
request already ran its observers.

Closes #85

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The hello frame carries the teapot's secret verbatim, and a cleartext
link to another machine only logged a warning, after createApp had
already accepted the config.

createApp now refuses a ws:// teapot whose host is not loopback, before
anything connects. MeshConfig.allowInsecure opts in for networks that
already encrypt the link, and each such teapot is still warned about.
Loopback detection parses the URL, so [::1] and 127.0.0.0/8 are
recognised (the old split on ':' misread IPv6 hosts).

MeshConfig is mesh's own experimental surface (D19); the API report
gains only allowInsecure.

Closes #86

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Mesh cannot run on Cloudflare Workers (no timingSafeEqual under
nodejs_compat, no long-lived outbound sockets), but an app configured
with it booted there and failed later, somewhere unrelated.

createApp throws when it detects a Workers isolate, which covers a bare
app.fetch export, and edgeHandler throws for an app configured with
mesh through a symbol-keyed flag, like TLS_REQUESTED, for the Worker
detection cannot see. The mesh option checks move out of createApp
into assertMeshAllowed to keep it under the complexity limit. Tested in
vitest and inside workerd.

Closes #87

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A billing teapot owns an in-memory ledger and exports a balance step
and its REST routes; a shop teacup serves a checkout route that
@needs('balance') like a local step, and serves billing's routes as its
own. The walkthrough is in example/README.md.

test/examples/mesh.test.ts runs it with billing as a real child
process: requests across the hop, a validation error crossing with its
status, 503 + retry-after after billing is killed, and recovery once it
starts again on the same port. Billing is started with node --import
tsx, because the tsx binary runs the app in a grandchild that a kill
would leave behind.

Refs: #88
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
render() replaced {{{ }}} first and then ran {{ }} over the result, so
a value inserted raw was scanned again: content holding
{{ user.passwordHash }} rendered the hash. It also walked inherited
members, so {{ constructor }} printed a function's source.

Match both forms with one regex in one pass, so inserted values are
never scanned, and resolve keys as own properties (hasOwnProperty; the tsconfig lib
predates Object.hasOwn).

Refs: GHSA-g86h-3r98-qm66
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Form field and file names come from the client. With
bodyDuplicates: 'array', __proto__=a&__proto__=b assigned an array to
the parsed body's __proto__, replacing its prototype, and a multipart
file part named __proto__ did the same to body.files. Object.prototype
itself was never touched.

Read with hasOwnProperty and write with defineProperty, so __proto__
is just another own key in both the urlencoded and multipart paths.

Refs: GHSA-g86h-3r98-qm66
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A key the request did not send was looked up through the prototype, so
@query('constructor') resolved to Object.prototype.constructor rather
than undefined, and the same held for @Body, @PARAM, @Header, @cookie
and picked key lists.

Read through hasOwnProperty. Headers still look up the lower-cased
name.

Refs: GHSA-g86h-3r98-qm66
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The fetch path took secure from the request URL's scheme only, so Deno
and Bun behind a TLS-terminating proxy reported ctx.protocol 'http'
and never sent HSTS, while Node read X-Forwarded-Proto under
trustProxy.

Mirror Node's deriveSecure on the fetch path, for both handled requests
and health probes.

Refs: GHSA-g86h-3r98-qm66
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Segments are split before they are decoded, so /files/..%2F..%2Fetc
gives name = '../../etc', and a catch-all can hold a/../../etc/passwd.
That matches Express and is right for ids and slugs, but a handler that
builds a filesystem path from a param can be walked out of its
directory. Say so where routing is described, with the two ways to
guard it. No behaviour change.

Refs: GHSA-g86h-3r98-qm66
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Test clients connect to 127.0.0.1, but listen(0) with no host binds ::,
and five tests bound 127.0.0.1 explicitly. On macOS a :: bind and a
127.0.0.1 bind are different sockets, so the OS can give a test server
on :: a port another socket already holds on 127.0.0.1: another test
file running in parallel, or another process. The client then reaches
that one, and a fresh server "answered" 404, 403 or "Not yet
implemented".

A 127.0.0.1 bind is never given a port already taken on 127.0.0.1, and
as the more specific bind it receives the traffic. A vitest setup file
now supplies that host when a test server names none, and a guard test
fails if it stops applying. With a host, Node resolves it before
binding, so the nine ws test servers that read their port right after
construction now wait for 'listening'. The T8 membership load test
gets a 15s budget instead of the 5s default.

Two full-suite loops in parallel: 8 failures in 60 runs before, 0
after. Binding everything to :: instead (tried first) still failed 1
in 30, against sockets outside the suite.

Closes #59

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
stage.yml refused any version without a pre-release suffix, because
staging unpublishes and republishes the version it stages. That left
the first stable release, the one most worth trying first, unable to
go through Verdaccio.

Verdaccio is a private registry used only to try a release before the
public one, and nothing depends on a version there staying put, so
overwriting a stable number costs nothing. Drop the guard.

Closes #72

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The README let a breaking change ship in any monthly release after a
two-release deprecation. Under CalVer YY.M.PATCH npm reads the year as
the major version, so the default ^26.12.0 range accepts every 26.x
month, removals included.

After stable, breaking changes ship only in the first release of a
year (YY.1.0). A deprecated API still works for at least two monthly
releases, then waits for the next YY.1.0. A security fix that cannot be
made without breaking an API is the one exception. CONTRIBUTING says
the same for pull requests.

Closes #75

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
SECURITY.md promised a real table once stable shipped. The latest
monthly release gets bug and security fixes; the one before it gets
security fixes for three months after the latest ships, as patch
releases; nothing older is supported, and features are never
backported. Pre-releases: only the latest. Kept small on purpose, for a
one-person project. The README's Versioning section links it.

Closes #74

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The own-key fix (GHSA-g86h-3r98-qm66) added a second closure to
resolveOne, which runs for every decorated argument of every request.
An A/B against develop measured param at -3.4% and 'param, 50 routes'
at -6.3% with non-overlapping ranges.

Move the lookup into a module-level ownKey(values, key, lowerCase), so
resolveOne allocates nothing per call. Re-measured with 5 rounds: param
+0.9%, 'param, 50 routes' +2.5%, 'param, 200 routes' -0.4%, validate
-1.3%, all overlapping; an A/A run on develop spans -1.3% to +0.6%.
Measured on Node only; Deno and Bun share the code but were not run.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bus.emit swallowed a listener's throw or rejection without a trace, so
a broken metrics or logger plugin went silent and nothing said why.

createApp now registers a reporter for the bus it builds, and the
first failure of each listener is warned through app.logger with the
event name; later failures of the same listener stay quiet. The
reporter lives in a WeakMap inside bus.ts, outside the public barrel,
so the exported Bus type and the API report are unchanged. The success
path of emit is untouched.

Closes #77

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
limits.maxConnections and the request, headers and keep-alive timeouts
apply only to Node's listen(). serveDeno, serveBun and edgeHandler
ignored them silently, which the cross-repo rules call a bug.

The app records which of them it was given, under a symbol like
TLS_REQUESTED, and each of the three adapters warns once through
app.logger, naming them. Nothing is mapped: Bun's idleTimeout is not
equivalent to any of the three. Tested on Node (edgeHandler), Deno and
Bun; the API report is unchanged.

Closes #76

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Both stream loops raced the source's next() against the connection's close
with Promise.race. Each call leaves a reaction on the close promise that is
freed only when the client disconnects, so a long-lived SSE or ndjson stream
grew the heap with every event: the new soak job measured ~0.4 MB/s on a
1 kHz stream (heap 20 -> 41 MB in 90 s), and flat at 12.7 MB with this fix.

raceUntil(stop) keeps a single reaction on stop and settles the one call in
flight. Same semantics: the value, undefined once stop resolves, stop's
reason if it rejects. Used by pipeStream (Node: next() and the drain wait)
and asReadableStream (Deno, Bun, edge). No API change.

Bench on jarvis (Node 22 in Docker, cpuset 6,7,14,15, bench/compare.ts,
5 rounds x 10 s, 100 connections), against the parent commit:
  sse 100 events          3,508 -> 4,264 req/s  +21.5%
  sse 100 events + gzip     410 ->   426 req/s   +4.0%
A/A on the same box: -1.1% and +0.2%, ranges overlapping. A first version
that wrapped the resolvers in a closure per call measured -6.4%; this one
hands them to then() directly. Deno, Bun and the edge (asReadableStream)
were not benchmarked.

Found by #80.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
channel() buffered without limit per subscriber, so a slow SSE client on a
busy channel or room grew server memory without bound. The default is now
1024, dropping the oldest, as an explicit { buffer } already did;
{ buffer: Infinity } keeps the old behaviour.

WebSocket inbound channels pass Infinity explicitly: they are bounded per
frame by boundInbound (#107), and dropping a client's frame silently would
be wrong. Behaviour change, no API change.

Closes #82

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
/__graph__ loaded Cytoscape, dagre and cytoscape-dagre from jsDelivr with no
integrity check. Each script now carries a sha384 integrity attribute and
crossorigin="anonymous".

/__ready__ listed degraded provider names in its public body. It now answers
{"status":"degraded"}; the names stay in the boot warning and app.degraded().

The router parity test pins a sha256 of the graph page captured at ed47836.
It now hashes the page with the SRI attributes removed, so it still pins the
rest of the page against the original capture without regenerating it.

Behaviour change for a probe client that read "degraded". No API change.

Closes #83

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
- A preStop sleep, terminationGracePeriodSeconds and readiness probe
  settings next to health.drainDelayMs, since an endpoint stays in rotation
  for a few seconds after the pod is told to stop (#81).
- compression: a response that reflects input next to a secret leaks it
  under BREACH; leave such routes uncompressed (#84).
- matcha is released with core since RC.1, not on its own version line (#84).

Closes #81
Closes #84

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
A tag on a commit that never passed CI still published: prepublishOnly runs
lint, complexity, typecheck, the Node tests and the build, but not
format:check, api:check or the Deno, Bun and edge suites, and main has no
required status checks. release.yml now runs all of them before either
registry is touched, so the publish no longer depends on branch settings.

npm was npm@latest right before a permanent publish; it is pinned to
11.21.3 (>= 11.5.1 for OIDC trusted publishing).

Requiring the CI checks on main as well is a repository setting, left to
the owner.

Refs #78

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Adds @vitest/coverage-v8 (dev only, matching vitest 4.1.12) and
`npm run coverage`. CI's build job runs it in place of `npm test`, so the
summary is in every log; there is no threshold yet.

Baseline on 2026-11-20 (Node suite, src/**/*.ts):
statements 94.55%, branches 89.68%, functions 93.87%, lines 95.57%.
The Deno, Bun and edge suites run outside vitest and are not counted.

Closes #79

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
`npm run soak` drives the built app for SOAK_SECONDS (default 120): autocannon
on a JSON route, SSE and WebSocket connections opened and dropped in a loop,
and an SSE subscriber on a busy channel that never reads. It samples RSS,
heap (after gc) and handles every 5 s, then sends SIGTERM under load.
It fails on heap growth between the first and last third (> 25% and
> 8 MB), an unhandled rejection, a non-2xx, or a close() that does not
exit 0 within 20 s. Nightly and on demand in soak.yml (300 s).

Its first 90 s run failed on a real leak, fixed earlier on this branch:
heap 20 -> 41 MB with Promise.race per stream event, flat at 12.7 MB after.

Closes #80

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
.specs/ is gitignored in this repository, so the baseline written there was
local only. It now lives next to the other pre-PR checks.

Refs #79

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The A/B harness had no stream case, so a change to the per-event loop could
not be measured (#26). One request is a finite stream of 100 SSE events, so
req/s is events/s / 100. The gzip case takes the compressed frame sink.

Refs #26

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Releases are cut and published from GitHub only. Gitea receives a copy of
main and its tags afterwards; nothing flows from Gitea to GitHub.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
AB_RUNTIME=deno|bun boots both sides' compare servers on that runtime,
through its own adapter (serveDeno/serveBun, the fetch path), while the
harness stays on Node. Until now the A/B only measured node:http, so a
change to the fetch path had no regression check.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
(cherry picked from commit 94751f979d6910e58c9840624760ce8649ab357b)
Serves a 2 KB file through createApp({ static }), so the per-request path
checks (dotfiles, traversal) are measured on Node, Deno and Bun.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
…sponse

The #71 fix wrapped every Bun response in a .then that read content-type and
ran a regex, to find the few that are streams. On jarvis that cost 2-4% on
Bun's buffered routes (rc.1 -> rc.2: pipeline -4.3%, param 200 routes -3.4%,
steps5 -2.9%); without the .then those routes recovered +1.8% to +3.6%.

The stream branch of app.fetch now calls keepStreamOpen(request), which
lifts the timeout through the server serveBun already records per request
for ctx.ip. Only stream responses pay, and nothing else changes: the #71
Bun test (a quiet SSE stream past idleTimeout) still passes.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Gitea is now an archive of main and its tags, so nothing pushes a tag there to
stage a release, and stage.yml could no longer run. Removed with its test;
AGENTS.md now says the GitHub tag is the publish and to run test:all on the
tagged commit first. release.yml already gates JSR with a dry run before npm.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bump package.json, deno.json, the lockfile, VERSION and its API report, and close the
CHANGELOG section. Ships the fixes for nine security advisories found in an audit of
26.11.0-rc.1, plus the Stable milestone fixes (#59, #70-#84 except #78's branch setting).

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
@chrnx-dev
chrnx-dev merged commit af3ea74 into develop Nov 23, 2026
5 checks passed
@chrnx-dev
chrnx-dev deleted the release/26.11.0-rc.2 branch November 23, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment