This repository was archived by the owner on Aug 13, 2026. It is now read-only.
fix: apply min/max modifiers to ZodNumber in secureZodParser - #6672
Open
Osamaali313 wants to merge 1 commit into
Open
fix: apply min/max modifiers to ZodNumber in secureZodParser#6672Osamaali313 wants to merge 1 commit into
Osamaali313 wants to merge 1 commit into
Conversation
applyModifiers handled .min()/.max() for ZodString and ZodArray but not ZodNumber, so numeric bounds in a user schema (e.g. z.number().min(0).max(100)) were silently discarded and out-of-range values passed validation. The sibling `int` case already branches on ZodNumber, confirming numeric modifiers are meant to apply. Add the missing ZodNumber branch to both min and max.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
dblagbro
added a commit
to dblagbro/flow-wiser
that referenced
this pull request
Aug 12, 2026
upstream-archive/ preserves 347 open pull requests from FlowiseAI/Flowise, captured 2026-08-05 before the 2026-08-10 archive lock, as git am-able patches with original authorship intact. Three have been acted on -- FlowiseAI#6682 and FlowiseAI#6683 (CVEs, with anupamme preserved as commit author) and FlowiseAI#6706 (connect-sqlite3). The other 344 have never been reviewed. MANIFEST.md is explicit that the snapshot exists so the backlog stays "reviewable and re-appliable". It was captured, not fulfilled. Nothing was lost; nothing was gained either. These are the last contributions the upstream community will ever make to this codebase -- upstream is archived and will accept nothing further. They are Apache-2.0, they carry their authors' names, and Flow-Wiser exists as a continuation fork. They are also the cheapest fixes this project will ever get: 129 titles begin with "fix", already written and tested by someone else. Records the shape (129 fix / 173 feat / 5 security / 7 chore / 21 draft), the age skew toward 2026-06 and 2026-07 which suggests most still apply cleanly, and names the three unadopted security PRs as the place to start: FlowiseAI#6672, FlowiseAI#5371 and FlowiseAI#5255 -- contributor-authored hardening that the 116-advisory sweep would not have caught. Two constraints stated plainly. Fifteen patches are permanently incomplete: they touched enterprise/ or IdentityManager.ts, and 196 hunk bodies totalling 14,224 lines were redacted on 2026-08-06 because diff context carries licensed file fragments. They must not be reconstructed -- that is reading licensed content, which ADR-0002 forbids. And apply with --keep-non-patch so authorship survives; a contribution merged without its author's name is a contribution stolen. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SecureZodSchemaParser.applyModifiers(packages/components/src/secureZodParser.ts) applies.min()/.max()forZodStringandZodArray, but has noZodNumberbranch — so numeric bounds are silently dropped:A user schema like
z.number().min(0).max(100)therefore accepts out-of-range values (e.g.999,-50). This parser is used by the Structured Output Parser (Advanced) and Custom Tool nodes, so LLM structured output / tool arguments that the author explicitly bounded are passed through unvalidated. The siblingintcase already branches onZodNumber, confirming numeric modifiers are meant to apply.Repro (schema
z.object({ score: z.number().min(0).max(100) })): before,score: 999andscore: -50are accepted; after, they're rejected (too_big/too_small), while az.string().max(5)control already worked.Fix
Add the missing
ZodNumberbranch to bothminandmax:String/array bounds are unchanged. (There was no existing test file for
secureZodParser.ts; happy to add one if you'd like.)