Skip to content

fix(deps): upgrade zod to 4.6.7 and body-parser to 2.4.0 for audit - #108

Merged
wang2 merged 1 commit into
mainfrom
claude/project-thread-mzo0t5
Oct 27, 2026
Merged

wang2 merged 1 commit into
mainfrom
claude/project-thread-mzo0t5

Conversation

@wang2

@wang2 wang2 commented Oct 27, 2026

Copy link
Copy Markdown
Member

Requested by Shuoh · project thread

Summary

bun audit currently fails on main (and therefore on #107) because of two new high advisories:

  • GHSA-mrhx-c7xc-m3w5: zod < 4.6.6. Pinned zod goes from 3.25.76 to 4.6.7 in shared, telegram-renderer-mcp, and session-control-mcp.
  • GHSA-27r3-jxmh-p828: body-parser >=2.0.0 <2.4.0, pulled in through @modelcontextprotocol/sdk → express. The lockfile now has 2.4.0.

Zod 4 keeps a key required in the inferred output type when its transform can return undefined, which broke typecheck in progress-disclosure.test.ts. hook-contract.ts now wraps the exported hook input types to restore the Zod 3 optional-key shape. This is a type-only change. The schemas, .strict() rejection of extra keys, and required template fields behave the same at runtime; I spot-checked this by parsing payloads with both versions.

The checked-in worker bundles do not change. Rebuilding them with the pinned Bun 1.3.14 gives byte-identical output.

Verification

  • bun install --frozen-lockfile
  • bun run check: typecheck, python:compile, bundle:check (Bun 1.3.14), privacy:scan, and version:check pass. Locally, 4 artifact-delivery TS tests and 10 Python tests fail identically on unmodified main, because the sandbox runs as root and those tests refuse to run as root. CI is the authoritative run.
  • bun audit: no vulnerabilities
  • No credentials, chat IDs, transcripts, or deployment-specific paths added
  • Security/failure semantics updated where relevant (n/a)
  • Documentation and examples updated (CHANGELOG)

Delivery impact

  • No runtime behavior change

Rollback

Revert this commit. That restores zod 3.25.76 and body-parser 2.3.0, and with them the audit failure.


Generated by Claude Code

bun audit fails on GHSA-mrhx-c7xc-m3w5 (zod <4.6.6) and
GHSA-27r3-jxmh-p828 (body-parser 2.x <2.4.0). Pin zod 4.6.7 in all
three workspaces and refresh the locked body-parser. Zod 4 keeps keys
whose transform may yield undefined required in the inferred type, so
the hook contract restores the previous optional-key output shape;
runtime validation is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XRf7b6xrnvwdG56Y8NrGFD
@wang2 wang2 self-assigned this Oct 27, 2026
@wang2
wang2 marked this pull request as ready for review October 27, 2026 13:36
@wang2
wang2 merged commit 4f1ecab into main Oct 27, 2026
2 checks passed
@wang2
wang2 deleted the claude/project-thread-mzo0t5 branch October 27, 2026 13:36
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.

2 participants