Skip to content

docs(sandbox): document Eclipse Enclave as an optional container-level backend - #1064

Closed
onlyarnav wants to merge 1 commit into
apache:mainfrom
onlyarnav:feat/enclave-container-isolation
Closed

docs(sandbox): document Eclipse Enclave as an optional container-level backend#1064
onlyarnav wants to merge 1 commit into
apache:mainfrom
onlyarnav:feat/enclave-container-isolation

Conversation

@onlyarnav

Copy link
Copy Markdown
Contributor

Summary

Supports Eclipse Enclave as an optional container-level backend for Layer 1 sandbox isolation, alongside existing per-subprocess OS sandboxes (bubblewrap on Linux and Seatbelt on macOS).

Where bubblewrap and Seatbelt sandbox each Bash subprocess on the host, Eclipse Enclave runs the entire agent session inside an isolated container with its own filesystem, process tree, and network stack so the host is never in scope.

Key Highlights & Benefits

  • Failure mode resilience: Reduces blast radius under local sandbox bypasses (e.g. dangerouslyDisableSandbox or local .claude/settings.json overrides — Threat Model Residual Risk 4). Even under an override, execution is bounded by the container.
  • Cross-platform consistency: Single isolation profile across Linux and macOS instead of two distinct OS sandbox profiles.
  • Coverage for non-Bash tools: Encloses the agent's native Read / Edit / Write file tools inside the container boundary.

Required Contract for Container Backends

This PR defines the 5 contract requirements Magpie expects of any container-level backend:

  1. Default-deny egress with DNS/SNI allowlisting enforced before sockets open.
  2. Credential exclusion preserving Layer 0 guarantees (no $GH_TOKEN, $AWS_*, or host credential paths mounted).
  3. Workspace scoping restricting filesystem visibility to the project tree or active git worktree.
  4. Auditable session record for tracking external network traffic (subsuming tools/egress-gateway/).
  5. Documented escape hatch for commands requiring explicit host authentication.

Why Wiring / Pins Are Deferred

Eclipse Enclave is currently incubating at the Eclipse Foundation without a published release or stable CLI. Wiring (backend selector in agent-iso.sh, pin entry in pinned-versions.toml, and verification probes) is intentionally deferred until Enclave publishes its initial release.

Files Modified

  • docs/setup/secure-agent-internals.md: Added Eclipse Enclave detailed section, comparison table, trade-offs, and backend contract.
  • docs/setup/secure-agent-setup.md: Documented optional container-level backend setup path.
  • tools/spec-loop/specs/agent-isolation-sandbox.md: Updated sandbox specification.

Verification

  • Passed all static analysis hooks and documentation formatting (prek run --all-files).
  • Passed test suite (uv run pytest — 389 passing tests).

closes: #1059


Generated using: Claude Code (Opus 5)

…l backend

bubblewrap (Linux) and Seatbelt (macOS) sandbox each Bash subprocess on
the host. Eclipse Enclave — an incubating Eclipse Foundation project,
MIT-licensed — takes the container route instead: the whole agent
session runs isolated, so the host is never in scope.

Adds it as a documented Layer 1 option alongside the two OS backends,
with the trade-offs stated (needs a container runtime; coarser than
per-subprocess carve-outs like sandbox.excludedCommands; covers the
agent's own Read/Edit/Write tools, which the OS backends do not).

States the contract Magpie requires of any container-level backend
rather than wiring to Enclave's CLI, which is not stable yet. Enclave
is deliberately absent from pinned-versions.toml: a pin needs a version
and a release date to age through the cooldown, and there is no released
artefact to pin.

Documentation of an option, not a shipped integration — the backend
selector, pin entry, and verify check are left for a stable release.

Generated-by: Claude Code (Opus 5)
@potiuk

potiuk commented Aug 3, 2026

Copy link
Copy Markdown
Member

I do not want to document it yet. This is question of discussion whether and how and why

@potiuk potiuk closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Eclipse Enclave as an optional container-level sandbox backend

2 participants