Finding
The default MCP socket lives in a dedicated runtime directory, but an explicit mcp.socket_path override is returned unchanged. Bridge startup nevertheless assumes every socket parent is owned by Harmonia, creates it, and changes its permissions to 0700. A valid override can therefore mutate an arbitrary existing directory rather than only the socket endpoint.
Evidence
crates/horismos/src/subsystems.rs:652-659 accepts an arbitrary path override.
crates/archon/src/mcp_bridge.rs:96-117 returns that override unchanged while documenting the ownership invariant only for the derived default directory.
crates/archon/src/mcp_bridge.rs:615-620 calls create_dir_all(parent) and then set_permissions(parent, 0700) unconditionally.
- With
socket_path = "/tmp/harmonia.sock", privileged startup would privatize /tmp; ordinary startup is likely to fail while trying. The same behavior can remove group/other access from any shared application directory selected by configuration.
Why this matters
A socket location option unexpectedly carries directory-wide authority. Under elevated execution this can disrupt unrelated services or users; without that authority it turns an otherwise usable custom path into a fatal startup error. The implementation contradicts its own claim that only a dedicated directory “we alone create” is chmodded.
Desired correction
Keep directory creation and 0700 enforcement attached to a dedicated Harmonia-owned runtime directory, not to an arbitrary socket parent. Either constrain overrides to a validated child name beneath that directory or distinguish an explicitly managed directory from an externally supplied socket path and change only the socket inode to 0600. Refuse broad/shared parents with a typed configuration error. Add tests for /tmp/harmonia.sock, an existing shared directory, and the derived default.
Finding
The default MCP socket lives in a dedicated runtime directory, but an explicit
mcp.socket_pathoverride is returned unchanged. Bridge startup nevertheless assumes every socket parent is owned by Harmonia, creates it, and changes its permissions to0700. A valid override can therefore mutate an arbitrary existing directory rather than only the socket endpoint.Evidence
crates/horismos/src/subsystems.rs:652-659accepts an arbitrary path override.crates/archon/src/mcp_bridge.rs:96-117returns that override unchanged while documenting the ownership invariant only for the derived default directory.crates/archon/src/mcp_bridge.rs:615-620callscreate_dir_all(parent)and thenset_permissions(parent, 0700)unconditionally.socket_path = "/tmp/harmonia.sock", privileged startup would privatize/tmp; ordinary startup is likely to fail while trying. The same behavior can remove group/other access from any shared application directory selected by configuration.Why this matters
A socket location option unexpectedly carries directory-wide authority. Under elevated execution this can disrupt unrelated services or users; without that authority it turns an otherwise usable custom path into a fatal startup error. The implementation contradicts its own claim that only a dedicated directory “we alone create” is chmodded.
Desired correction
Keep directory creation and
0700enforcement attached to a dedicated Harmonia-owned runtime directory, not to an arbitrary socket parent. Either constrain overrides to a validated child name beneath that directory or distinguish an explicitly managed directory from an externally supplied socket path and change only the socket inode to0600. Refuse broad/shared parents with a typed configuration error. Add tests for/tmp/harmonia.sock, an existing shared directory, and the derived default.