Skip to content

Lane C plan v3 (FLT-407 OpenClaw, FLT-406 Twenty)

Revised from goldfish round on v2: Jenny REVISE, Susie NEEDS-CLARIFICATION, Cedric(Focus) NOT-READY, Gronktayvius red team VETO (V1-V9). Raw: WT-0286-goldfish/. Council round 1 raw: WT-0286-council-out/.

Context (facts verified 2026-11-05)

  • Bedroom PC: Docker server 29.6.1 answered, 10.8 GB RAM free of 31.4, C: 250 GB free. Daemon OS/engine mode (Docker Desktop VM vs WSL2 vs native) NOT yet recorded: first act of S4/T3 is to record it (docker info) because probe method depends on it.
  • Real gateway :4319 not ready (I1 auth targeted Nov 6, gateway-land). FLT-355/G2 To Do. forge-boot FLT-389 To Do, no code. Forge.Core unmet as of 11-03.
  • Andrew said yes (2026-11-05, relayed) to G0-b containment in place of G2 for OpenClaw, CONDITIONAL on: (1) security-veto goldfish passes, (2) red-team re-seat does not return NO. As of v2 the veto stage returned VETO, so OpenClaw stays held until v3 passes both.
  • Every OpenClaw result labeled "stub gateway; preconditions unmet, provisional"; no full fit verdict until rerun on real :4319.

Ordering decision (Jenny, adopted)

FLT-406 Twenty does not touch the gateway: run it FIRST (starting now, as orchestrator allowed). FLT-407 non-container work (S0-S3: stub code, tests, advisory table, schema) may proceed; NO OpenClaw container starts until both conditions above are met.

Shared harness (Jenny, adopted)

One C# project Forge.Lane.Harness (worktree branches below): (a) request recorder/responder container used as the stub gateway (407) and as the webhook sink (406); (b) ContainerPolicy checker using Docker.DotNet, shared by both lanes. No outbound HttpClient in the sink, fixed status codes, no URL fetch from bodies, request body size cap (bounded stream read before buffering), tmpfs storage.

Gate G0 (hard stop)

G0-a precondition table with receipts. G0-b containment substitution for OpenClaw only, with these fail-closed rules:

P1 Bind-to-inspected-ID (V1). Containers are created ONCE (docker compose create/--no-start), IDs recorded. No later up/create/recreate. Immediately before start, re-inspect each ID, abort on any spec drift vs recorded spec hash, start with docker start <id> only. Check: a test that recreates a container between inspect and start must abort. P2 Closed fail-closed predicate (V2). ContainerPolicy asserts EXACT values; missing/null = FAIL: Privileged=false; CapDrop=[ALL]; CapAdd empty; Devices empty; Sysctls empty; PidMode/UsernsMode/IpcMode not host; PublishAllPorts=false; ExtraHosts empty; SecurityOpt contains no-new-privileges and no seccomp/apparmor=unconfined; ReadonlyRootfs=true; tmpfs mounts all noexec,nosuid,nodev; Config.User = non-zero numeric uid; Mounts = exactly one bind (the config file, read-only, mode 0400); no docker.sock/Docker named pipe/parent dir/shared volume; mem_limit and pids_limit numeric and non-zero (OpenClaw 1 GB/256 pids, stub 256 MB/128, thin-host 256 MB/128); no .env interpolation (compose --env-file explicit empty) and launching env scanned for real credentials; Env values only recorded fakes; HEALTHCHECK must be loopback-only or absent. P3 Three-phase network proof (V3). Docker has no netns for a created container, so: (1) pre-start inspect: every attached network Internal=true, no gateway, IPv6 off, zero host ports for OpenClaw, stub and thin-host. (2) start a throwaway probe container (OpenClaw image NOT used; minimal image, entrypoint = probe binary, same network, same security spec) and run probes with an explicit expected error-class allowlist; any other outcome (success, connected-then-timeout, unknown error) FAILS: positive = authenticated call to stub only; negatives = external IP literal, external DNS name, a name resolving to a forbidden address, host.docker.internal, bridge gateway, 169.254.169.254, IPv6 metadata literal. Each probe has a timeout. (3) only then docker start the real OpenClaw ID. Daemon OS recorded first. P4 Closed config schema (V4). Repo-committed JSON schema: exactly one baseUrl equal to the stub's internal DNS name; no other URL-shaped string anywhere; unknown key = FAIL; all of tools/exec/elevated/plugins/agent-to-agent/mcp serve/acp/channels explicitly off. Runtime probes show exec, tools, plugins and channels REFUSE (not just file present). The 8 High advisories: S1 pastes each as a row {id, affected, mitigation = checker predicate or "not config-mitigable"}; an advisory marked not config-mitigable blocks OpenClaw. No G0-b use before this table exists and is reviewed. P5 Placement (V5). The thin-host client is a THIRD container on the same internal network under the same predicate; zero host ports on OpenClaw, stub and thin-host. Stub auth stays on; S3's 401 stays 401 when forwarding headers and a JSON principal are both present. P6 Host boundary (V9). The proof is only as good as the host. Proposal (needs orchestrator OK): run FLT-407 in a disposable WSL2 distro on bedroom with automount=false and interop off (no /mnt/c, no fleet secrets, no source checkouts), Docker engine inside that distro, distro imported fresh and unregistered at the end; OR wait for G2/forge-boot. A cleaned shell env alone is NOT the host boundary. If bedroom cannot do this, pause and ask. P7 Output hygiene (V7). Gitleaks + schema allowlist on the FLT-407 report/recorded requests BEFORE any write to disk/repo. Sink storage tmpfs. Every exit path (including failure) removes containers, networks, volumes and container log files.

FLT-407 steps

S0 worktree wt/WT-0286/FLT-407; harness + checker + tests there; council review gate. S1 docs + 8 High advisories -> table (P4). Fails if any row lacks an enforced mitigation or is not-config-mitigable. S2 pin digests by repo record; trust: record a second source for each digest (vendor signature or release page) and image CVE scan that FAILS on High; scanner unavailable = FAIL; dotnet list package --vulnerable on the harness. S3 red tests first (stub): 401 unauth; 400/403 client tools/system text/principal; 401 holds with spoofed forwarding headers; positive 200; body-size cap; then green. S4 P1-P5 pre-start proof. Abort-all on any failure. S5 start; drive thin-host calls; record emitted requests (do client tools/system/principal appear in OpenClaw's outbound request: thin-host fit signal); assert only expected listeners inside the internal net. S6 Teardown in try/finally with unique compose project name; verify project containers/networks/volumes/log files gone; no residual listener. S7 Report: label "stub gateway; preconditions unmet, provisional"; P7 scan before write; next step = rerun on real :4319 after I1/I3a.

FLT-406 steps (starts now)

T0 worktree wt/WT-0286/FLT-406; Forge.Adapters.Twenty + tests; digests pinned (+ second-source + CVE scan, same rule). T1 Topology (Jenny): Twenty server/worker/pg/redis on internal: true networks only; NO host ports on Twenty itself; pg/redis on a data net the sink is NOT attached to; a tiny loopback-bound reverse-proxy sidecar is the only container with a host publish, exactly 127.0.0.1:<port> (inspected bind address must equal that, empty HostIp or 0.0.0.0 or [::] = FAIL) and it has no route to anything but Twenty. Twenty server/worker have no external route; webhook target = shared sink container only (on a net with Twenty server/worker, not pg/redis). ContainerPolicy P2 applies; mem budgets: server 1.5 GB, worker 1 GB, pg 1 GB, redis 256 MB. T2 Datastore auth (V8): commit pg_hba and redis config; assert those bytes inside the created container; reject trust; requirepass set to fake; protected-mode on. T3 Healthy first: bounded waits with deadlines; pg healthy + Twenty migrations done + worker up; migration failure/deadline = FAIL; smoke asserts HTTP status + body shape + bind address. Record daemon OS here first. T4 Producer-contract discovery BEFORE tests (Cedric): from live Twenty docs + the running container, document: webhook signature scheme, raw-body handling, timestamp header, delivery/event id (decide: if no event id, derive idempotency key and define persistence/atomicity/restart behavior, or the duplicate path does not ship). Mark each as live-doc-verified or not. T5 Red tests first, must fail the build: missing signature; wrong signature; one body byte flipped; alg confusion; reused delivery id; PARALLEL concurrent duplicates (Task.WhenAll) -> exactly one accept; timestamp outside window; spoofed X-Forwarded-*/Forwarded headers; unknown JSON member -> reject (JsonUnmappedMemberHandling.Disallow, source-generated context); any :// or host-shaped value -> reject; YouTrack link = bare id ^[A-Z][A-Z0-9]+-\d+$, host a constant; no GitHub field; no PII fields; body size cap; CancellationToken honored; constant-time compare (FixedTimeEquals); no outbound HttpClient in adapter. Verification+constant host run before any parse. T6 Capture real payload into the sink (not committed raw). Fixture rule (V7): commit ONLY a schema-allowlisted redacted body (exact JSON paths); scan raw bytes AND decoded JSON (unicode escapes, userinfo URLs, scheme-relative hosts); any extra path = commit fails; record sha256 + origin comment (image digest, route, timestamp). Boot logs never committed. Because redaction changes the producer's bytes, the redacted fixture's structure is checked against the unredacted capture's path list. T7 Fixture byte-hash test + tests go green; Stryker.NET break > 0 on Forge.Adapters.Twenty; dotnet build -warnaserror; Semgrep/CodeQL REQUIRED (unavailable = FAIL); DAST stage: build-failing scan of the sink/webhook listener on 127.0.0.1 only (not a pentest; active exploitation needs FLT-176). T8 Gate order: tests+scans green -> /council-code-review -> commit -> smoke bound to the exact commit SHA -> FF-push -> sync-push.ps1 (peers pull). Teardown in try/finally with unique compose project name; verify containers/networks/volumes/log files removed.

Cross-cutting

No visible consoles (hidden non-interactive, tracked background jobs). RAM: check free RAM + docker version + presence before each start; total stack budget <= 4 GB per lane, lanes not run concurrently with Stryker. Never gaming/streaming PC. No cloud resources in this lane; Terraform N/A (local compose only). Frontend/PageAgent: out of scope, post-code gates unaffected.