Skip to content

fix(deps): zod 4.6.7 for GHSA-mrhx-c7xc-m3w5 - #208

Merged
acamarata merged 2 commits into
mainfrom
fix/zod-4
Oct 24, 2026
Merged

acamarata merged 2 commits into
mainfrom
fix/zod-4

Conversation

@acamarata

Copy link
Copy Markdown
Collaborator

What changed

  • frontend: zod ^3.24.1 -> ^4.6.7. Port (type-check drove it, then grepped for any-typed leftovers; none):
    • z.record(x) -> z.record(z.string(), x) (32 sites)
    • ZodError.errors -> .issues (110 sites in ~80 API routes and lib files)
    • createRefundSchema.innerType() -> createRefundSchema (refine no longer wraps the object)
    • lib/env/validator.ts: issue.received is gone in v4; "missing" is now detected from process.env[path] === undefined (the schema is parsed straight from process.env).
    • .uuid()/.email()/.url() left as is (deprecated, still work).
  • Root package.json override puppeteer-core floor >=25.9.0 -> >=25.13.0: the other zod 3 in the tree was chromium-bidi@17.0.2 (pinned by puppeteer-core 25.12, reached via @lhci/cli > lighthouse). puppeteer-core 25.16 uses chromium-bidi 157, which depends on zod ^4.6.5. eslint-plugin-react-hooks accepts zod 3 or 4, so it now resolves to 4.6.7. grep zod pnpm-lock.yaml shows only zod 4.6.7.
  • Second commit (separate, drop it if you prefer): body-parser overrides to 1.20.9 / 2.4.0. Both lines had a fresh high advisory (GHSA-27r3-jxmh-p828) that would keep the Security Gate red once zod was fixed.
  • Lockfile regenerated with pnpm 9.15.4, targeted diff (154 + 40 lines), overrides: block matches package.json.

Commands run (clean worktree off origin/main; TZ=America/New_York)

  • pnpm install --frozen-lockfile ok
  • pnpm audit --audit-level=high (frontend) exit 0; before: zod + 2x body-parser high.
  • pnpm type-check (frontend) exit 0 (baseline origin/main also 0)
  • eslint and prettier --check on the 82 changed files: clean
  • Full frontend jest (--maxWorkers=3, CI env vars): 652 suites passed, 56 skipped, 1 failed: src/app/api/__tests__/config.test.ts (5 s timeout on the first test of the file). It fails the same way on a clean origin/main worktree (which test times out varies), so it is pre-existing and unrelated.

Not run / left

  • Coverage gate, Lighthouse CI, Playwright a11y and pnpm build (next build) were not run locally; their failures on the Dependabot PR (chore(deps): bump zod from 3.25.76 to 4.6.6 #207) predate this and match the red gates tracked in hq debt D-1475. frontend-vite, packages/* and desktop have no zod imports.
  • Lighthouse CI now runs puppeteer-core 25.16 / chromium-bidi 157; I did not execute lhci autorun locally.

frontend moves to zod ^4.6.7. Port: z.record gets an explicit key schema,
ZodError.errors becomes .issues, createRefundSchema.innerType() is dropped
(refine no longer wraps the object), and the env validator no longer reads
issue.received. puppeteer-core override floor raised to 25.13 so the
lighthouse chain pulls chromium-bidi 157, which uses zod 4.
…visory

Both lines were flagged high by pnpm audit (reached through @lhci/cli express
and appium base-driver) and would keep the Security Gate red after the zod
bump. Override floors raised.
@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/zod ^4.6.7 UnknownUnknown
npm/body-parser 1.20.9 🟢 8
Details
CheckScoreReason
Dependency-Update-Tool🟢 10update tool detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 7Found 19/24 approved changesets -- score normalized to 7
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
Maintained🟢 1020 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Vulnerabilities🟢 100 existing vulnerabilities detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
SAST🟢 9SAST tool detected but not run on all commits
Packaging🟢 10packaging workflow detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
Fuzzing⚠️ 0project is not fuzzed
CI-Tests🟢 926 out of 28 merged PRs checked by a CI test -- score normalized to 9
Contributors🟢 10project has 33 contributing companies or organizations
npm/body-parser 2.4.0 🟢 8
Details
CheckScoreReason
Dependency-Update-Tool🟢 10update tool detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 7Found 19/24 approved changesets -- score normalized to 7
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
Maintained🟢 1020 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Vulnerabilities🟢 100 existing vulnerabilities detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
SAST🟢 9SAST tool detected but not run on all commits
Packaging🟢 10packaging workflow detected
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
Fuzzing⚠️ 0project is not fuzzed
CI-Tests🟢 926 out of 28 merged PRs checked by a CI test -- score normalized to 9
Contributors🟢 10project has 33 contributing companies or organizations
npm/chromium-bidi 157.0.8090-0 🟢 7.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dependency-Update-Tool🟢 10update tool detected
Vulnerabilities⚠️ 014 existing vulnerabilities detected
Packaging🟢 10packaging workflow detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 4branch protection is not maximal on development and all release branches
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
SAST🟢 4SAST tool is not run on all commits -- score normalized to 4
CI-Tests🟢 1015 out of 15 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 22 contributing companies or organizations
npm/content-type 2.1.0 🟢 7.4
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 5Found 17/30 approved changesets -- score normalized to 5
Maintained🟢 1010 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
SAST🟢 9SAST tool detected but not run on all commits
npm/devtools-protocol 0.0.1704951 🟢 4.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
Security-Policy⚠️ 0security policy file not detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Packaging🟢 10packaging workflow detected
npm/iconv-lite 0.7.3 UnknownUnknown
npm/legacy-javascript 0.0.4 🟢 7
Details
CheckScoreReason
Code-Review🟢 10all last 30 commits are reviewed through GitHub
Maintained🟢 1030 commit(s) out of 30 and 21 issue activity out of 30 found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no badge detected
Vulnerabilities🟢 10no vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
License🟢 10license file detected
Packaging⚠️ -1no published package detected
Token-Permissions⚠️ 0non read-only tokens detected in GitHub workflows
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Fuzzing⚠️ -1internal error: internal error: Client.Search.Code: Search.Code: GET https://api.github.com/search/code?q=github.com+GoogleChrome+lighthouse+repo%3Agoogle%2Foss-fuzz+in%3Afile+filename%3Aproject.yaml: 400 []
Dependency-Update-Tool🟢 10update tool detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
npm/puppeteer-core 25.16.0 🟢 8.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 10security policy file detected
Maintained🟢 1030 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
Dependency-Update-Tool🟢 10update tool detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 9dependency not pinned by hash detected -- score normalized to 9
License🟢 10license file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging🟢 10packaging workflow detected
Signed-Releases⚠️ -1no releases found
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 7SAST tool is not run on all commits -- score normalized to 7
Branch-Protection🟢 4branch protection is not maximal on development and all release branches
Fuzzing⚠️ 0project is not fuzzed
CI-Tests🟢 1030 out of 30 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 60 contributing companies or organizations
npm/qs 6.16.1 🟢 5.5
Details
CheckScoreReason
Maintained🟢 1028 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 3Found 10/28 approved changesets -- score normalized to 3
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices🟢 5badge detected: Passing
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/typed-query-selector 2.12.3 🟢 3.7
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/30 approved changesets -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 34 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
SAST⚠️ 0no SAST tool detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Packaging🟢 10packaging workflow detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
npm/webdriver-bidi-protocol 1.0.1 UnknownUnknown
npm/ws 8.22.0 🟢 5.5
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Maintained🟢 1011 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/zod 4.6.7 🟢 5.1
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Branch-Protection🟢 3branch protection is not maximal on development and all release branches

Scanned Files

  • frontend/package.json
  • pnpm-lock.yaml

@github-actions

Copy link
Copy Markdown

Coverage after merging fix/zod-4 into main will be

30.14%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   middleware.ts0%0%0%0%100, 100, 108, 116–117, 117–118, 122–123, 123–124, 128–129, 129–130, 133, 141, 143–144, 144, 144, 144–145, 151–152, 152–154, 154, 154, 154–156, 156–157, 157, 157, 16, 162, 164, 172, 179–181, 196, 198, 198, 198, 200, 204, 204, 21, 210, 210, 210, 210, 210, 210, 217, 217, 220, 230, 233, 236–240, 246, 246–247, 254, 256, 26, 262–263, 266, 266–267, 272–273, 278, 282, 282, 282, 282, 282, 284, 288, 290, 290–292, 295, 295–296, 303, 306, 306, 306, 306, 306, 306, 312–313, 313, 313, 317–318, 318, 318–319, 322, 322, 324, 324–325, 325, 325, 325, 325, 331–332, 334–335, 339, 339, 341, 341–345, 349, 349, 349, 349–350, 350, 352–355, 360–361, 365–366, 372, 40, 45, 50, 55, 60, 66–67, 67–68, 70, 70, 70, 78, 85, 92, 99
src/app
   error.tsx0%100%0%0%16–17, 19, 3–5
   layout.tsx0%0%0%0%10, 107, 123, 147, 150, 2, 20, 20, 20, 22, 22, 22, 226, 226, 24, 3–5, 8
   loading.tsx0%100%0%0%1, 7
   not-found.tsx0%100%0%0%1, 7
   page.tsx0%0%0%0%3, 35–38, 4, 40, 40, 40, 42–43, 43, 46, 46–48, 5, 52, 52, 52, 52, 52, 54, 54–55, 57, 6, 60–61, 65, 7, 73
src/app/(authenticated)/bookmarks
   page.tsx0%100%0%0%10–12, 14, 9
src/app/activity
   page.tsx0%0%0%0%10, 113, 113, 134, 142, 142, 147, 16, 162, 162, 162, 167, 167, 167, 17, 171, 18, 184, 186, 186, 189, 191, 191, 191, 191–193, 198, 205, 205, 210, 210, 222, 229, 229, 58, 74, 77, 80, 80–81, 9, 91–92
src/app/admin
   loading.tsx0%0%0%0%1, 104, 2–3, 38, 42, 42, 77, 9, 91
   page.tsx0%0%0%0%100–101, 103–104, 104, 104, 104, 104–105, 109–111, 111, 111, 111, 111–112, 115, 115, 115, 115, 115–116, 17–19, 199, 20–21, 239, 248, 248, 251, 251, 257, 261, 261, 28–29, 3, 30–31, 36, 39, 4, 43, 5, 52, 6–7, 90, 97–99
src/app/admin/advanced
   page.tsx0%0%0%0%106–110, 112–113, 113, 113, 113, 113–114, 118, 118, 118, 118, 118–119, 14–15, 25–26, 33–38, 392, 394, 41–45, 48, 77
src/app/admin/analytics
   page.tsx0%0%0%0%100, 100, 100, 100, 100, 103–107, 117, 124–125, 125, 130, 133, 133, 133–135, 135–137, 141, 141, 141–143, 143–145, 15, 154–159, 16, 160, 160, 163, 167–168, 168, 168–169, 169, 169, 17, 171, 171, 171, 173, 177, 18, 181–182, 182–183, 191, 193, 196, 196, 196–197, 200, 200, 208–209, 209–210, 216, 219, 219, 224–226, 226, 226–228, 228, 228, 230, 25, 256–257, 259, 26, 263, 265–266, 269, 271–279, 282, 282, 3, 313, 33, 331, 331, 34–36, 4, 41, 44, 49, 5, 52, 57, 60, 65, 68, 73, 76, 81, 84, 88, 96–98
src/app/admin/audit
   page.tsx0%0%0%0%116–117, 119–120, 123, 123, 123, 123, 123, 123, 125, 127, 129–130, 132, 134, 136, 138, 140, 143–144, 147, 149, 149, 149, 151, 151, 155, 163, 163, 171, 171, 177, 177, 189, 19, 196–198, 206, 209, 21, 211–212, 215–216, 216, 216, 216, 216–217, 22, 222–223, 225–229, 23, 233–234, 236–240, 243–244, 247–250, 252–255, 258, 258, 258, 258, 258–259, 263–267, 28, 289, 289, 291, 291, 299, 30, 303, 305, 305, 307, 307, 31, 322, 322, 43, 50, 59–60, 67, 7, 73, 79, 8, 80, 88, 9
src/app/admin/audit/security
   page.tsx0%0%0%0%10, 114, 12, 122, 13, 136, 136, 136, 140, 148, 148, 148, 15,

@github-actions

Copy link
Copy Markdown

PR Checks Summary

Check Status
Lint & Format ✅ success
Type Check ✅ success
Unit Tests ✅ success
Build ✅ success

✅ All checks passed! Ready for review.

@acamarata
acamarata merged commit 60b1507 into main Oct 24, 2026
49 of 51 checks passed
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