Repository navigation
docs(sandbox): correct deps-cache isolation comment — per-repo key is load-bearing - #4356
Merged
Merged
Conversation
…y is load-bearing The comment claimed "tampered cache entries are caught by bun's lockfile integrity check on install, not by this key." That is false: bun does not re-verify cached content on install — tampering a cached file and reinstalling lands the tampered bytes in node_modules unchecked (verified). Since the cache dir is writable by the sandbox uid, this makes the per-repo key the ONLY thing preventing one repo's untrusted code from poisoning a package that every other repo would then install (cross-tenant RCE). The old wording invited the opposite conclusion — that the key is redundant and a shared cache would be safe. Rewrite it to state the real model and warn against widening to a shared writable cache. No behavior change; comment only.
pedrofrxncx
enabled auto-merge (squash)
July 7, 2026 18:27
decocms Bot
pushed a commit
that referenced
this pull request
Jul 7, 2026
PR: #4356 docs(sandbox): correct deps-cache isolation comment — per-repo key is load-bearing Bump type: patch - @decocms/sandbox (packages/sandbox/package.json): 1.10.1 -> 1.10.2 Deploy-Scope: both
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.
What
Corrects a false and dangerous comment in
depsCacheEnv(shipped in #4352).The comment claimed:
This is false. Verified empirically: populate a bun cache, tamper a cached file,
rm node_modules, reinstall — the tampered bytes land innode_modulesunchecked. bun does not re-verify cached content on install; it trusts its cache.Why it matters
The cache dir is writable by the sandbox uid (
1000). Combined with "bun doesn't re-verify," the per-repo cache key (sha256(cloneUrl)) is the only thing stopping one repo's untrusted sandbox code from overwriting a package that every other repo would then install — a cross-tenant RCE. The old wording framed the key as redundant, which would invite widening it to a shared cache "for better hit rate." That change would be a security hole, not an optimization. (I went looking for exactly that shared-cache win; this is why it's not being shipped.)Neither
--backend=copyfilenor hardlink closes it — the shared writable store is the hole.Change
Comment only, no behavior change. Rewrites the doc to:
🤖 Generated with Claude Code
Summary by cubic
Fixes a misleading comment in
packages/sandbox/daemon/setup/install.tsto clarify that the per-repo deps-cache key is load-bearing for cross-repo isolation. Documents that bun does not re-verify cached content on install, so a shared writable cache could enable cross-tenant package poisoning; docs only, no behavior change.Written for commit 5db90e8. Summary will update on new commits.