Files
ruflo/v3/@claude-flow/security/package.json
T
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

40 lines
1.1 KiB
JSON

{
"name": "@claude-flow/security",
"version": "3.0.7",
"type": "module",
"description": "Security module - CVE fixes, input validation, path security",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"README.md"
],
"exports": {
".": "./dist/index.js",
"./*": "./dist/*.js"
},
"scripts": {
"test": "vitest run",
"benchmark:policy": "npm run build && node scripts/benchmark-policy-engine.mjs",
"benchmark:product-plane": "npm run build && node scripts/benchmark-product-plane.mjs",
"test:oauth-surface": "vitest run __tests__/oauth-export-surface.test.ts __tests__/oauth-pkce.test.ts __tests__/oauth-browser.test.ts",
"build": "tsc && node scripts/verify-oauth-exports.mjs",
"prepare": "npm run build",
"prepublishOnly": "npm run build && npm run test:oauth-surface"
},
"dependencies": {
"@noble/ed25519": "^2.1.0",
"bcryptjs": "^3.0.3",
"zod": "^4.6.7"
},
"optionalDependencies": {
"@napi-rs/keyring": "1.3.0"
},
"devDependencies": {
"vitest": "^4.1.0"
},
"publishConfig": {
"access": "public"
}
}