什麼是 Sandbox2?
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
當您必須依賴第三方開發的軟體,但無法存取原始碼,或沒有資源進行原始碼評估時,沙箱化不受信任的程式碼就很有用。沙箱也能做為您自己程式碼的額外安全界線。
Sandbox2 是開放原始碼的 Linux C++ 安全沙箱,由 Google 的安全工程師編寫。您可以使用 Sandbox2 將執行階段環境限制在真正作業所需的最低限度,藉此限制潛在程式碼執行安全漏洞的影響。
您可以使用 Sandbox2,將以 C/C++ 撰寫的完整程式或部分程式放入沙箱。
可用的說明文件
Sandbox2 說明:說明 Sandbox2 的基礎技術和架構。
開始使用:提供相關指引,協助您實作自己的 Sandbox2 沙箱。
範例:提供範例,說明如何在不同情境中使用 Sandbox2,以及如何編寫政策。
常見問題:解答有關 Sandbox2 的常見問題。
取得 Sandbox2
Sandbox2 是 Sandboxed API (SAPI) 的一部分。您可以從以下網址下載原始碼:
https://github.com/google/sandboxed-api/tree/main/sandboxed_api/sandbox2。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[[["\u003cp\u003eSandbox2 is an open-source C++ sandbox developed by Google for enhancing security by restricting the runtime environment of untrusted code.\u003c/p\u003e\n"],["\u003cp\u003eIt allows you to isolate entire programs or specific code segments, minimizing the impact of vulnerabilities.\u003c/p\u003e\n"],["\u003cp\u003eSandbox2 is especially useful when dealing with third-party software where source code access or assessment is limited.\u003c/p\u003e\n"],["\u003cp\u003eComprehensive documentation, including explanations, guides, and examples, is available to help you understand and implement Sandbox2.\u003c/p\u003e\n"],["\u003cp\u003eAccess Sandbox2's source code through the Sandboxed API (SAPI) repository on GitHub.\u003c/p\u003e\n"]]],[],null,["Sandboxing untrusted code is useful when you have to rely on third-party\ndeveloped software where you don't have access to source code, or you don't have\nresources to perform a source code assessment. Sandboxing can also be useful as\nan additional security boundary for your own code.\n\nSandbox2 is an open-source C++ security sandbox for Linux written by security\nengineers at Google. With Sandbox2 you can restrict the runtime environment to\nthe minimum required for genuine operations, thus limiting the impact of\npotential code execution vulnerabilities.\n\nSandbox2 can be used to sandbox entire programs or portions of programs written\nin C/C++.\n\nAvailable Documentation\n\n- [Sandbox2 Explained](/code-sandboxing/sandbox2/explained) --- Describes\n Sandbox2's underlying technology and architecture.\n\n- [Getting Started](/code-sandboxing/sandbox2/getting-started) ---\n Provides guidance helping you implement your own Sandbox2 sandbox.\n\n- [Examples](/code-sandboxing/sandbox2/examples) --- Provides examples\n demonstrating how to use Sandbox2 in different scenarios and how to write\n policies.\n\n- [FAQ](/code-sandboxing/sandbox2/faq) --- Addresses frequent queries\n regarding Sandbox2.\n\nGet Sandbox2\n\nSandbox2 is part of [Sandboxed API (SAPI)](/code-sandboxing/sandboxed-api). You\ncan download the source code from:\n\u003chttps://github.com/google/sandboxed-api/tree/main/sandboxed_api/sandbox2\u003e."]]