ai-sandbox: encrypt snapshot blobs at rest with an encrypting blob store wrapper
I maintainer di solito rispondono entro 1 giorno
@AlemTuzlak ci sta già lavorando.
Dal 5/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Add an encrypting wrapper for snapshot blob stores in @tanstack/ai-sandbox, so that snapshot files are encrypted at rest with one option:
const snapshots = createSandboxSnapshots({
persistence: withEncryptedBlobs(persistence, { key }),
checkpoints,
})
Why
A sandbox snapshot can hold secrets. In #1982, sandboxComputer({ snapshots }) saves a Chromium profile, and the profile holds the session cookies of every site that the agent signed in to. A person with the cookies can use those accounts.
Today the docs only say "keep the blob store secret, and encrypt it in production" (docs/computer-use/drivers.md). Each user must write their own encryption. That is easy to get wrong.
How it fits
- The snapshot code writes each file to
stores.blobsatsandbox-files/sha256/<hash of the plain bytes>. - On restore, it reads the blob and checks the hash of the bytes (
packages/ai-sandbox/src/snapshots.ts). - So a wrapper can encrypt in
putand decrypt inget. The keys and the hash check do not change.
Work
- Add
withEncryptedBlobs(persistence, { key }). It returns the same persistence with a wrappedstores.blobs. - Use AES-GCM from Web Crypto, with a new random IV for each blob. Store the IV with the ciphertext. Run in Node, Workers, and browsers.
- Accept a
CryptoKey, or a function that returns one, so the key can come from a KMS. Add a key id to the blob metadata, for key rotation. - Make
getwork for every body type and forrange. A range read must decrypt the whole blob, then slice it.sizeandetagdescribe the ciphertext. - Fail with a clear error when a blob cannot be decrypted (wrong key, changed data). Do not return the ciphertext.
- Update
docs/computer-use/drivers.mdand the snapshot docs. Use the wrapper inexamples/react/computer-use-login.
Open questions
- The blob key holds the SHA-256 of the plain file. A person who can list the store can check if a known file is in a snapshot. Is that acceptable, or does the snapshot code need keyed hashes (HMAC) when encryption is on?
- Other metadata stays plain: file paths, sizes, and the checkpoint records. List this in the docs.
Context
- #1982: computer use sign-in example with profile snapshots.
- #1108: portable file snapshots.
- Lingua principale
- TypeScript
- Stelle
- 3.3k
- Fork
- 378
- Merge medio
- 1g 2h
- PR unite (30g)
- 254
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/ai
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'Forse già presa @tombeckenham l’ha presa 8 giorni fa. Apertahas-pr waiting-on: maintainer
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
TanStack/ai#1916 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
AG-UI TOOL_CALL_RESULT metadata is dropped in the live stream reducerForse già presa @c446984928 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Sandbox takeover: the saved transcript loses everything the first host delivered before the restartForse già presa @tombeckenham l’ha presa 1 giorno fa. Apertawaiting-on: maintainer
TanStack/ai#2061 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
withSandbox: each run's save drops the harness tool calls of earlier runsForse già presa @tombeckenham l’ha presa 1 giorno fa. Apertahas-pr waiting-on: maintainer
TanStack/ai#2059 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ai-compaction: checkpoint never reused when the store returns message keys in another orderForse già presa @tombeckenham l’ha presa 1 giorno fa. Apertahas-pr waiting-on: maintainer
TanStack/ai#2050 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area:ui bug effort:S priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Typo in WSL project description on Projects pageForse già presa @akhil9tiet l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
microsoft/opensource.microsoft.com#1066 · 1 commento ·
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Esri/calcite-design-system#15565 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
linkwarden/linkwarden#1891 ·
I maintainer di solito rispondono entro 1 giorno