Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a1a4429
spec(container-gateway): design for podman / docker inside the sandbox
potiuk Sep 19, 2026
8a7c331
feat(container-gateway): scaffold the tool and register it
potiuk Sep 19, 2026
0068883
docs(container-gateway): drop em dashes from README and tool.md
potiuk Sep 19, 2026
dbf65d3
feat(container-gateway): project slug, label and filter helpers
potiuk Sep 19, 2026
f9d59ef
feat(container-gateway): route compat and libpod API paths
potiuk Sep 19, 2026
d163adc
feat(container-gateway): create-time policy rules and rewrites
potiuk Sep 19, 2026
ef003b0
fix(container-gateway): fail-closed create policy — canonical spellin…
potiuk Sep 19, 2026
1ce0baf
fix(container-gateway): close namespace and network escapes; total sh…
potiuk Sep 19, 2026
797fee0
fix(container-gateway): fail-closed network classifier for netns and …
potiuk Sep 19, 2026
b20ff84
fix(container-gateway): network grammar fullmatch, default network la…
potiuk Sep 19, 2026
686f611
feat(container-gateway): request decisions, label filters, image rules
potiuk Sep 19, 2026
943808e
fix(container-gateway): fail-closed decide() — label spelling on reso…
potiuk Sep 19, 2026
078e9d0
feat(container-gateway): discover podman and docker backends
potiuk Sep 20, 2026
341f525
feat(container-gateway): HTTP/1.1 framing for the unix-socket relay
potiuk Sep 20, 2026
881661b
fix(container-gateway): strict HTTP framing — reject smuggling shapes…
potiuk Sep 20, 2026
ecc52bf
fix(container-gateway): parse multi-word status reasons; encode re-ch…
potiuk Sep 20, 2026
e549faf
feat(container-gateway): relay with label pre-check, streaming and hi…
potiuk Sep 20, 2026
a79c489
fix(container-gateway): segment-exact ID rewrite; volume pre-create f…
potiuk Sep 20, 2026
e4ee1e5
fix(container-gateway): volume pre-create verifies ownership; bound i…
potiuk Sep 20, 2026
156add2
feat(container-gateway): daemon lifecycle and serve/stop/status CLI
potiuk Sep 20, 2026
6621768
fix(container-gateway): harden the daemon against a hostile project t…
potiuk Sep 20, 2026
10c6874
fix(container-gateway): validate run dir on status/stop; keep the liv…
potiuk Sep 20, 2026
74a6eca
feat(agent-isolation): session hook that starts and stops the contain…
potiuk Sep 20, 2026
267a9dc
fix(agent-isolation): container-gateway hook trusts only installed or…
potiuk Sep 20, 2026
46d3b4c
test(agent-isolation): hermetic HOME and real precedence check for th…
potiuk Sep 20, 2026
7bb33ac
test(container-gateway): socket-length test uses a literal short path
potiuk Sep 20, 2026
d036095
feat(sandbox): point CONTAINER_HOST / DOCKER_HOST at the container ga…
potiuk Sep 20, 2026
89f8bbf
docs(sandbox): container gateway in the setup guide, catalog and RFCs
potiuk Sep 20, 2026
8c72458
feat(setup): doctor, verify and install know the container gateway
potiuk Sep 20, 2026
5b6f5c5
fix(setup): check gateway serving state before the socket-file test
potiuk Sep 20, 2026
1ecda48
fix(container-gateway,sandbox-lint): tighten stop's process check and…
potiuk Sep 20, 2026
0ef8deb
docs(container-gateway): flip spec status to experimental and close r…
potiuk Sep 20, 2026
d3fcaee
test(container-gateway): integration suite against a real backend
potiuk Sep 20, 2026
f29ff41
fix(container-gateway): short socket paths and robust teardown in the…
potiuk Sep 20, 2026
e469810
fix(container-gateway): make the create body an allow-list
potiuk Sep 20, 2026
232a591
fix(container-gateway): policy the build query, the exec body and the…
potiuk Sep 20, 2026
0f200c5
fix(container-gateway): keep the hook's trust model and the bind root…
potiuk Sep 20, 2026
cf2b372
docs(container-gateway): record the allow-list posture, the limits, a…
potiuk Sep 20, 2026
e39052f
fix(container-gateway): close the volume-driver and case bypasses, st…
potiuk Sep 20, 2026
7be4ef4
fix(container-gateway): judge a build output by its destination, not …
potiuk Sep 20, 2026
2061ba5
chore(container-gateway): regenerate the derived tables after the rebase
potiuk Sep 20, 2026
33f4a3c
fix(container-gateway): anchor the run-directory checks at what the g…
potiuk Sep 20, 2026
9a2ab3b
fix(container-gateway): shut the daemon down promptly with connection…
potiuk Sep 20, 2026
e80ec25
fix(container-gateway): stop the TCP listener teardown blocking on CI
potiuk Sep 20, 2026
d99be92
fix(container-gateway): close the last five CodeQL alerts in the tests
potiuk Sep 20, 2026
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
4 changes: 4 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"CONTAINER_HOST": "unix://./.apache-magpie-local/run/podman.sock",
"DOCKER_HOST": "unix://./.apache-magpie-local/run/docker.sock"
},
"sandbox": {
"enabled": true,
"excludedCommands": [
Expand Down
2 changes: 1 addition & 1 deletion docs/adapters/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ replaces — code review.
Run the static validator from the framework or snapshot:

~~~bash
uv run --directory tools/sandbox-lint --group dev sandbox-lint --codex .codex
uv run --project tools/sandbox-lint --group dev sandbox-lint --codex .codex
~~~

Then test native rule classification:
Expand Down
1 change: 1 addition & 0 deletions docs/labels-and-capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ or a contract-free mix of substrates (e.g. `tools/spec-inventory` is
| [`tools/dashboard-generator`](../tools/dashboard-generator/) | `substrate:analytics` | Self-contained HTML dashboard generator |
| [`tools/dev`](../tools/dev/) | `substrate:framework-dev` | Framework dev-loop helpers |
| [`tools/egress-gateway`](../tools/egress-gateway/) | `substrate:sandbox` | Egress-allowlist forward proxy (proxy.py plugin); host-level egress chokepoint — defence-in-depth for RFC-AI-0003 §4.4 |
| [`tools/container-gateway`](../tools/container-gateway/) | `substrate:sandbox` | Per-project policy proxy for the podman / docker API; label-scoped, mount- and privilege-checked container access from inside the sandbox |
| [`tools/forwarder-relay`](../tools/forwarder-relay/) | `contract:report-relay` | Adapter contract for inbound-relay backends (ASF Security relay, huntr.com, HackerOne triagers). Pure interface spec; adapters declare detection + credit-extraction + reporter-addressing rules. |
| [`tools/bitbucket`](../tools/bitbucket/) | `contract:change-request` + `contract:tracker` | Coverage: `partial`. Bitbucket Cloud and Bitbucket Data Center bridge foundation for repository metadata context, branch restriction context for PR-management decisions, pull-request discovery/fetching, read-only commit fetching, read-only diff fetching, comments-only discussion fetching, read-only review-state fetching, Cloud-only pull-request task listing/fetching, read-only merge-check context fetching, and read-only status fetching, plus narrowly scoped Cloud pull-request comment creation and approve/unapprove actions. Tracker coverage includes Cloud-only issue listing/fetching, issue comment fetching, issue attachment metadata fetching, and confirmed issue-comment creation. The `partial` qualifier means this tool implements named contract operations but does not satisfy the complete contract and must not be counted as a complete/selectable backend. Broader pull-request review/mutation, broader issue writes, and linked Jira handoff coverage remain incomplete. |
| [`tools/fossil`](../tools/fossil/) | `contract:tracker` + `contract:source-control` | Fossil SCM forge bridge: integrates local SQLite-backed ticket tracking, wiki, and forum reads with the version-control shim |
Expand Down
10 changes: 5 additions & 5 deletions docs/mode-economics.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ special-token spellings counted as ordinary text.
Coverage: **75 of 75 local `skills/*/SKILL.md` files**.
External `source.md` redirects and harness symlinks are excluded.

Measurement manifest SHA-256: `0ef06f4874382739a4738d35ec92e689f0483db6e99292c4accc72836d0619ad`.
Measurement manifest SHA-256: `5ab15771b5022fff4f3fc54bba6ba3302719af5c333aa7651121cb1b9380d0db`.

| Skill file | Measured tokens | Source SHA-256 (first 16 characters) |
|---|---:|---|
Expand Down Expand Up @@ -159,10 +159,10 @@ Measurement manifest SHA-256: `0ef06f4874382739a4738d35ec92e689f0483db6e99292c4a
| [security-model-verify](../skills/security-model-verify/SKILL.md) | 6,625 | `cde155672857b33c` |
| [security-tracker-stats-dashboard](../skills/security-tracker-stats-dashboard/SKILL.md) | 4,897 | `b52154deb8557ba4` |
| [setup](../skills/setup/SKILL.md) | 8,724 | `82788542bb240309` |
| [setup-isolated-setup-doctor](../skills/setup-isolated-setup-doctor/SKILL.md) | 6,287 | `a39955c3ae92e306` |
| [setup-isolated-setup-install](../skills/setup-isolated-setup-install/SKILL.md) | 9,313 | `867d0becf43bd736` |
| [setup-isolated-setup-update](../skills/setup-isolated-setup-update/SKILL.md) | 4,717 | `5afb01aaf8bbac99` |
| [setup-isolated-setup-verify](../skills/setup-isolated-setup-verify/SKILL.md) | 6,718 | `e6a10ad7f569db31` |
| [setup-isolated-setup-doctor](../skills/setup-isolated-setup-doctor/SKILL.md) | 7,651 | `7485a409d69de376` |
| [setup-isolated-setup-install](../skills/setup-isolated-setup-install/SKILL.md) | 10,059 | `d2a1e98a9f2c3b38` |
| [setup-isolated-setup-update](../skills/setup-isolated-setup-update/SKILL.md) | 4,843 | `60bab0e30ac2e25a` |
| [setup-isolated-setup-verify](../skills/setup-isolated-setup-verify/SKILL.md) | 7,410 | `e5c4cd00e97147ad` |
| [setup-override-upstream](../skills/setup-override-upstream/SKILL.md) | 4,012 | `fb583feb56b7f77c` |
| [setup-privacy-llm](../skills/setup-privacy-llm/SKILL.md) | 2,145 | `0e27b542a1656846` |
| [setup-shared-config-sync](../skills/setup-shared-config-sync/SKILL.md) | 4,357 | `d1dfcd7cdeb5f5a6` |
Expand Down
6 changes: 6 additions & 0 deletions docs/rfcs/RFC-AI-0003.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ The gateway runs **outside the sandbox** — it must bind a listener and make un

This mechanism is **optional and provisional**: it ships as a tool with a documented contract and unit-tested allowlist policy, but it is not yet wired into a setup skill or the `privacy-llm-check` gate. See §10.6.

The same pattern, a per-project policy proxy outside the sandbox whose socket is the only one the sandbox may reach,
is reused by [`tools/container-gateway/`](../../tools/container-gateway/) for the container daemon socket.
That gateway also hands every container it creates this egress gateway as its HTTP proxy,
so container traffic that honours proxy variables is bound by the same host allow-list.
RFC-AI-0004 Principle 2 lists both as the *socket gateways* layer.

## 5. Data flow

```text
Expand Down
1 change: 1 addition & 0 deletions docs/rfcs/RFC-AI-0004.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ The reference implementation (see [`docs/setup/secure-agent-internals.md`](http
|---|---|---|
| **0. Clean environment** | Inherited credential-shaped env vars (`$AWS_*`, `$GH_TOKEN`, `$ANTHROPIC_API_KEY`, …). | A shell wrapper (`claude-iso`) that strips the agent's process env to a project-declared whitelist before exec. |
| **1. Filesystem + network sandbox** | Bash subprocess reads outside the project tree; outbound HTTPS to non-allowed hosts. | Linux: `bubblewrap` user-namespace + `socat` SNI proxy. macOS: `sandbox-exec`. |
| **1b. Socket gateways** | Daemon sockets that are root-equivalent over their mounts (container runtimes), and container network egress the sandbox proxy never sees. | Per-project policy proxies running outside the sandbox: `tools/egress-gateway` (host allow-list, RFC-AI-0003 § 4.4) and `tools/container-gateway` (label-scoped, mount- and privilege-checked container API, egress-gateway injected as the containers' proxy). The sandbox may reach only the gateways' own sockets, never the daemon socket. |
| **2. Tool permissions** | The agent's own Read/Edit/Write/Bash tools touching denied paths or binaries. | The agent host's permission system (e.g., Claude Code's `permissions.deny`). |
| **3. Forced confirmation** | Visible-to-others writes that haven't been seen by a human. | `permissions.ask` for every state-mutating shell call (e.g., `gh pr create`, `gh issue edit`, `gh gist *`, `gh secret *`). Implements Principle 1 at the OS layer. |

Expand Down
Loading
Loading