Skip to content

fix(deps): integrate patched Zod and Typography parser - #150

Draft
sbc1-code wants to merge 5 commits into
mainfrom
fix/validation-security-review-20261024
Draft

sbc1-code wants to merge 5 commits into
mainfrom
fix/validation-security-review-20261024

Conversation

@sbc1-code

@sbc1-code sbc1-code commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Zod 3.25.76 accumulates an error for every invalid array element before applying a size limit; the current high advisory blocks the unchanged release gate. Use official Zod 4.6.7, and integrate the Typography-scoped postcss-selector-parser 6.1.5 backport reviewed in #149. No patched stable Zod 3.x release was found. This is an investigated major dependency change.

The branch retains the original #149 commit 81e6069b and the separate Zod candidate 27b4d1d3 as ancestors. Neither source branch is rewritten or closed. Current collector snapshots are preserved; only six dependency/test/runbook files differ from the integration base.

Compatibility review:

  • The only application schema consumer found is blog frontmatter, used by the index builder and two draft generators. No browser/API validation consumer was found in inspected code.
  • SDK 0.98.0 explicitly accepts Zod ^3.25.0 || ^4.0.0; the dependency graph resolves the same 4.6.7 instance. SDK and all other package versions stay unchanged.
  • Seven new CLI tests run the actual builder, both anomaly templates and the real SDK/client in temporary fixtures. SDK fetch is intercepted with synthetic responses and a dummy key, without inherited credentials or external LLM requests.
  • EN/ES mocked tool responses preserve forced draft/human-review flags. Invalid metadata retains flattened field diagnostics; missing tool responses write no draft. Builder draft exclusion and human-review publication gates remain enforced.
  • Five schema regressions preserve defaults, explicit values and validation boundaries. A controlled 10000-invalid-tag input produces one size issue, versus 10001 issues under the old version. All 36 checked-in posts retain identical normalized metadata.

Integrated validation:

  • Clean local npm ci, build and full npm test PASS: 148 unit tests, 416 browser navigations, including existing EN/ES mobile/desktop and missing/zero/stale-data regressions.
  • All 25 generated JS/CSS assets are byte-identical to baseline. Local entry JS 61.81/62 KiB gzip, CSS 19.09/20 KiB; budgets unchanged.
  • Exact-head remote CI also PASS: push40080729545 and PR40080745643, each 148 unit tests and 416 browser navigations. PR CI tested merge 16ab47bf4b05286fb6ee6c5688421146058cb5fe against main f5d7a2f1dc4b6a8dbf9fe5da75838f0ec6a2c70a. CI entry JS 61.99/62 KiB, CSS 19.11/20 KiB.
  • Current full audit: 2 moderate, 0 high/critical. Omit-dev: zero entries. The existing audit gate passes with no policy, accepted-advisory or threshold changes.

Sources and remaining limits:

This branch has not been deployed

No deployments
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