DashboardcraftWorkspaceSchema __proto__ Zod record lo…

WorkspaceSchema __proto__ Zod record loss

Category: gotcha
Confidence: 1.00
ID: 01a04843-b9b1-758e-90cf-319718644b9e
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 0281LnSbAUxiwnfyl
Created: 2026-08-28 12:06:33
Updated: 2026-08-28 12:06:33

Content

Trap: allowing __proto__ under workspaces looks safe because it matches the ASCII key regex and passes Zod validation, but Zod record output silently drops it. getWorkspaceNames() then returns no such workspace, and Object.keys(workspaces) makes the root github.projectPath guard think no workspaces exist. Fix: explicitly reject prototype-sensitive workspace keys (__proto__, and defensively other inherited names) before relying on record output; test selection and root-projectPath validation with each key.

Move to: