Skip to content

fix(deps): take the fixed releases behind open security advisories - #5054

Merged
yannickmonney merged 3 commits into
mainfrom
fix/dependency-advisories
Oct 26, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
fix/dependency-advisories

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Security workflow's two gates (bun audit --prod --audit-level=high, and Trivy at fixable HIGH and CRITICAL) fail on every pull request and on main's scheduled run (2026-10-26 03:22Z). CI ready (Security) is required, so nothing can enter the merge queue. Renovate opened one pull request per advisory, but each still fails the gates on the advisories the others fix, so none can land on its own. This takes the fixed releases together, and migrates zod to 4.6.6 without changing what a caller sees.

Package From → to Advisories
dompurify 3.4.16 → 3.4.17 GHSA-cg2g-xh64-v4q7 (critical), GHSA-mrv2-3pqr-j5jr (high)
undici 7.29.1 → 7.30.1 GHSA-xjj6-f33q-929c (high)
zod 4.3.6 → 4.6.6 GHSA-mrhx-c7xc-m3w5 (high); better-auth's nested 4.6.5 copies (^4.5.4) deduplicated onto 4.6.6
vite 8.0.16 → 8.1.6 GHSA-587h-7wmj-h5pm (high)
follow-redirects (override) 1.16.0 → 1.16.1 GHSA-q3jh-wrc6-jgq8, GHSA-8r9p-f939-6h3c (high)
storybook, every @storybook/* 10.3.5 → 10.6.2 CVE-2026-114125 (critical), CVE-2026-114126 (high); the addons move in lockstep with the core

Supersedes #5021, #5022, #5023, #5024, #5025, #5048 and #5051. The moderate and low advisories (fast-uri, hono, ip-address, nodemailer, happy-dom) don't fail a gate and stay with their own pull requests.

zod 4.6

The only zod release that fixes the advisory changes behaviours Tale is built on. Unpatched, it failed 5 platform tests and 36 CLI tests, and in the merge queue 2 integration checks.

  • Patched back to 4.3.6's behaviour (patches/[email protected]; patches/README.md says why, what, the proof, and when to remove it):
    • String caps count Unicode code points since 4.5. Tale documents every cap in UTF-16 code units ("most emoji count as 2") in the API reference, the MCP page and its refusals, and its domain checks measure the same unit. Switching zod alone would have the API count two ways at once.
    • A schema's own error map phrases its checks' issues ahead of the parse call's map since 4.5. The doors parse with houseIssueMessage, and about 300 schema-level errors are meant for their type alone. Example: list_runs with limit: 0 answered "must be a whole number" instead of "must be at least 1".
    • toJSONSchema folds anyOf of bare types into a type array since 4.5. That rewrote ten nullable fields the MCP endpoint advertises and its contract fingerprint. A dependency upgrade should not change the published contract; moving to type arrays is an API_CONTRACT_VERSION decision of its own. OpenAPI renders for openapi-3.0, which zod never folds.
    • Since 4.4 an object refuses a missing key unless its schema is optional on input, even when the schema takes undefined: z.unknown(), z.any(), .or(z.undefined()), an unchecked z.custom() (colinhacks/zod#5661). Tale reads such keys as possibly missing, for example an automation save's document and a connector action's input and caller. The merge queue caught this one: the integration check's reader of a shared chat refused the snapshot, whose messages leave an empty blockedReason and error out.
  • Also: the CLI's native provider policy (prefix, generateClientId, generateClientSecret) and break-glass password checks say .optional() where the key may be absent, which reads the same with the patch and without it. The other "potentially breaking" fixes of 4.4 to 4.6 are taken as they come.
  • Proof: packages/shared/src/schemas/zod-patch.test.ts states the four patched behaviours. Its 4 cases fail on unpatched 4.6.6 and pass patched. The platform and CLI suites that failed pass again, and so does the integration lane. Run side by side, 848 object-key cases parse alike on 4.3.6 and on patched 4.6.6: 53 key schemas; absent, undefined, null and a string; plain, loose, strict and catchall objects; sync (the compiled parser) and async (the interpreted one).

Checklist

  • bun run check: locally turbo run typecheck lint passes, 32 of 32 tasks, on the bumped dependencies. The unit suites run in this pull request's CI. Locally I ran the suites listed below, the platform's test:ui (queue-only): 8,376 of 8,377 pass. The one failure, product-edit-dialog.test.tsx, was a 5 s timeout at a load average of 30, and the file passes 15 of 15 on its own.
  • bun run lint:sast: N/A for the manifests and the patch; the two CLI source edits only add .optional(), and CI's Opengrep runs on the head.
  • Translations: N/A, no user-visible string changes.
  • Docs: N/A, no behaviour or setting changes; patches/README.md records the patch.
  • README.md / README.de.md / README.fr.md: N/A.

Test plan

  • bun audit --prod --audit-level=high (bun 1.4.2, the CI pin): "No vulnerabilities found (checked 1389 packages, 11 below --audit-level=high)".
  • trivy fs --scanners vuln --severity HIGH,CRITICAL --ignore-unfixed --ignorefile .trivyignore.yaml . (Trivy 0.71.1): exit 0.
  • turbo run typecheck lint over every workspace: 32 of 32 pass.
  • The zod fallout, after the patch:
    • @tale/platform: 617 of 617 over lib/mcp, backend/domains/mcp and backend/rest/shared.test.ts. The MCP snapshot and fingerprint are unchanged, the house words are back, and an emoji counts 2.
    • @tale/cli: the whole suite, 3,828 of 3,829. The other one, tests/smoke-fixture.test.ts, fails only under an AI agent: it reads a passing test's name from a nested bun test, which bun leaves out when CLAUDECODE is set. Without it, the file passes 2 of 2.
    • @tale/shared: the whole suite, 1,054 of 1,054, with zod-patch.test.ts 4 of 4 (0 of 4 on unpatched 4.6.6).
    • Backend integration, ITEST_LANES=checkChatThreadSurface against a tale-db built from services/db: 105 of 105, the two share-link checks included.
    • The committed patch applies to a clean zod 4.6.6, and bun install --frozen-lockfile is clean.
  • Browser, locally: @tale/ui passes. @tale/platform 689 of 690; the other was a click that timed out in automation-editor.browser.test.tsx while a Docker build ran beside it, and the file then passed 27 of 27 three times on its own.
  • storybook:build, locally: 4 of 4. The web package's CSF warnings are the same on 10.3.5 and 10.6.2 (4 warnings, 18 entries).
  • undici 7.30.1 under the network code: feat(platform): reach other websites through a round-robin proxy pool #5053 (the outbound proxy pool, which reads undici's proxy errors) was merged onto this head in a throwaway branch. @tale/platform then passed 593 of 593 over lib/net (including safe-fetch-proxy.test.ts against real local proxies), ytdlp.test.ts, env.test.ts, crawl-parse.test.ts, the image proxy and website domains, and two guards. @tale/shared src/net passed 58 of 58, and @tale/sandbox egress-proxy-config.test.ts 43 of 43. That run was on the first commit, before the zod patch.
  • The lockfile changes only the bumped packages and what they pull in (rolldown 1.0.3 → 1.1.5 under vite; storybook's own oxc parser and resolver).

Merge queue

The first queue run (on bf560ce) passed Security, SAST, Commitlint, CLI, E2E and Build. Checks failed on two jobs:

  • Backend integration: 2,328 of 2,330. The two share-link checks are the absent-key change above, now patched.
  • Browser: one check in @tale/ui, workflow-canvas.run.browser.test.tsx "highlights the paths through No when a pointer rests on its label". After the pointer left the label, the line stayed quiet past waitFor's 1 s. The file passed 15 of 15 five times locally on this head. It is the only Browser failure among the last 47 push and queue runs, so I can't rule out vite 8.1.6 entirely; the next queue run is the check. Turbo stopped the platform's browser task when this one failed, so that suite ran only locally (above).

The second queue run (on dfee3ca, merged as 890656c9e) passed all seven workflows. Within Checks, Browser (both suites) and Backend integration passed too.

The Security workflow's two gates (bun audit --prod at high, Trivy at
fixable HIGH and CRITICAL) fail on every pull request and on main's
scheduled run since advisories were published for packages Tale pins.
Renovate opened one pull request per advisory, but each fails the same
gates on the others, so none can land alone. This takes the fixed
releases together:

- dompurify 3.4.16 to 3.4.17 (GHSA-cg2g-xh64-v4q7, GHSA-mrv2-3pqr-j5jr)
- undici 7.29.1 to 7.30.1 (GHSA-xjj6-f33q-929c)
- zod 4.3.6 to 4.6.6 (GHSA-mrhx-c7xc-m3w5), with better-auth's nested
  4.6.5 copies deduplicated onto it
- vite 8.0.16 to 8.1.6 (GHSA-587h-7wmj-h5pm)
- follow-redirects 1.16.0 to 1.16.1 (GHSA-q3jh-wrc6-jgq8,
  GHSA-8r9p-f939-6h3c)
- storybook 10.3.5 to 10.6.2 (CVE-2026-114125, CVE-2026-114126), with
  every @storybook/* package moved in lockstep

It supersedes Renovate's #5021, #5022, #5023, #5024, #5025, #5048 and
#5051. The moderate and low advisories (fast-uri, hono, ip-address,
nodemailer, happy-dom) stay with their own pull requests.
zod 4.6.6, the release that fixes GHSA-mrhx-c7xc-m3w5, changed three
behaviours Tale builds on: a string cap counts code points instead of
UTF-16 code units, a schema's own error map phrases the issues its checks
raise ahead of the parse call's map, and toJSONSchema folds an anyOf of
bare types into a type array, which rewrote ten nullable fields the MCP
endpoint advertises. A patch keeps all three as 4.3.6 had them;
patches/README.md says why and when it goes, and a proof test fails on
unpatched 4.6.6.

zod 4.4 also made an object key typed z.undefined() required, so the
CLI's provider policy and break-glass checks mark the keys that may be
absent .optional().
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
Since 4.4 zod refuses an object key that is left out unless its schema
is optional on input, even when the schema takes undefined: z.unknown(),
z.any(), .or(z.undefined()) or an unchecked z.custom(). 4.3.6 let such a
key be absent, and Tale reads keys like these as possibly missing: the
document of an automation save or check, the input and caller of a
connector action. The merge queue's integration check showed it: its
reader of a shared chat refused the snapshot, whose messages leave an
empty blockedReason and error out.

The patch now judges an absent key as 4.3.6 did, in the interpreted and
the compiled object parser of each build zod ships, and the proof test
states it.
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 890656c Oct 26, 2026
64 checks passed
@yannickmonney
yannickmonney deleted the fix/dependency-advisories branch October 26, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant