fix(dsbx): resolve drizzle-kit at its image install path - #30228
Open
smb2268 wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
smb2268
marked this pull request as ready for review
August 7, 2026 20:19
fontanierh
approved these changes
Aug 7, 2026
fontanierh
left a comment
Contributor
There was a problem hiding this comment.
LGTM 🙏 Thanks for fixing!
You need to bump the version tags for both DSBX and the sandbox image.
Then, lock front, release dsbx CLI, run the sandbox registry workflow, and deploy front.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
dsbx db schema(the get-DB-schema MCP path) fails withdrizzle-kit not found on PATH, while the binary is visibly present in an interactive sandbox shell.Root cause: non-root
sandbox.execcommands run in a--noprofile --norcshell with PATH pinned to/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin(sandbox service-account hardening)./opt/bin/dsbxresolves, but the runner then looked updrizzle-kitviaBun.whichagainst that inherited PATH — and the image's global npm install lives at/opt/npm-global/bin, which the pinned PATH deliberately excludes. Interactive shells source the profile and see the full PATH, which is why shell-based debugging shows the binary "on PATH".Fix: resolve drizzle-kit by explicit path only, never through the caller's PATH — the image install (
/opt/npm-global/bin/drizzle-kit, root-ownednpm install -gat image build) first, the package-localnode_modules/.bin(devDependency) as the dev/test fallback. The failure message names both candidates. The bun-shebang-bypass invocation is unchanged.Deliberately not done: widening the hardened PATHs. Note the exec runs as the
agentservice user (execOpts?.user ?? "agent"), whose safe PATH is the same constant as root's — a PATH-based fix would widen root's exec PATH or require splitting that alias plus standing ownership guarantees on/opt/npm-global, for what an audit shows is a single-caller problem (every other binary dsbx spawns —bun,runuser,nft— lives in/opt/binor/usr/sbin, already on the pinned PATHs).Risk
Worst case, drizzle-kit resolution fails with an error naming both checked paths — same failure mode as today, better message. No hardening/PATH changes. Safe to rollback.
Tests
Resolver unit tests (image install wins / local fallback / neither → error naming both paths); existing db suite green (48 tests).
Deploy Plan
Mirrors the image-rollout process from
Harden sandbox uid 1002 service boundary(#29411) — this fix rides inside the dsbx binary embedded in the sandbox image, so a front deploy alone does not reach sandboxes, and sleeping sandboxes retain their original image.dust-baseimage embedding it; confirm the validated templates are available in both E2B regions (the deploy workflow gates front on image availability).dust-baseversion — new sandboxes pick up the patched dsbx.dust-baseversions via/poke/kill— sleeping sandboxes retain their original image, so without this, existing Computers (including the pod this was reported on) wake up with the old dsbx and keep the bug. At minimum, kill the affected pods' sandboxes; a full sweep matches the Harden sandbox uid 1002 service boundary #29411 process.Note
Validated ahead of rollout: the patched dsbx was hot-swapped into a live sandbox via
upsert_dsbx_to_sandbox.shand the get-DB-schema flow succeeds under the hardened exec PATH.