Skip to content

Upgrade Zod to fix collection validation advisory - #189

Merged
sgasser merged 2 commits into
mainfrom
upgrade-zod-security-fix
Nov 8, 2026
Merged

sgasser merged 2 commits into
mainfrom
upgrade-zod-security-fix

Conversation

@sgasser

@sgasser sgasser commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Zod 3.25.76 is affected by GHSA-mrhx-c7xc-m3w5, which can exhaust memory while validating oversized constrained collections. Upgrade to Zod 4.6.7 and preserve existing configuration defaults, Anthropic tool records, and validation-error handling through the required Zod 4 compatibility changes.

Added regression coverage for omitted configuration sections and masking API error paths. The upstream patch rejects oversized collections before parsing elements when a schema declares an upper bound; existing unbounded request collections retain their current behavior.

The Test & Lint job now runs in the same digest-pinned Bun image as the production Docker build. This removes the Bun release download step, which repeatedly failed with HTTP 504 before checks could run.

Validation:

  • bun test: 515 passed; one optional Postgres integration test skipped.
  • Ran both typechecks, lint, and the full test suite successfully in the exact pinned Bun image on linux/amd64; actionlint .github/workflows/ci.yml also passed.
  • bun run typecheck, bun run typecheck:benchmarks, bun run check, and bun run build: passed.
  • Built the production Docker image on linux/arm64; 19 live checks passed with its real in-container GLiNER detector and local HTTP provider fixtures. Verified normal supervisor startup, nonroot execution, Docker health, installed Zod, masking/restoration, streaming, tool records, and validation errors. Hosted LLM inference was not exercised.

Application changes reviewed with sol-loop: 1 round with GPT-6.1 Sol on high effort. Sol verdict: approved; no findings.

@sgasser
sgasser enabled auto-merge (squash) November 8, 2026 09:31
@sgasser
sgasser merged commit f6fa4e5 into main Nov 8, 2026
3 checks passed
@sgasser
sgasser deleted the upgrade-zod-security-fix branch November 8, 2026 09:59
@sgasser sgasser mentioned this pull request Nov 8, 2026
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.

1 participant