Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ SILO implements **defence in depth** across multiple layers:
| Layer | What It Does | How |
|---|---|---|
| **Container hardening** | Prevents privilege escalation and system damage | Non-root user, read-only fs, no capabilities, PID limits |
| **Network isolation** | Restricts egress paths | Native Linux no-NAT bridge; Docker Desktop proxy-routed egress with source allowlist |
| **Network isolation** | Restricts egress paths | Internal (no-NAT) Docker bridge on every platform; `silo-gateway` sidecar relays the proxy on Docker Desktop |
| **Policy engine** | Controls which hosts the agent can reach | YAML rules evaluated per-request; deny by default |
| **Credential isolation** | Keeps API keys away from the agent | Keys stored host-side; proxy injects at request time |
| **Audit trail** | Full visibility into agent behaviour | Unified JSONL log with LLM, tool, egress, trace events |
Expand Down
10 changes: 5 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ silo start
├─ readConfig() Read config from disk (via conf)
├─ assertDockerAvailable() docker info (smoke test)
├─ isContainerRunning() docker inspect (guard against duplicates)
├─ ensureSiloNetwork() docker network create (internal on native Linux)
├─ ensureSiloNetwork() docker network create --internal (every platform)
├─ ensureProxyDaemon() Spawn proxy process (detached)
└─ startContainer() docker run [hardened flags]
```
Expand Down Expand Up @@ -108,9 +108,9 @@ The agent process runs inside a hardened Docker container built from `sandbox/Do
| `--security-opt no-new-privileges` | Blocks setuid/setgid escalation |
| `--pids-limit 128` | Fork-bomb prevention |
| `--cpus <n>` / `--memory <m>` | Resource throttles (from config) |
| `--network silo-sandbox-net` | SILO bridge network (internal on native Linux, standard bridge on Docker Desktop) |
| `--add-host llm.gateway:host-gateway` | Resolve `llm.gateway` to host IP |
| `--add-host <svc>.gateway:host-gateway` | Resolve integration gateways to host IP |
| `--network silo-sandbox-net` | SILO bridge network, created `--internal` on every platform (no direct internet route) |
| `--add-host llm.gateway:host-gateway` | Native Linux only: resolve `llm.gateway` to host IP (on Docker Desktop the `silo-gateway` sidecar carries this alias) |
| `--add-host <svc>.gateway:host-gateway` | Native Linux only: resolve integration gateways to host IP (sidecar aliases on Docker Desktop) |
| `--label managed-by=silo` | Discovery label for `silo list` |

**Environment variables injected:**
Expand All @@ -119,7 +119,7 @@ The agent process runs inside a hardened Docker container built from `sandbox/Do
|---|---|---|
| `http_proxy` / `HTTP_PROXY` | `http://llm.gateway:<port>` | Route HTTP through proxy |
| `https_proxy` / `HTTPS_PROXY` | `http://llm.gateway:<port>` | Route HTTPS through proxy |
| `no_proxy` / `NO_PROXY` | `localhost,127.0.0.1,::1` | Bypass proxy for loopback |
| `no_proxy` / `NO_PROXY` | `localhost,127.0.0.1,::1,llm.gateway` | Bypass proxy for loopback and for the proxy itself |
| `SILO_SANDBOX` | `1` | Indicates SILO sandbox mode |

**Volume mounts:**
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ensureDecrypted("sk-abc123"); // → returns as-is (plaintext passthrough)
| `https_proxy` | Same as `http_proxy` | Container HTTP clients | `http://llm.gateway:<port>` |
| `HTTP_PROXY` | Same (uppercase variant) | Container HTTP clients | Same |
| `HTTPS_PROXY` | Same (uppercase variant) | Container HTTP clients | Same |
| `no_proxy` | Bypass proxy for these hosts | Container HTTP clients | `localhost,127.0.0.1,::1` |
| `no_proxy` | Bypass proxy for these hosts | Container HTTP clients | `localhost,127.0.0.1,::1,llm.gateway` |
| `NO_PROXY` | Same (uppercase variant) | Container HTTP clients | Same |

### Debug Mode
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ silo start
```

This creates the full stack:
1. **Docker bridge network** (`silo-sandbox-net`) — internal/no-NAT on native Linux; proxy-routed on Docker Desktop
1. **Docker bridge network** (`silo-sandbox-net`) — internal/no-NAT on every platform; on Docker Desktop a `silo-gateway` sidecar relays the proxy port
2. **Inference proxy daemon** — listens on `:8199` on the host
3. **Sandbox container** — hardened, isolated, with all security flags applied

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ silo integrations add my-api
silo stop && silo start
```

The new gateway alias is registered as a Docker `--add-host` entry, so the container needs to be recreated.
The new gateway alias is registered as a Docker `--add-host` entry on native Linux, or as a DNS alias on the `silo-gateway` sidecar on Docker Desktop, so the container needs to be recreated (`silo start` also replaces the sidecar when its aliases change).

This works the same in default and `--browser` framework runs. Browser mode adds Chromium and browser tmpfs mounts, but integration gateway aliases such as `slack.gateway` and `github.gateway` still route through the host proxy and never expose tokens inside the sandbox.

Expand Down
5 changes: 3 additions & 2 deletions docs/proxy-and-networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ The SILO inference proxy is a lightweight HTTP proxy server that runs on the hos
└──────────────┬──────────────────────┘
│
│ http://llm.gateway:8199/v1/chat/completions
│ (llm.gateway resolves to host IP via --add-host)
│ (llm.gateway → host IP via --add-host on Linux,
│ or the silo-gateway sidecar on Docker Desktop)
▼
┌──────────────────────────────────────────────────────────────┐
│ PROXY SERVER (port 8199, host machine) │
Expand Down Expand Up @@ -344,7 +345,7 @@ Container HTTP request
↓
http_proxy env var (set by SILO)
↓
DNS: llm.gateway → host-gateway (Docker resolves to host IP)
DNS: llm.gateway → host IP (Linux, --add-host) or silo-gateway sidecar (Docker Desktop)
↓
TCP connection to host:8199
↓
Expand Down
6 changes: 3 additions & 3 deletions docs/sandbox-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ The key insight: **your agent doesn't know it's sandboxed.** SILO uses standard

1. **`http_proxy` / `https_proxy` environment variables** — Set automatically inside the container. Standard HTTP clients (`curl`, Python `requests`, `httpx`, `pip`, `npm`) all respect these and route traffic through the proxy without any code changes.

2. **`llm.gateway` DNS alias** — Docker's `--add-host` injects this hostname into the container's `/etc/hosts`, resolving to the host machine's IP. Agents can target `http://llm.gateway:8199/v1/...` as their LLM endpoint.
2. **`llm.gateway` DNS alias** — On native Linux, Docker's `--add-host` injects this hostname into the container's `/etc/hosts`, resolving to the host machine's IP. On Docker Desktop for macOS/Windows, it is a DNS alias of the `silo-gateway` sidecar, which relays to the host proxy. Either way, agents can target `http://llm.gateway:8199/v1/...` as their LLM endpoint.

3. **SILO Docker bridge** — The container runs on `silo-sandbox-net`. On native Linux this network is created with `--internal` for no-NAT isolation; on Docker Desktop for macOS/Windows it uses proxy-routed HTTP clients plus a Docker-network source allowlist on the host proxy.
3. **SILO Docker bridge** — The container runs on `silo-sandbox-net`, created with `--internal` (no NAT, no direct internet route) on every platform. On Docker Desktop, where an internal network has no route to the host, the `silo-gateway` sidecar relays the proxy port.

---

Expand Down Expand Up @@ -425,7 +425,7 @@ Credential-managed integrations keep the same behavior in browser mode. Gateway
| Feature | NemoClaw | SILO |
|---|---|---|
| **Container hardening** | Basic Docker isolation | Read-only FS, cap-drop ALL, no-new-privileges, PID limits, noexec /tmp, non-root, SILO network, resource throttles |
| **Network model** | Container has internet access | Native Linux no-NAT bridge; Docker Desktop proxy-routed egress with host-proxy source allowlist |
| **Network model** | Container has internet access | Internal (no-NAT) bridge on every platform; `silo-gateway` sidecar relays the proxy on Docker Desktop |
| **Egress policy** | No policy engine | Declarative YAML policy, glob patterns, deny-by-default, hot-reload |
| **API key protection** | Keys passed into container via env vars | Keys **never enter** the container — injected at proxy level |
| **Interactive interception** | Not available | Real-time approve/deny prompts for unauthorized requests |
Expand Down
2 changes: 1 addition & 1 deletion docs/security-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SILO implements **defence in depth** across six isolation layers. Each layer is
| Layer | Threat Mitigated | Mechanism |
|---|---|---|
| **Container Hardening** | Privilege escalation, system damage | Non-root, read-only FS, no capabilities, PID limits |
| **Network Isolation** | Data exfiltration, C2 communication | Native Linux no-NAT bridge; Docker Desktop proxy-routed egress with proxy source allowlist |
| **Network Isolation** | Data exfiltration, C2 communication | Internal (no-NAT) Docker bridge on every platform; `silo-gateway` sidecar relays the proxy on Docker Desktop |
| **Policy Engine** | Unauthorised outbound access | YAML rules evaluated per-request, deny by default |
| **Credential Isolation** | API key theft | Keys stored host-side, injected at request time |
| **Encryption at Rest** | Config file theft, key exposure | AES-256-GCM with machine-bound PBKDF2 key |
Expand Down
17 changes: 8 additions & 9 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ echo $http_proxy
echo $https_proxy
# Should show: http://llm.gateway:8199

# Check /etc/hosts
cat /etc/hosts | grep llm.gateway
# Should show: <host-ip> llm.gateway
# Check that llm.gateway resolves
getent hosts llm.gateway
# Native Linux: the host IP (from the --add-host entry in /etc/hosts)
# Docker Desktop: the silo-gateway sidecar's IP (Docker DNS alias, not in /etc/hosts)

# Exit sandbox and check the Docker network
exit
Expand Down Expand Up @@ -443,12 +444,10 @@ docker network rm silo-sandbox-net
# Enter the sandbox
silo connect

# Check hosts file
cat /etc/hosts
# Should show: <host-ip> llm.gateway

# Test resolution
ping llm.gateway # Should resolve to host IP
# Test resolution (ping won't work: the sandbox drops CAP_NET_RAW)
getent hosts llm.gateway
# Native Linux: the host IP (from the --add-host entry in /etc/hosts)
# Docker Desktop: the silo-gateway sidecar's IP (Docker DNS alias, not in /etc/hosts)

# Test proxy connection
curl http://llm.gateway:8199/_silo/health
Expand Down
2 changes: 1 addition & 1 deletion sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# --cap-drop ALL All Linux capabilities dropped
# --security-opt no-new-privileges
# --pids-limit 128 Fork-bomb protection
# --network none No direct network (inference proxy handles egress)
# --network silo-sandbox-net Internal bridge, no direct internet route
# =============================================================================

FROM python:3.12-slim AS base
Expand Down
Loading