Cloudflare Worldedge community field guide

回顧版月刊 / 2026-04

Sandbox SDK:隔離程式碼,再限制意圖

Container isolation 仍需要 identity-scoped instances、command policy、timeouts、network controls、cleanup 與 current transport choices。

期號
28 / 32
首次發布
來源查核
檔案誠信

月份代表課程編排位置;本文首次發布於 2026-08-10,不冒充歷史發布紀錄或過往活動。

01 / DECISION

何時值得加入這個 primitive

當 untrusted 或 generated code 需要 isolated Linux execution environment,且 Worker 必須控制 boundary 時使用 Sandbox SDK。

02 / ARCHITECTURE

建立最小且站得住腳的路徑

每個 trust boundary 配置一個 sandbox、使用 explicit sessions、allowlist commands 與 egress、限制 resource 和 time、在外部 proxy secrets,完成後 destroy。

  1. 01先命名 contract

    當 untrusted 或 generated code 需要 isolated Linux execution environment,且 Worker 必須控制 boundary 時使用 Sandbox SDK。

  2. 02只加入一個 primitive

    每個 trust boundary 配置一個 sandbox、使用 explicit sessions、allowlist commands 與 egress、限制 resource 和 time、在外部 proxy secrets,完成後 destroy。

  3. 03保留 failure evidence

    拒絕 forbidden command 與 destination、強制 timeout 和 cleanup、驗證 session separation,並確認 secret 沒有進入 sandbox。

03 / REPRODUCE

有證據,再有信心

拒絕 forbidden command 與 destination、強制 timeout 和 cleanup、驗證 session separation,並確認 secret 沒有進入 sandbox。

pnpm create cloudflare@latest my-sandbox --template=cloudflare/sandbox-sdk/examples/minimal

04 / BOUNDARY

Production boundary

Isolation 不代表可執行任意 user intent;應遵循 current SDK migration guidance,並把 browser automation 留給 Browser Run。

05 / FIRST-PARTY SOURCES

讓第一方來源保持權威

產品行為、限制、價格與供應狀態會改變;採取行動前請重新核對這些來源。

01 / SOURCECloudflare Sandbox SDKhttps://developers.cloudflare.com/sandbox/02 / SOURCE2026 migration guidancehttps://developers.cloudflare.com/sandbox/guides/2026-deprecation/