From 5231a90178c592df1fdabe2daff488a012359f7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 15:32:21 +0000 Subject: [PATCH 1/2] build(deps): Bump zod from 3.25.76 to 4.6.7 Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.6.7. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v3.25.76...v4.6.7) --- updated-dependencies: - dependency-name: zod dependency-version: 4.6.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- agent-service-api/package.json | 2 +- backend/package.json | 2 +- package-lock.json | 14 +++++++------- packages/config/package.json | 2 +- packages/types/package.json | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/agent-service-api/package.json b/agent-service-api/package.json index 6f983fe..2d53ff7 100644 --- a/agent-service-api/package.json +++ b/agent-service-api/package.json @@ -27,7 +27,7 @@ "express": "^4.21.2", "handlebars": "^4.7.10", "jsonpath-plus": "^10.3.0", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/cors": "^2.8.17", diff --git a/backend/package.json b/backend/package.json index d5abfbd..7323bc1 100644 --- a/backend/package.json +++ b/backend/package.json @@ -27,7 +27,7 @@ "cors": "^2.8.5", "express": "^4.21.2", "uuid": "^11.1.0", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/cors": "^2.8.17", diff --git a/package-lock.json b/package-lock.json index 41af1d6..73fbf78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "express": "^4.21.2", "handlebars": "^4.7.10", "jsonpath-plus": "^10.3.0", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/cors": "^2.8.17", @@ -92,7 +92,7 @@ "cors": "^2.8.5", "express": "^4.21.2", "uuid": "^11.1.0", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/cors": "^2.8.17", @@ -13957,9 +13957,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -13982,7 +13982,7 @@ "name": "@ibm-vibe/config", "version": "1.0.0", "dependencies": { - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "typescript": "^5.7.3" @@ -13992,7 +13992,7 @@ "name": "@ibm-vibe/types", "version": "1.0.0", "dependencies": { - "zod": "^3.25.76" + "zod": "^4.6.7" }, "devDependencies": { "typescript": "^5.7.3" diff --git a/packages/config/package.json b/packages/config/package.json index 6fb7ef9..607892d 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -9,7 +9,7 @@ "prepare": "npm run build" }, "dependencies": { - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "typescript": "^5.7.3" diff --git a/packages/types/package.json b/packages/types/package.json index 2a312fc..198088b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -23,6 +23,6 @@ "typescript": "^5.7.3" }, "dependencies": { - "zod": "^3.25.76" + "zod": "^4.6.7" } } From e48a5ea575b157fa1f8799e8e69f26e696f5fbb4 Mon Sep 17 00:00:00 2001 From: Zvonimir Fras Date: Tue, 3 Nov 2026 15:25:18 -0500 Subject: [PATCH 2/2] fix(types): adapt to zod 4 API changes (#CVE-2023-54404) z.record now requires an explicit key schema, and required_error/invalid_type_error were replaced by the error option. Signed-off-by: Zvonimir Fras --- backend/src/routes/conversations.ts | 7 +------ packages/types/data-transfer.ts | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/backend/src/routes/conversations.ts b/backend/src/routes/conversations.ts index c856fbe..ae1a103 100644 --- a/backend/src/routes/conversations.ts +++ b/backend/src/routes/conversations.ts @@ -26,12 +26,7 @@ const router = Router(); const createConversationBodySchema = z .object({ - name: z - .string({ - required_error: 'Name is required', - invalid_type_error: 'Name is required' - }) - .min(1, 'Name is required') + name: z.string({ error: 'Name is required' }).min(1, 'Name is required') }) .passthrough(); diff --git a/packages/types/data-transfer.ts b/packages/types/data-transfer.ts index 3bf4ba7..df6d828 100644 --- a/packages/types/data-transfer.ts +++ b/packages/types/data-transfer.ts @@ -118,16 +118,18 @@ export const importResolutionSchema = z.object({ new_version: optionalStringSchema }); -export const importResolutionMapSchema = z.record(importResolutionSchema).superRefine((resolutions, ctx) => { - for (const [itemKey, resolution] of Object.entries(resolutions)) { - if (resolution.item_key !== itemKey) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: `Resolution key ${itemKey} must match item_key` - }); +export const importResolutionMapSchema = z + .record(z.string(), importResolutionSchema) + .superRefine((resolutions, ctx) => { + for (const [itemKey, resolution] of Object.entries(resolutions)) { + if (resolution.item_key !== itemKey) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: `Resolution key ${itemKey} must match item_key` + }); + } } - } -}); + }); export const analyzeImportRequestSchema = z.object({ bundle: exportBundleSchema,