Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,13 @@ clone mode. Omit `workspace` to create a sandbox without a host bind mount. Set
`workspace: .` to mount the directory that contains the environment file
that declares it.

For local sandboxes, workspace paths must satisfy the
[host mount restrictions](settings.md#mountsallowsensitivestate) and any
[organization filesystem policy](../../governance/organization/policies/filesystem.md).
A policy can block a mount based on its host path and whether it needs read or
write access. These checks also apply to `additionalWorkspaces`, including
read-only mounts, and explicit kit `mounts` bindings.

For environment file placement and write protection, see
[Protect the environment file](#protect-the-environment-file).

Expand Down
31 changes: 31 additions & 0 deletions content/manuals/ai/sandboxes/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,37 @@ permissions, outside the sandbox. Leave the setting at `false` to require
approval on every invocation, or use `--force` to approve only one
invocation. See [environment lifecycle commands](environment-files.md#lifecycle).

#### mounts.allowSensitiveState {.wrap-anywhere}

{{< setting-metadata type="boolean" default="false" >}}

Local sandboxes reject host mounts whose resolved paths overlap Docker Sandboxes
configuration, state, or filesystem credential directories. This includes
read-only mounts and broad workspaces, such as a home directory that contains
protected directories. Choose a narrower host source to avoid exposing this data.

If you intend to grant that access, enable the setting before creating the
sandbox, adding the mount, or introducing a protected mount through a kit change:

```console
$ sbx settings set mounts.allowSensitiveState true
```

[Organization filesystem policy](../../governance/organization/policies/filesystem.md)
still applies and can block a mount even when this setting is enabled.
Enabling this setting can expose sensitive host data to sandboxed processes.

Set it to `false` to block further mounts that overlap protected directories:

```console
$ sbx settings set mounts.allowSensitiveState false
```

Disabling the setting doesn't revoke access through mounts already admitted.
Remove those mounts or remove the sandbox to withdraw that access. Creating or
recreating a sandbox with protected mounts requires the setting to be enabled
again.

#### sandbox.fuse {.wrap-anywhere}

{{< setting-metadata type="boolean" default="true" >}}
Expand Down
14 changes: 14 additions & 0 deletions content/manuals/ai/sandboxes/security/defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ rules. See [Sandbox governance](../../governance/_index.md).
The agent can read, write, and delete any file within that directory, including
hidden files, configuration files, build scripts, and Git hooks.

Workspaces and extra host mounts are rejected by default if their resolved
paths overlap Docker Sandboxes configuration, state, or filesystem credential
directories, even for read-only access. A home-directory workspace can include
these directories. Choose a narrower project directory, or explicitly grant
access with
[`mounts.allowSensitiveState`](../configuration/settings.md#mountsallowsensitivestate).

[Organization filesystem policies](../../governance/organization/policies/filesystem.md)
can also block workspace and extra host mounts. If you're governed, the policy
must allow the host path for the access the mount needs: `read` for a read-only
mount, or both `read` and `write` for a writable mount. A deny rule takes
precedence over an allow. Enabling `mounts.allowSensitiveState` doesn't bypass
these policies.

When you omit the workspace path from `sbx create`, the sandbox doesn't mount a
host workspace. The agent uses the sandbox template's default working
directory. Docker-provided agent templates use `/home/agent/workspace`. If the
Expand Down