You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate sandbox-runtime to a patched Zod dependency #383
The worker resolves @anthropic-ai/sandbox-runtime@0.0.75, node-forge@1.4.3, and zod@3.25.76.
The node-forge update in #381 resolved its Dependabot alerts. The remaining worker advisory is Zod: GHSA-mrhx-c7xc-m3w5, patched in 4.6.6. npm audit reports Zod and sandbox-runtime as two affected package entries for the same underlying advisory.
As checked on November 15, 2026, the latest sandbox-runtime release (0.0.83) still declares zod: ^3.25.0.
Compatibility evidence
An isolated installation of sandbox-runtime 0.0.75 with Zod overridden to 4.6.7 produces 122 Zod-related declaration errors under strict TypeScript checking with skipLibCheck: false. Examples include the changed ZodObject/ZodArray generic signatures and the missing ZodEffects export. The SDK exposes configuration types inferred from these schemas.
The project normally skips library declaration checks, so an application build alone would not establish compatibility with such an override.
Acceptance criteria
Migrate sandbox-runtime's schemas and exported configuration types to a patched Zod release, or use a compatible patched SDK release.
Validate strict TypeScript consumers without suppressing declaration errors.
Verify valid and invalid sandbox configurations retain their filesystem/network restrictions and credential rules.
Run native and packed-worker tests on Linux and macOS, with Node 22 and 24.
Confirm the worker production audit no longer reports this advisory before promoting an npm release.
These findings establish dependency use and an incompatible major-version override; exploit reachability through worker configuration has not been demonstrated.
changed the title [-]Audit sandbox-runtime production dependency advisories before npm publication[/-][+]Migrate sandbox-runtime to a patched Zod dependency[/+]on Nov 15, 2026
It migrates both configuration and decider schema imports to Zod 4.6.7, adapts the union error callback, and adds a strict consumer compilation against emitted public declarations with skipLibCheck: false. Source/test typechecking, build, focused lint, and 274 focused tests pass locally. No downstream override or npm release was made.
Adoption prerequisite found by packing this SDK build and compiling the current worker against it: sandbox-runtime 0.0.83 represents filesystem entries as string | { path: string; literal: true }. Several packages/code/src/native-sandbox.test.ts assertions still call string/fs APIs directly on these entries, so the worker does not currently compile against that newer SDK. Update those assertions with explicit path extraction/narrowing as part of the released-SDK upgrade, then rerun native, packed-consumer, and Linux/macOS coverage. This compatibility requirement is independent of the Zod migration itself.
Alert #23 remains open pending a compatible upstream release and the tested downstream upgrade.
Activity
[-]Audit sandbox-runtime production dependency advisories before npm publication[/-][+]Migrate sandbox-runtime to a patched Zod dependency[/+]danny-avila commentedon Nov 15, 2026
Upstream migration is now proposed in anthropics/sandbox-runtime#832 (head f79fbd8).
It migrates both configuration and decider schema imports to Zod 4.6.7, adapts the union error callback, and adds a strict consumer compilation against emitted public declarations with
skipLibCheck: false. Source/test typechecking, build, focused lint, and 274 focused tests pass locally. No downstream override or npm release was made.Adoption prerequisite found by packing this SDK build and compiling the current worker against it: sandbox-runtime 0.0.83 represents filesystem entries as
string | { path: string; literal: true }. Severalpackages/code/src/native-sandbox.test.tsassertions still call string/fs APIs directly on these entries, so the worker does not currently compile against that newer SDK. Update those assertions with explicit path extraction/narrowing as part of the released-SDK upgrade, then rerun native, packed-consumer, and Linux/macOS coverage. This compatibility requirement is independent of the Zod migration itself.Alert #23 remains open pending a compatible upstream release and the tested downstream upgrade.