PR 19716 review

rancher/dashboard PR 19716 (rak-phillip) at head e058ddd1, reviewed 2026-10-28. It bumps zod 3.24.3 → 4.6.6 in the root and shell/ manifests to clear GHSA-mrhx-c7xc-m3w5 (Dependabot alerts 1409 + 1397). It supersedes Dependabot PR 19700.

Preview: https://rancherpr19716r.mf-created-dashboard.ui.rancher.space/dashboard/, built from e058ddd1, backend mf Rancher v2.16.0.

Verdict: one should-fix before merge, then approve

Test it yourself

The message only shows when you edit a saved Keycloak/OIDC config whose scope is missing a required scope. A new config pre-fills the required scopes and won't let you remove them. The mf Rancher has no Keycloak config, so I faked the API answer in Playwright: /v3/authconfig/keycloakoidc returns enabled: true, scope: "groups". All writes were blocked.

  1. Open the Keycloak OIDC page on the PR or master preview, with a config that's missing openid profile email.
  2. Click Edit Config, then Add a new row under Scopes. The red banner shows the message.

Without a browser: the PR's own oidc.test.ts setup, with oidcScope = ['something','else'] and then validateAllFields(), gives the ArrayList's effectiveValidationMessage = "Invalid input" on the PR and authConfig.oidc.scope.missingRequired… with zod 3.24.3.

Findings
1

The OIDC "missing required scopes" error is now just "Invalid input"

Should fix

What it's about

The scope schema passes a function as the second argument of .refine() to build the message from the missing scopes. Zod 3 supported that form. Zod 4 removed it: its param normaliser treats the function as an options object with no message/error key, so the issue falls back to zod's default text, Invalid input. No type error is raised either, because oidc.vue uses a plain <script>.

What I found

The real component under jest shows the same message as the live previews below. It's the only zod-3-only refine in the repo: I grepped shell/, pkg/ and storybook/.
master: The required scopes are missing: openid, profile, email
master (zod 3.24.3)
PR: Invalid input
PR (zod 4.6.6)

Fix (tested)

Use zod 4's params form { error: (issue) => … } and compute the missing scopes from issue.input. With that change the probe gets the translated message back, and all 32 oidc.test.ts tests pass. It would be worth adding an assertion on the message to the existing "given missing required basic scopes" test, so the next zod bump can't drop it silently.
z.array(z.string()).refine(
  (arr) => requiredScopes.value?.every((s) => arr.includes(s)),
  {
    error: (issue) => {
      const arr = Array.isArray(issue.input) ? issue.input : [];
      const missing = requiredScopes.value?.filter((s) => !arr.includes(s));

      return t('authConfig.oidc.scope.missingRequired', { scopes: missing?.join(', '), count: missing?.length });
    }
  }
)
2

@vee-validate/zod is still built for zod 3

FYI

What it's about

@vee-validate/zod@4.15.1 is the last release (2025-06-07) and has peerDependencies: zod ^3.24.0. yarn install now warns has incorrect peer dependency "zod@^3.24.0". Its toTypedSchema reads zod 3 internals.

What I found (zod 3.24.3 vs 4.6.6, same adapter)

Adapter pathzod 3zod 4Used today?
parse with a failing z.union (issue.unionErrors)errorsthrows "reading 'flatMap'"No
cast (runs in useForm setup) with a .default() field (_def.defaultValue())defaultsthrows "not a function"No
describe for flat names (clientId)okokYes
describe for nested/array paths (scope[0])okexists:false + dev warningNo
The forms in this PR are fine. I'm not asking for a change here, just a note for the next zod schema someone writes. Possible follow-ups: a comment next to zodValidators, or moving off the adapter. zod 4 implements Standard Schema, which vee-validate v5 consumes directly.
3

Supply chain and release notes

zod v4.6.6 / v4.6.7
FYI
The zod 4.6.6 release notes say six malicious commits were pushed to zod's main on 2026-09-21 with a compromised credential. They were reverted the same day and never published. The 4.6.6 provenance names 284243fb, and npm view confirms the same gitHead, a SLSA v1 attestation, and the same integrity as both lockfiles. 4.6.7 (2026-10-12) is a version bump only, so staying on 4.6.6 is fine.
4

Context for the merge decision: risk, size, backport

release-2.15 · chunk-vendors
FYI
What was checked
CheckResult
Advisory GHSA-mrhx-c7xc-m3w5: first patched version4.6.6, with no 3.x backport, so the major bump is needed
Release age (1-week hold)4.6.6 published 2026-10-11, 17 days old
Alerts 1409 (yarn.lock) and 1397 (shell/yarn.lock)both this GHSA; both manifests bumped; no other zod copy in either lockfile
CI at e058ddd138 pass, 16 skipped (type-check, unit, check-licenses, all e2e + a11y)
Jest: zod-helpers, every shell/edit/auth suite, namespace, ArrayList10 suites, 228 tests pass
zod-helpers.ts { ...hasIssue } changesame messages and paths as zod 3 (required, url, whitespace-only)
.url() on 17 inputs (no scheme, bad port, spaces, IDN, mailto, file, javascript, …)same accept/reject as zod 3; issue code renamed (invalid_string → invalid_format), but our message is used
Live: GitHub Enterprise host "not a url", namespace empty namesame as master (error icon, Enable/Create disabled)
Live: OIDC missing-scope message"Invalid input" (card 1)
Storybook zod stories (z.custom, .nonempty with a string message)zod 4-compatible; storybook build green
Browser console during the live runno zod/TypeError errors; only write blocked: the apps-plus extension's CRD PUT (unrelated)
Suggested review (Comment)

Preview: https://rancherpr19716r.mf-created-dashboard.ui.rancher.space/dashboard/, built from e058ddd1, backend mf Rancher v2.16.0

Thanks for picking up both manifests. The bump checks out. There's one zod 4 change outside the diff that I think needs fixing first.

Inline on shell/utils/validators/zod-helpers.ts:72

There's one more zod 4 break, outside the diff: the scope schema in shell/edit/auth/oidc.vue passes a function as the second argument of .refine(). Zod 4 dropped that form, so the "required scopes are missing" banner now just says "Invalid input" (master vs. this preview attached). vue-tsc doesn't check that file because it's a plain JS script. Switching to { error: (issue) => … } and reading the missing scopes from issue.input brings the message back, and the OIDC tests still pass. An assertion on the message in the "missing required basic scopes" test would catch this next time.

Inline on package.json:145 (non-blocking)

FYI: @vee-validate/zod 4.15.1 still declares zod ^3.24.0, and yarn warns about it. Its adapter throws on a failing z.union and on .default() fields under zod 4. Nothing in the dashboard uses those today, but it may be worth a note for whoever writes the next schema.

Cleanup

PR preview: bash preview/cleanup-branch.sh dashboard pr19716. Nothing was written to the mf Rancher.