ai-sandbox: encrypt snapshot blobs at rest with an encrypting blob store wrapper
メンテナーはふだん 1 日以内に返信
@AlemTuzlak がすでに取り組んでいます。
2026年11月5日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- TypeScript
- スター
- 3.3k
- フォーク
- 378
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 254
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/ai のほかの issue
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'対応中かも @tombeckenham が 8 日前に担当しました。 オープンhas-pr waiting-on: maintainer
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
TanStack/ai#1916 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
AG-UI TOOL_CALL_RESULT metadata is dropped in the live stream reducer対応中かも @c446984928 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Sandbox takeover: the saved transcript loses everything the first host delivered before the restart対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
withSandbox: each run's save drops the harness tool calls of earlier runs対応中かも @tombeckenham が 1 日前に担当しました。 オープンhas-pr waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-compaction: checkpoint never reused when the store returns message keys in another order対応中かも @tombeckenham が 1 日前に担当しました。 オープンhas-pr waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
似ている issue
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving Settings対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area:ui bug effort:S priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Typo in WSL project description on Projects page対応中かも @akhil9tiet が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
microsoft/opensource.microsoft.com#1066 · コメント 1 件 ·
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Esri/calcite-design-system#15565 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
linkwarden/linkwarden#1891 ·
メンテナーはふだん 1 日以内に返信