Repository navigation
[2026.10.9] fix(security): bound A2UI Zod 3 traversal on stable - #187303
Conversation
Passive macOS Gateway stops now preserve an absent current-profile service definition without invoking uninstall, while explicit low-level ghost recovery remains available. Release adaptation: the 2026.10.8 backport of #180390 removed the absent-plist guard from GatewayLaunchAgentManager's disable path without main's follow-up, so every passive stop with no LaunchAgent plist ran `openclaw gateway uninstall` (mac validation: GatewayProcessManagerTests "pause preserves unretainable services" [absent]). Stable has no migration-pending custody or `.authority` wrapper, so the guard checks `custody.definition.plist` directly. Mac-only post-tag fix; npm, Docker and Linux bytes are unaffected. (cherry picked from commit cb10ec4)
Local Zod-3 adaptation of Colin McDonnell upstream a0ebf970f2d752e5f58527cd2942ff48be4f46bd / colinhacks/zod#6652. Preserve public declarations and the existing package-patch approval gate. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Register only [email protected] at its existing patch path, retain rejection of other versions and paths, and document removal gates. Local follow-up to the attributed Colin McDonnell Zod adaptation; no guard logic is disabled. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: blocked before merge. What this changesThis PR patches Zod 3.25.76 to reject oversized bounded arrays and sets before parsing their elements. Example: An A2UI function declares values with maxItems: 1 and receives {"values":["a","b"]}.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this focused stable-branch mitigation remains useful, and no introduced correctness defect was found; GitHub now reports the previous conflict resolved. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe stable Canvas plugin bundles A2UI, whose Catalog loader converts JSON Schema collection bounds into Zod validators; this patch changes rejection inside the shared Zod parser. flowchart LR
A[Catalog JSON Schema] --> B[A2UI Catalog loader]
B --> C[Bounded Zod schema]
D[Function arguments] --> C
C --> E[Early size rejection]
C --> F[Element parsing for permitted sizes]
Technical reviewBest possible solution: Retain the narrow exact-version parser adaptation for stable, preserving its documented rejection semantics and upstream removal conditions. Do we have a high-confidence way to reproduce the issue? Published Zod 3 source visibly continues into element traversal after upper-bound failures, and published A2UI 0.12.0 converts maxItems into that affected bound; no target code was executed during this review. Is this the best way to solve the issue? The change fixes traversal in the shared parser, keeps source and both runtime formats aligned, and avoids a broad schema-major migration or caller-side duplicate validation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 11091f0bf62f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +140, Docs +40, Config +1, Other +71. Total +252 across 8 files. Added test files: 2. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 29, 2026, 3:05 AM ET / 07:05 UTC (Revision 3). |
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Draft scope and provenance
Base: release/2026.10.8 at 5413218. A2UI 0.12.0, retaining Zod 3.25.76 and all public declarations/exports. No broad Zod-4 migration, A2UI removal, or vendored-parser replacement.
This is a local Zod-3 adaptation, not a cherry-pick or upstream Zod-3 release. It implements early upper-bound rejection from Colin McDonnell's upstream Zod commit a0ebf970f2d752e5f58527cd2942ff48be4f46bd (colinhacks/zod#6652; GHSA-mrhx-c7xc-m3w5). Only three parser branches are changed in the TypeScript source and its ESM/CJS runtime outputs. Original copyright and licensing are unchanged. The existing Discord-focused local adaptation informed the approach, but this patch targets the separately installed Zod package, not Discord's embedded parser.
Behavior and reachability
Oversized array max/exact-length and set max/exact-size abort before element or outer-refinement work. Valid transforms and preprocessors, lower-bound failures, wrong input types and successful union alternatives remain covered. Intentional compatibility delta: the rejected branch is aborted, so element issues disappear and a failing union may return invalid_union instead of a dirty branch's too_big.
A2UI 0.12 catalog loading turns JSON Schema maxItems into a real Zod array bound. A regression loads a function catalog through the public Catalog API, then proves the generated bounded schema rejects oversized arguments without visiting an element. Catalog schema generation and existing resolution/validation tests remain passing.
The exact-version pnpm patch also reaches other direct consumers of Zod 3.25.76 and zod-to-json-schema. It does not patch Zod-4 subpaths or the parser embedded in Discord's SDK. No advisory-wide clearance is claimed. No new protocol-wide resource bound is added.
Actual validation
Gate status
The package-patch guard registration is included in the current head. Independent ClawSweeper review and hosted CI have completed against this exact head. The prior draft hold is resolved under the assigned backport landing scope.