2026-11-06: Four Hinges Behind the Airlock

An airlock only holds if nobody threads a pull-cord through the hinge pin. Six days after Six Daemons Forged in Rust moved our perimeter gateways onto compiled binaries, a red-team sweep across the haus traced every cross-trust hop from sanctum-vm and the tailnet back into manoir. None of the weak spots sat in the front door. Every single one hid in a convenience seam behind it: a shell string assembled for SSH, a loopback forwarder inside Lima, a two-message prompt envelope from OpenClaw, and a canonical route prefix that trusted PUT alongside POST.
Replacing the shell wire in vault.sh
Section titled “Replacing the shell wire in vault.sh”For months, memory-vault/scripts/vault.sh bridged VM and satellite agents to the authoritative Obsidian tree on manoir through a helper called vault_run. Strings crossed trust boundaries raw. That helper interpolated caller arguments into inline Python snippets and handed the resulting string to bash -c locally or ssh "$MAC_SSH" remotely. Single-quote escaping stopped casual typos, not hostile filenames or metacharacters, while path checks compared string prefixes without canonicalizing symlinks and concurrent same-second send bursts overwrote the same <from>-<epoch>-<slug>.md inbox file.
We deleted vault_run outright. vault_py took its place:
- Zero remote shell or code shipping. Local calls invoke
python3 -c "$VAULT_PY_BACKEND"directly viaexecveargv vectors with--option guards. Remote SSH calls (vault.sh,agy-vault.sh,grok-vault.sh, andscreen.sh) serialize only structured JSON argv vectors onstdininto static--stdin-jsonentrypoints onmanoir. Neither shell metacharacters nor executable Python source ever cross the SSH wire. - Canonical vault containment. Every
search,read,write,list,send,read-msg,ack,seen, andboardpath resolves throughos.path.realpathcontainment againstVAULT_DIR, rejecting..traversals,.git/writes, and file or directory symlink escapes. - Collision-free atomic delivery.
sendnow opens inbox notes withO_CREAT | O_EXCL | O_WRONLY(0644) and appends.2,.3sub-second sequence suffixes under concurrent bursts while preferring exact stem matches onackandseen.
Closing Lima’s loopback reflection on :42069
Section titled “Closing Lima’s loopback reflection on :42069”Binding haus.sanctum.memory-vault to 127.0.0.1 (sanctum-cli service-user template bd3191f) stops LAN and tailnet peers from reaching :42069, yet Lima’s user-mode network stack forwards guest traffic addressed to host.lima.internal straight onto host 127.0.0.1. From inside sanctum-vm, a loopback bind alone still looks wide open.
We sealed memory-vault-mcp at two independent layers inside sanctum-rs:
- Opt-in constant-time HTTP bearer gate.
/v1/searchand/v1/readnow inspectMEMORY_VAULT_HTTP_TOKEN. When unset or empty — the production default onmanoir, where MCP clients speak stdio — both routes return404 {"error":"disabled"}while/and/healthstay200for liveness probes. When a token is configured,memory-vault-mcprequiresAuthorization: Bearer <token>verified byte-for-byte in constant time, rejects query-parameter tokens, and logs unauthorized peer socket addresses without echoing secret query strings. - Symlink-aware
Vault::resolveandwalk_md. Even for local MCP stdio callers,Vault::resolvenow walks existing ancestor components viafs::symlink_metadataplusfs::canonicalizecontainment, and full-text directory walks skip symbolic links before reading disk.
Keeping Cilghal and Jocasta on the box during outages
Section titled “Keeping Cilghal and Jocasta on the box during outages”In sanctum-proxy (:4040), two subtle interactions threatened on-box privacy for Cilghal and Jocasta turns:
- The OpenClaw two-user-message blind spot. OpenClaw splits each turn into two consecutive
role: "user"blocks: the operator’s prompt followed by a short runtime context block (Runtime: agent=cilghal ...).route::is_high_stakesinspected onlymessages.last(), which read the benign runtime footer and missed sensitive clinical or legal keywords one element earlier.is_high_stakesnow scans everyuserblock in the active turn — everything after the last non-toolassistantreply — preserving privacy routing across intra-turn tool loops and resetting cleanly on the next casual turn. - Server-side off-box ladder stripping. Even after a privacy reroute selected
council-mlx, outage fallback chains could still step down onto localhost subscription shims (:3456Claude Max,:6543Gemini,:4200Grok) that look local by socket address yet forward prompts to external cloud APIs.ModelEntry::is_on_box_inferenceandrequires_on_box_privacynow strip every cloud provider and every subscription shim from the candidate ladder on privacy reroutes and dedicated private seats (cilghal-health,council-heretic,council-crm). If local MLX is down,proxydfails closed with503rather than leaking a private turn off-box. - Dual-locked memory exclusion.
MemoryConfigkeepsmemory.enabled: falsepinned inconfig.yamlandsanctum-doctor.sh, and excludescilghalandjocastain Rust even if an operator ever enables background recall for general seats.
Locking Windu’s state table and localizing dench
Section titled “Locking Windu’s state table and localizing dench”The same compile pass closed two remaining perimeter seams in sanctum-airlock, building on The Fortress That Became a Product and The Corridor and the Quartet:
| Surface | Previous behavior | Hardened contract |
|---|---|---|
sanctum-ha-gateway (:8199) |
Allowed GET and PUT on /api/states/*, letting a compromised VM forge Home Assistant entity state (alarm_control_panel.alarmo) without firing physical service calls |
Allows read-only GET /api/states/* (200) and rejects PUT /api/states/* with 403 before Windu service evaluation |
sanctum-dench (:80) |
Fallback bind defaulted to 0.0.0.0:80 and accepted any peer socket reaching launchd’s listener |
Defaults fallback bind to 127.0.0.1:80 and enforces is_dench_peer_allowed, admitting loopback and RFC1918 LAN (holocron.local and a local notifier) while rejecting RFC6598 tailnet and WAN peers (403) unless DENCH_ALLOW_TAILNET=1 |
yoda-token-minter (F4) |
Verified live tailnet tag:admin enforcement without hermetic regression tests |
Pinned in ~/.sanctum/tests/test_livekit_token_minter.py (2/2 pytest) verifying untagged peers receive 403 and tag:admin peers mint scoped room tokens |
sanctum-doctor.sh enforces those vault invariants on every run: sanctum-vm probing host.lima.internal:42069/v1/read must receive 000, 401, or 404, every non-loopback interface on manoir must refuse :42069/health at TCP connect (curl exit 7), and proxyd must report memory.enabled: false.
Second sweep: sealing the hypervisor floor and the LAN control plane
Section titled “Second sweep: sealing the hypervisor floor and the LAN control plane”Once the four application hinges were pinned, we ran a second full-estate sweep across every socket, mount table, firewall chain, and SSH key on manoir, sanctum-vm, chalet, and mbp. An application token on :42069 means little if the hypervisor still shares the host home directory underneath it. Seven deeper structural seams came out of the floorboards in one pass:
- Lima
virtiofsunmount andhost.lima.internalreflection drop. Default Lima templates mount the host home tree overvirtiofsand forward arbitrary TCP ports through the user-mode NAT gateway onto host127.0.0.1listeners (signal-cli:8080, OAuth shims:3456/:4200/:6543,msg-bus:4076). We unmounted the host tree live insidesanctum-vm, pinnedmounts: []in trackedlima/sanctum-vm.lima.yaml, and added a pre-RFC1918lima_host_reflect_blockeddrop rule inlima/sanctum-vm-nftables.confallowing only DNS (:53) and DHCP (:67/:68) to Lima’s user-mode gateway while keeping the routed vmnet airlock bridge intact. vm-ssh-gate.shforced-command allowlist — plus the healer that kept undoing it. Tracing whysanctum-vmheld an unrestrictedauthorized_keysentry revealed a classic self-inflicted regression: every fifteen minutes,jocasta-bridge-heal.shverified SSH reachability and, on transient failure, appended the bare VM public key straight back intoauthorized_keys. Bothauthorized_keysandjocasta-bridge-heal.shnow pin VM keys torestrict,command=".../vm-ssh-gate.sh", an exactSSH_ORIGINAL_COMMANDdispatcher admitting only the three MCP stdio shims (jocasta,ha-green,firewalla),vault.sh --stdin-json,screen.sh --stdin-json,memory-sentinel.sh, and health probes (exit 126on anything else). Satellite sync keys carryno-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty.- Forwarded control-plane auth,
tailscale whoispeer gates, and localhost CSRF shields. An orphaned October socket-probe cluster (python3 -m http.server+nclisteners) was swept and permanently guarded insanctum-doctor.sh. Insanctum-force-flow(:4077, fronted on LAN by PQ-terminator:4078), forwarded requests toPOST /notifynow requireSCREEN_CONTROL_TOKEN, whileGET /history,GET /haus-health, andGET /vault/brainrequire eitherSCREEN_CONTROL_TOKENor a verifiedtag:sanctum-admin/ personal tailnet identity via cachedtailscale whois --json(401to unauthenticated LAN callers, preserving notarized Holocron reads).meeting-briefs-server.py(:2600) enforces the sametailscale whoispeer gate (403totag:satellite), symlink refusal, andContent-Security-Policy: default-src 'none'. Finally,sanctum-msg-bus(:4076),sanctum-sub-proxy(:6543,:4200), andsanctum-watchdog(:2187) now reject cross-site browserPOSTdrive-bys (Sec-Fetch-Site: cross-siteor externalOrigin) with403.
Four hinges in Pass 1; seven floorboard bolts in Pass 2. sanctum-doctor.sh checks them on demand — and Windu now enforces them around the clock.
Arming Windu: twelve perimeter probes and a preemptive tripwire
Section titled “Arming Windu: twelve perimeter probes and a preemptive tripwire”Fixing a gate once stops yesterday’s intrusion. Teaching Windu to guard every hinge continuously stops tomorrow’s before it reaches the inner door:
- Twelve twice-confirmed posture probes in
security-posture-sentinel.sh. First we fixed a subtle clobber bug where a non-loopback Heretic (:6669) exposure assignedoverall="RED"directly instead ofpage_red=1, allowing the final summary block to overwrite the verdict back toGREEN. Then we expanded the sentinel from six checks to twelve, adding twice-confirmed functional probes for:42069Memory Vault loopback + unauthenticated read refusal (vault42069),:4077Force-Flow forwarded control-plane auth (ff4077),:8199Home Assistant airlockPUT /api/states/*refusal (ha8199),:2600morning-briefing forwarded refusal (briefs2600),:4076/:6543cross-site browser CSRF403shields (csrf), and rogue ad-hochttp.server/ socket-probe sweeps (roguehttp). - Armed
airlock_isolationDRI check + Sith intrusion tripwire inwindu-doctor.py. Hourlywindu-doctor(7/7checks) now verifiesmounts: []in Lima, zero guest/Usersmounts, activelima_host_reflect_blocked+cve98432nftableschains insideyoda, live000drop onhost.lima.internal:8080,vm-ssh-gate.shpins across bothauthorized_keysandjocasta-bridge-heal.sh, andproxydmemory.enabled: false. On top of structural checks, an intrusion tripwire escalates through Force Flow the moment it fires. - Kernel-advisory durability, Darwin/Linux Tailscale alignment, and live digest attestation. We committed Windu’s previously untracked
CVE-2026-98432kernel-advisory module (kernel_advisory.py, Firewallapost_main.dTCP IP-options drop, andyodanftables.dinclude), eliminated false-positivetailscale-fleet-currencyalerts when Homebrew ships a Darwin-only point release ahead of Linuxtailscale/tailscale:latest, and wiredwindu-ha-report.pyto append Windu’s live7/7DRI shield status to nightly perimeter and daily digest dispatches.
The bulkhead holds from both sides — and Windu’s blade is drawn at the threshold.