Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs: remove references to legacy sandbox backends from documentation

Steven Enamakelf1c08f92b460
diff --git a/crates/openhuman-core/src/sandbox/README.md b/crates/openhuman-core/src/sandbox/README.md
index 5001782e82..cb1796a69e 100644
--- a/crates/openhuman-core/src/sandbox/README.md
+++ b/crates/openhuman-core/src/sandbox/README.md
@@ -7,11 +7,8 @@ and whether a tool needs host access (elevated ops, also owned here). The
gateway/core process itself always runs on the host; only selected tool
families (shell, filesystem, process) execute through a sandbox backend.
-This is a distinct layer from `crate::security::traits::Sandbox` (the older
-`Command`-wrapping backends in `security/{docker,bubblewrap,firejail,landlock}.rs`,
-used by `security::create_sandbox`). That trait wraps a `Command` in place;
-this domain resolves a per-session `SandboxPolicy`, owns its own Docker
-backend, and delegates local OS-level confinement to `cwd_jail`.
+This domain resolves a per-session `SandboxPolicy`, owns its own Docker
+backend, and delegates local OS-level confinement to `tinybox-jail`.
## Public surface
diff --git a/crates/openhuman-core/src/security/README.md b/crates/openhuman-core/src/security/README.md
index 050be8c585..90bb2f84b1 100644
--- a/crates/openhuman-core/src/security/README.md
+++ b/crates/openhuman-core/src/security/README.md
@@ -23,19 +23,16 @@ credentials, and the keychain. None of these submodules is feature-gated.
| `tools.rs` | `SecurityPolicyInfoTool`, the only LLM-callable surface of this domain (read-only, default-ON); command/path gating itself is enforced in-engine, never as an agent-callable tool |
| `schemas.rs` | `security.policy_info` RPC controller, registered through `core/all.rs` |
| `ops.rs` | `security_policy_info_for_config` / `load_and_get_security_policy_info` behind that controller |
-| `detect.rs` | `create_sandbox`, which picks a `Sandbox` backend for the host |
-| `traits.rs` | `Sandbox` trait and `NoopSandbox` |
-| `docker.rs`, `bubblewrap.rs`, `firejail.rs`, `landlock.rs` | Legacy `Command`-wrapping sandbox backends implementing `Sandbox` (see below) |
| `audit.rs` | Append-only audit log of agent actions |
| `pairing.rs` | Pairing token / non-loopback bind guard |
| `core.rs` | `redact()`, 4-char-prefix log redaction (glob re-exported) |
-Sandbox note: `docker.rs` / `bubblewrap.rs` / `firejail.rs` / `landlock.rs`
-here wrap a `std::process::Command` per the `Sandbox` trait and are chosen by
-`detect::create_sandbox`. `crates/openhuman-core/src/sandbox/` is a separate,
-newer domain; see `vendor/tinybox/crates/tinybox-jail/src/lib.rs`'s rustdoc for why `cwd_jail`
-superseded these backends on macOS (no `bwrap`) and added a Windows
-AppContainer backend. The two domains are not interchangeable.
+Sandbox note: this domain holds no sandbox backends. The legacy `Command`-wrapping
+`Sandbox` trait and its Docker / Bubblewrap / Firejail / Landlock backends had no
+callers and were removed. `crates/openhuman-core/src/sandbox/` picks the backend per
+session and delegates local confinement to `tinybox-jail`
+(`vendor/tinybox/crates/tinybox-jail`). Quote-aware command-string scanning used by
+`policy/policy_command/` is `tinybox_core::shell::scan`.
## Public surface
@@ -46,13 +43,6 @@ AppContainer backend. The two domains are not interchangeable.
[policy/README.md](policy/README.md).
- `pub fn validate_path_within_root`, `pub fn openhuman_scratch_dir`,
`pub fn ensure_openhuman_scratch_dir`, defined in `policy/enforcement.rs`.
-- `pub trait Sandbox` / `pub struct NoopSandbox`, defined in `traits.rs`: a
- pluggable sandbox abstraction.
-- `pub fn create_sandbox(config: &SecurityConfig) -> Arc<dyn Sandbox>`,
- defined in `detect.rs`. It honors `config.sandbox.backend` or auto-detects
- Landlock, Firejail, Bubblewrap, or Docker, falling back to `NoopSandbox`.
- Landlock and Bubblewrap sit behind the `sandbox-landlock` /
- `sandbox-bubblewrap` cargo features.
- `pub use self::keyring::SecretStore`: an encrypted-on-disk secret codec
whose master key lives in keychain-backed storage.
- `pub use egress::{emit_external_transfer, enforce_egress, local_only_blocks, local_only_tool_block, DataKind, EgressDescriptor, EgressReason, IdentificationRisk}`;
diff --git a/gitbooks/developing/architecture/security.md b/gitbooks/developing/architecture/security.md
index e726a9dacc..dbc91f9b68 100644
--- a/gitbooks/developing/architecture/security.md
+++ b/gitbooks/developing/architecture/security.md
@@ -1,7 +1,7 @@
---
description: >-
- Trust boundary for the autonomous core - autonomy / risk policy, pluggable
- sandbox backends (Docker, Bubblewrap, Firejail, Landlock, Noop), audit log,
+ Trust boundary for the autonomous core - autonomy / risk policy, the
+ policy that decides when to sandbox (mechanism lives in tinybox), audit log,
encrypted secret store, public-bind / pairing guard, and the redact() helper.
icon: shield-halved
---
@@ -24,32 +24,15 @@ This module is the place to look first when asking "is this agent action allowed
| `SecurityPolicy` | `policy/types.rs` (path checks in `policy/path_checks.rs`, command classification in `policy/command_checks.rs`, gating in `policy/enforcement.rs`) | Assembles runtime policy from `AutonomyConfig` + workspace dir. |
| `AutonomyLevel` (`Supervised` / `SemiAutonomous` / `Autonomous`) | `policy/types.rs` | Three-step autonomy ladder. |
| `CommandRiskLevel`, `ToolOperation`, `ActionTracker` | `policy/types.rs` | Risk classification + per-session counting. |
-| `Sandbox` trait, `NoopSandbox` | `traits.rs` | The pluggable sandbox abstraction; every backend implements `Sandbox`. |
-| `create_sandbox(&SecurityConfig) -> Arc<dyn Sandbox>` | `detect.rs` | Picks the best backend available on the host at runtime. |
-| `pub mod docker / bubblewrap / firejail / landlock` | (siblings) | Per-backend implementations of `Sandbox`. |
| `SecretStore` | `keyring/encrypted_store.rs` (`secrets.rs` re-exports it) | OS-keychain / encrypted-file secret persistence with round-trip helpers. |
| `AuditLogger`, `AuditEventType`, `AuditEvent`, `Actor`, `Action`, `ExecutionResult`, `SecurityContext`, `CommandExecutionLog` | `audit.rs` | Append-only audit trail. |
| `PairingGuard`, `constant_time_eq`, `is_public_bind` | `pairing.rs` (`PairingGuard` and `constant_time_eq` are re-exported from `tinychannels_bus::security`) | Pairing-token check before binding the RPC server publicly. |
| `redact(value: &str) -> String` | `core.rs` | Uniform 4-char-prefix redaction for logs. |
| `security_policy_info_for_config(&Config) -> Outcome<serde_json::Value>` | `ops.rs` | RPC handler for the doctor / settings UI. |
-## Sandbox backend selection
+## Sandboxing
-`detect::create_sandbox` walks a preference list and returns the **first available** backend on the host. The exact order is encoded in `detect.rs`; in practice it favours the strongest available isolation:
-
-```text
- ┌──────────────┐
-SecurityConfig ─►│ create_sandbox│
- └──────┬───────┘
- │ probes
- ├─► Docker (best isolation; needs daemon)
- ├─► Bubblewrap (Linux user-namespace sandbox)
- ├─► Firejail (Linux setuid sandbox)
- ├─► Landlock (Linux LSM; in-process)
- └─► Noop (last resort; logs only)
-```
-
-The agent never sees the choice; it just calls into `Sandbox::run(...)` and the active backend handles the rest. Every backend lives in a sibling file (`docker.rs`, `bubblewrap.rs`, `firejail.rs`, `landlock.rs`); the noop fallback is in `traits.rs`.
+This module no longer carries sandbox backends. The old `Sandbox` trait, `NoopSandbox`, `create_sandbox` and the Docker / Bubblewrap / Firejail / Landlock `Command` wrappers had no callers and were removed. Per-session sandbox selection lives in `crates/openhuman-core/src/sandbox/`, which delegates local OS confinement to `tinybox-jail` (vendored tinybox) and keeps its own `docker run` executor. Shell-string scanning used by command classification is `tinybox_core::shell::scan`; the classification rules stay here.
## Autonomy ladder
@@ -80,9 +63,6 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
| Path | Role |
| ------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `policy/` (`mod.rs`, `types.rs`, `path_checks.rs`, `command_checks.rs`, `enforcement.rs`, `policy_command*.rs`, `policy_tests*.rs`, `proptest_tests.rs`) | `SecurityPolicy`, `AutonomyLevel`, risk classification, path and command checks, action tracking. |
-| `traits.rs` | `Sandbox` trait + `NoopSandbox` fallback. |
-| `detect.rs` | `create_sandbox`: best-available-backend selection. |
-| `docker.rs` / `bubblewrap.rs` / `firejail.rs` / `landlock.rs` | Per-backend `Sandbox` implementations. |
| `core.rs`, `core_tests.rs` | `redact()` + small shared helpers. |
| `audit.rs` | Append-only audit log types. |
| `secrets.rs`, `keyring/` | `SecretStore` (implemented in `keyring/encrypted_store.rs`) + round-trip tests. |
@@ -94,7 +74,6 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
## Calls into
- `crates/openhuman-core/src/config/`: `SecurityConfig`, `AutonomyConfig` for policy + sandbox selection.
-- OS-level sandbox tools: `docker`, `bwrap`, `firejail`, Landlock syscalls (per backend).
- Workspace filesystem, for the audit log and secret store.
## Called by
@@ -110,7 +89,6 @@ All of this only applies when the autonomy policy is turned on. Per `AGENTS.md`,
- Unit: `pairing_tests.rs`, `policy/policy_tests*.rs`, `policy/proptest_tests.rs`, `keyring/encrypted_store_tests*.rs`.
- `core_tests.rs` covers `redact()`.
-- Sandbox-backend smoke tests: `docker_tests.rs`, `bubblewrap_tests.rs`, `firejail_tests.rs`, `landlock_tests.rs`, `detect_tests.rs`.
## Related