Files
ruflo/v3/@claude-flow/security/__tests__
ruv d77ecbe0bd fix(security): migrate input-validator to zod ^4.6.7 (GHSA-mrhx-c7xc-m3w5)
zod < 4.6.6 can exhaust memory while validating oversized constrained
collections (high severity). @claude-flow/security declared zod ^3.22.0,
so every consumer of it (memory, hooks, codex, federation and the cli
bundle) carried a vulnerable zod. A fresh `npm i @claude-flow/memory@3.2.4`
reports 3 high findings via @claude-flow/security -> zod 3.25.76.

API changes handled:
- z.setErrorMap(fn(issue, ctx)) -> z.config({ customError }), with
  invalid_string/validation becoming invalid_format/format. Messages given
  to a check still take precedence; undefined falls back to zod's default.
- z.string().ip({version}) -> z.ipv4() / z.union([z.ipv4(), z.ipv6()]),
  keeping the messages.
- z.record(value) -> z.record(z.string(), value).
- SafeParseReturnType/ZodSchema -> ZodSafeParseResult/ZodType.

The workspace lockfile also drops zod 4.3.5 (vulnerable). Version 3.0.7,
and the cli and claude-flow pins move to 3.0.7. Publishing
@claude-flow/security only; the cli and claude-flow ride the release lane.

Tests: the existing 631 pass. input-validator-zod4.test.ts pins the
installed zod at >= 4.6.6, the IP schemas, message precedence, the global
map and the record schemas.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 21:11:43 -05:00
..
2026-01-04 17:40:48 +00:00