Repository navigation
feat(server): serve only on a unix socket with OPENCODEX_UNIX_SOCKET, no TCP at all (AGE-6145) - #59
Open
agentradar-burst-controller[bot] wants to merge 4 commits into
Conversation
…(AGE-6145) With the env set to an absolute path (at most 104 bytes), `ocx start` binds only that unix socket (mode 0600; a stale socket is replaced, a non-socket is refused) and opens no TCP listener: Claude intercept gets requested port 0, the hub link listener is not started, and the CLI skips the liveness fence, port choice and TCP bind probes. Refused beside the unauthenticated loopback listener or hub.managementIngress. Unset: unchanged. Cache/quota impact: none; no routing, account, retry or cache-key code touched. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…it would open TCP) (AGE-6145) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…t (AGE-6145) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… and binds a private socket (AGE-6145) Review findings: runtime Claude intercept start is refused (unix_socket_only) before any listener opens; OCX's own HTTP calls (claude-code state, advisor, routed describe, CLI management calls, direct local probes) go over the socket via selfFetch / directLocalHttpFetch; the socket is bound under umask 0177 in a parent directory that must be a real, own-uid, 0700 directory. Unset env: unchanged. Cache/quota impact: none; no routing, account, retry or cache-key code is touched. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AGE-6145 (Fargate packs, Liza 12-05: unix sockets, not one task per company). With
OPENCODEX_UNIX_SOCKET=<absolute path>set,ocx startserves only on that unix socket and opens no TCP listener, and sends nothing to a loopback TCP port: several companies' OCX processes will share one loopback in a pack task, each as its own Linux user, and OCX asks no key on loopback. Unset: behaviour unchanged. Nothing is released or used until the gateway pack ships (agentradar-gateway #20, held for qa-sec).Bun.serve({ unix })only, under umask 0177 (restored in a finally) plus chmod 0600; the parent folder must be a real directory owned by this uid with no group/other bits; a stale socket is replaced, a non-socket at the path is refused; an absolute path of at most 104 bytes.unauthenticatedLoopbackListener,hub.managementIngressor a fixedclaudeCode.intercept.port; the Claude intercept is refused at start and at runtime (unix_socket_only); no link listener; the CLI skips the liveness fence, port choice and TCP bind probes.selfFetch(socket when set, plainfetchwith the same arguments otherwise) for every call OCX makes to its own API (startup Claude state with the admin token, advisor, routed vision/describe, runtime/account/debug/observe/link status, gateway cache);directLocalHttpFetchconnects by the socket, so stop/doctor/liveness probes do too. The health sentinel is skipped in unix mode.tests/server/unix-socket-only.test.ts11/11 (real server: socket only, no TCP, stale/non-socket/path rules, refusals, private parent, 0600 at bind, selfFetch, runtime intercept refusal); 11 related existing test files re-run, all pass. Files stay under the 2,000-line ratchet.Cache/quota impact: none. No routing, account choice, retry or cache-key code is touched; only how the process listens and how it reaches itself.
HOLD: lands with the pack go-live (qa-sec on agentradar-gateway #20 first).
Code review receipt
Head: 737c5d8
Model: claude-sonnet-5-5
Findings: 5
Verdict: clean
🤖 Generated with Claude Code