Skip to content

fix(deps): require zod ^4.6.6 in core and mcp for GHSA-mrhx-c7xc-m3w5 - #330

Merged
mbeacom merged 1 commit into
mainfrom
fix/zod-floor-4-6-6
Oct 25, 2026
Merged

mbeacom merged 1 commit into
mainfrom
fix/zod-floor-4-6-6

Conversation

@mbeacom

@mbeacom mbeacom commented Oct 25, 2026

Copy link
Copy Markdown
Owner

What and why

#329 moved this repository's lockfile to zod 4.6.7, which turned the audit gate green. But @adrkit/core and @adrkit/mcp still declare zod: ^4.6.5. A consumer whose tree already holds 4.6.5 keeps the release affected by GHSA-mrhx-c7xc-m3w5, which says validating oversized constrained collections can exhaust memory. Raising the floor to ^4.6.6 keeps every install of the next lockstep release off it.

  • packages/core, packages/mcp, the root workspace, and bun.lock's three workspace specs: ^4.6.5 → ^4.6.6. The resolved zod is still 4.6.7.
  • site/bun.lock: the docs site's own lockfile resolved zod 4.6.5 through Astro. I changed only that entry, to 4.6.7, and left Astro's range alone.
  • CHANGELOG.md: a ### Security entry under Unreleased, so this goes out with the next lockstep release.

Checklist

  • Commits are DCO signed off.
  • No recorded decision changes. ADR-0043 names ^4.6.5 as history, so I left it as is.
  • The schema is unchanged: the resolved zod doesn't move, so schema/adr.schema.json is byte-identical.
  • packages/ci/dist doesn't need regenerating: check:clean-clone passes with no diff.
  • No new behavior to test.
  • build, typecheck, lint, audit:gate, check:changelog, check:clean-clone, and the full suite (4544 pass, 2 skip, 0 fail) pass. The site builds 72 pages.

Notes for reviewers

The site's bun audit still lists two high advisories, both in build-time dependencies: undici 8 through Astro (GHSA-xjj6-f33q-929c) and launch-editor through Vite (GHSA-587h-7wmj-h5pm). Neither ships in any package, and the required audit gate doesn't cover the site. I've left them for a separate site dependency pass rather than widening this one.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped dependency requirements, lockfile changes, and release notes are consistent, with no blocking defects identified.

No open issues 🎉

What changed in this PR

Completes #329’s dependency hardening by raising the Zod minimum for future published installs, rather than relying only on the repository lockfile.

Changes:

  • Raises core, MCP, and root workspace requirements to zod ^4.6.6, with matching lockfile specifications.
  • Updates the documentation site’s resolved Zod to 4.6.7.
  • Adds an Unreleased security note explaining the consumer-facing protection.

Decision compliance was not independently verified because the adrkit MCP server was unavailable.

File Description
site/​bun.lock Updates Zod to 4.6.7 and its integrity hash.
packages/​mcp/​package.json Raises MCP’s Zod minimum to 4.6.6.
packages/​core/​package.json Raises core’s Zod minimum to 4.6.6.
package.json Aligns the root development dependency minimum.
CHANGELOG.md Documents the security fix under Unreleased.
bun.lock Aligns all three workspace dependency specifications.

Review effort: Balanced

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Decisions governing this change

8 accepted decisions govern this change

  • 0007 — Isolate integrations as optional adapters and build only against public surfaces
    • via path: packages/*/package.json
  • 0010 — Use Bun as the package manager and test runner while publishing Node-targeted artifacts
    • via path: package.json
  • 0011 — Host the canonical JSON Schema at its $id on adrkit.dev
    • via path: site/**
  • 0017 — Keep dependency audit scope explicit and release-scoped
    • via path: packages/*/package.json
  • 0018 — Adopt MCP SDK v2 and serve protocol revision 2026-07-28 dual-era
    • via path: packages/mcp/**
  • 0025 — Ship badges as recipes over existing output, not a new CLI surface
    • via path: package.json
  • 0030 — Keep extension surfaces that carry a dependency tree outside this repository
    • via path: package.json
  • 0043 — Publish schema v0.2.0 with RFC 3339 seconds, retain v0.1.0, and validate every record against the current schema
    • via package: zod

Links point at 6ec452c, this run's GITHUB_SHA. Run adr explain <path> locally to see why a file is governed.

@adrkit/mcp still declare ^4.6.5. A consumer whose tree already holds
4.6.5 keeps it. Raising the floor to ^4.6.6 excludes the only affected
release in range from every install of the next lockstep release.

The root workspace declaration and bun.lock's three workspace specs move
with it; the resolved zod is unchanged at 4.6.7, so packages/ci/dist and
schema/adr.schema.json do not change, and check:clean-clone passes.

The documentation site has its own lockfile and resolved zod 4.6.5
through Astro. I moved that single entry to 4.6.7 and kept Astro's range
untouched; the site builds (72 pages).

build, typecheck, lint, audit:gate, check:changelog, check:clean-clone,
and the full suite (4544 pass, 2 skip) pass.

Signed-off-by: Mark Beacom <m@beacom.dev>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency floors, lockfile updates, and release note are consistent, with no unresolved blocking findings.

No open issues 🎉

Review effort: Balanced

@mbeacom
mbeacom merged commit 2f406ad into main Oct 25, 2026
18 checks passed
@mbeacom
mbeacom deleted the fix/zod-floor-4-6-6 branch October 25, 2026 16:33
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