Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions docs/cli/configuration/sandbox.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Sandbox
tag: "Beta"
description: OS-level sandboxing isolates Droid from your filesystem and network using kernel-enforced policies (Beta).
description: OS-level sandboxing isolates Droid from your filesystem and network using kernel-enforced policies.
keywords:
[
"sandbox",
Expand All @@ -17,20 +16,15 @@ keywords:
]
---

<Note>
**Beta** — OS-level Sandbox is opt-in and under active development. Behavior,
settings, and platform support may change between releases.
</Note>

OS-level sandboxing lets users set filesystem and network boundaries for Droid. In the Beta version, all shell commands initiated by Droid run in a separate process that is limited to the filesystem and network boundaries configured by users and enforced at the OS kernel level.
OS-level sandboxing lets users set filesystem and network boundaries for Droid. All shell commands initiated by Droid run in a separate process that is limited to the filesystem and network boundaries configured by users and enforced at the OS kernel level.

## How OS-level isolation works

Sandbox enforces its filesystem and network boundaries with the same operating-system primitives the OS uses to confine untrusted software, so a blocked read, write, or connection is denied by the kernel rather than relying on Droid to police itself:

- **macOS** -- Seatbelt (the built-in macOS sandbox) profiles restrict filesystem and process access.
- **Linux and WSL2** -- [bubblewrap](https://github.com/containers/bubblewrap) with a seccomp filter provides the same confinement.
- **Network (all platforms)** -- outbound traffic is routed through an HTTP/SOCKS filtering proxy that permits only the allowed domains (Factory's own domains are always allowed).
- **Network (all platforms)** -- outbound traffic is routed through an HTTP/SOCKS filtering proxy that permits only the allowed domains. Factory service domains and WorkOS authentication domains are always allowed.

Because Sandbox relies on these host primitives, it blocks rather than running without isolation when they are unavailable.

Expand Down Expand Up @@ -68,7 +62,7 @@ Once enabled, the default policies below apply immediately -- no other configura
| --------------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **File reads** | Allow all. Only explicit `denyRead` entries are blocked. | `sandbox.filesystem.denyRead` |
| **File writes** | Deny all except **CWD** (current working directory). Additional paths can be allowed. `denyWrite` overrides `allowWrite`. | `sandbox.filesystem.allowWrite`, `sandbox.filesystem.denyWrite` |
| **Network** | Deny all except Factory's own domains (always allowed by default). Additional domains must be explicitly allowed. | `sandbox.network.allowedDomains` |
| **Network** | Deny all except Factory service domains and WorkOS authentication domains (always allowed by default). Additional domains must be explicitly allowed. | `sandbox.network.allowedDomains` |

### Full settings reference

Expand All @@ -87,7 +81,7 @@ Once enabled, the default policies below apply immediately -- no other configura
"denyRead": ["~/.aws/credentials", "~/.ssh/id_rsa"]
},
"network": {
// Only these domains are reachable (Factory's own domains always included)
// Only these domains are reachable (Factory service domains and WorkOS auth domains always included)
"allowedDomains": ["github.com", "*.npmjs.org"]
}
}
Expand Down
16 changes: 5 additions & 11 deletions docs/jp/cli/configuration/sandbox.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: サンドボックス
tag: "Beta"
description: OS レベルのサンドボックスは、カーネルで強制されるポリシーを使って、Droid をファイルシステムとネットワークから分離します(Beta)。
description: OS レベルのサンドボックスは、カーネルで強制されるポリシーを使って、Droid をファイルシステムとネットワークから分離します。
keywords:
[
"sandbox",
Expand All @@ -17,20 +16,15 @@ keywords:
]
---

<Note>
**Beta** — OS レベルのサンドボックスはオプトインであり、活発に開発が進められています。動作、設定、
プラットフォームサポートはリリースごとに変更される可能性があります。
</Note>

OS レベルのサンドボックスにより、ユーザーは Droid に対してファイルシステムおよびネットワークの境界を設定できます。Beta 版では、Droid が開始するすべてのシェルコマンドが別プロセスで実行され、ユーザーが設定し OS カーネルレベルで強制されるファイルシステムおよびネットワークの境界に制限されます。
OS レベルのサンドボックスにより、ユーザーは Droid に対してファイルシステムおよびネットワークの境界を設定できます。Droid が開始するすべてのシェルコマンドは別プロセスで実行され、ユーザーが設定し OS カーネルレベルで強制されるファイルシステムおよびネットワークの境界に制限されます。

## OS レベルの分離の仕組み

サンドボックスは、OS が信頼できないソフトウェアを隔離するために使うのと同じオペレーティングシステムのプリミティブでファイルシステムおよびネットワークの境界を強制します。そのため、ブロックされた読み取り・書き込み・接続は、Droid が自身を取り締まることに頼るのではなく、カーネルによって拒否されます:

- **macOS** -- Seatbelt(macOS 組み込みのサンドボックス)のプロファイルがファイルシステムおよびプロセスへのアクセスを制限します。
- **Linux および WSL2** -- [bubblewrap](https://github.com/containers/bubblewrap) と seccomp フィルターが同等の隔離を提供します。
- **ネットワーク(全プラットフォーム)** -- 送信トラフィックは HTTP/SOCKS フィルタリングプロキシ経由でルーティングされ、許可されたドメインのみを通過させますFactory 自身のドメインは常に許可されます)
- **ネットワーク(全プラットフォーム)** -- 送信トラフィックは HTTP/SOCKS フィルタリングプロキシ経由でルーティングされ、許可されたドメインのみを通過させますFactory サービスドメインおよび WorkOS 認証ドメインは常に許可されます

サンドボックスはこれらのホストのプリミティブに依存するため、それらが利用できない場合は、分離なしで実行するのではなくブロックします。

Expand Down Expand Up @@ -68,7 +62,7 @@ OS レベルのサンドボックスにより、ユーザーは Droid に対し
| ----------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **ファイル読み取り** | すべて許可。明示的な `denyRead` エントリのみがブロックされます。 | `sandbox.filesystem.denyRead` |
| **ファイル書き込み** | **CWD**(カレントワーキングディレクトリ)を除きすべて拒否。追加のパスを許可できます。`denyWrite` は `allowWrite` より優先されます。 | `sandbox.filesystem.allowWrite`、`sandbox.filesystem.denyWrite` |
| **ネットワーク** | Factory 自身のドメイン(デフォルトで常に許可)を除きすべて拒否。追加のドメインは明示的に許可する必要があります。 | `sandbox.network.allowedDomains` |
| **ネットワーク** | Factory サービスドメインおよび WorkOS 認証ドメイン(デフォルトで常に許可)を除きすべて拒否。追加のドメインは明示的に許可する必要があります。 | `sandbox.network.allowedDomains` |

### 設定リファレンス(全項目)

Expand All @@ -87,7 +81,7 @@ OS レベルのサンドボックスにより、ユーザーは Droid に対し
"denyRead": ["~/.aws/credentials", "~/.ssh/id_rsa"]
},
"network": {
// これらのドメインのみ到達可能(Factory 自身のドメインは常に含まれます
// これらのドメインのみ到達可能(Factory サービスドメインおよび WorkOS 認証ドメインは常に含まれます
"allowedDomains": ["github.com", "*.npmjs.org"]
}
}
Expand Down
Loading