PR #43: two new security statements that the code does not fully meet, and gaps in the document tests #44

Open
opened 2026-11-13 13:10:40 +00:00 by svc-agent-writer · 1 comment

Two items remain from the reviews of PR #43 (issue #32). PR #49 (8a1e4f0) closed items 1 and 3 to 10 of the first list, and narrowed the documents for item 2 to what the code checks. The first list is in the edit history of this issue.

What remains

  1. Check the peer user after the socket connect. sync checks the socket path's mode bits at stat time and refuses any group or other permission bit. It checks neither the socket's owner nor the peer. If another user can write the socket's parent directory, that user can rename a socket onto the path between the stat and the connect, and sync sends the Feeder token to that user. The README and SECURITY.md state this gap, and they make an owner-only parent directory a deployment duty. Fix: after the connect and before the token is sent, read the peer user (getpeereid or LOCAL_PEERCRED on macOS, SO_PEERCRED on Linux) and refuse a peer that is not the process user, with a coded error.
  2. Cap the Chats per pass. Chat pages are held until more is false. A Feeder that answers more=true without end grows the memory of sync without limit and commits nothing. SECURITY.md states this today. Fix: a named constant for the most Chats in one pass, and a coded error when a pass receives more.

Decisions

  • Item 1: the operator ruled the peer-user check.
  • Item 2: the operator ruled a cap, as a named constant with a coded error.

Acceptance criteria

  • sync refuses a socket peer that is not the process user, before it sends the token. A test proves the refusal and its code.
  • A pass that receives more Chats than the cap stops with a coded error. A test proves it.
  • The README code table and SECURITY.md state both controls. The sentences that describe the two gaps are removed or narrowed. The document tests pass.

Human act

ruling: the operator sets svd:go to approve dispatch of this credential-path change (CONV-40)

Blocked by

  • none

Filed under: operator word "Grant" sha256:78b7d0379d5e

Two items remain from the reviews of PR #43 (issue #32). PR #49 (`8a1e4f0`) closed items 1 and 3 to 10 of the first list, and narrowed the documents for item 2 to what the code checks. The first list is in the edit history of this issue. ## What remains 1. **Check the peer user after the socket connect.** `sync` checks the socket path's mode bits at `stat` time and refuses any group or other permission bit. It checks neither the socket's owner nor the peer. If another user can write the socket's parent directory, that user can rename a socket onto the path between the `stat` and the connect, and `sync` sends the Feeder token to that user. The README and `SECURITY.md` state this gap, and they make an owner-only parent directory a deployment duty. Fix: after the connect and before the token is sent, read the peer user (`getpeereid` or `LOCAL_PEERCRED` on macOS, `SO_PEERCRED` on Linux) and refuse a peer that is not the process user, with a coded error. 2. **Cap the Chats per pass.** Chat pages are held until `more` is false. A Feeder that answers `more=true` without end grows the memory of `sync` without limit and commits nothing. `SECURITY.md` states this today. Fix: a named constant for the most Chats in one pass, and a coded error when a pass receives more. ## Decisions - Item 1: the operator ruled the peer-user check. - Item 2: the operator ruled a cap, as a named constant with a coded error. ## Acceptance criteria - `sync` refuses a socket peer that is not the process user, before it sends the token. A test proves the refusal and its code. - A pass that receives more Chats than the cap stops with a coded error. A test proves it. - The README code table and `SECURITY.md` state both controls. The sentences that describe the two gaps are removed or narrowed. The document tests pass. ## Human act ruling: the operator sets `svd:go` to approve dispatch of this credential-path change (CONV-40) ## Blocked by - none --- Filed under: operator word "Grant" sha256:78b7d0379d5e
Author
Member

This was generated by AI during triage.

Triage

  • PR #49 merged as 8a1e4f0. It carried rows R1 to R10 of the #32 spec, which closed items 1 and 3 to 10 of this issue and narrowed the socket sentence of item 2. The body now holds only the two items that remain.
  • The operator ruled both: the peer-user check, and a cap on the Chats per pass.
  • CONV-40 rule 3 fires: the Feeder token goes to whatever process answers on the socket. State: ready-for-human. The human act is the operator's dispatch approval (svd:go).
  • The work touches sync.py, source.py and README.md, so it runs one item at a time with #38 (CONV-37).
> *This was generated by AI during triage.* ## Triage - PR #49 merged as `8a1e4f0`. It carried rows R1 to R10 of the #32 spec, which closed items 1 and 3 to 10 of this issue and narrowed the socket sentence of item 2. The body now holds only the two items that remain. - The operator ruled both: the peer-user check, and a cap on the Chats per pass. - CONV-40 rule 3 fires: the Feeder token goes to whatever process answers on the socket. State: `ready-for-human`. The human act is the operator's dispatch approval (`svd:go`). - The work touches `sync.py`, `source.py` and `README.md`, so it runs one item at a time with #38 (CONV-37).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/messages-mind-mcp#44
No description provided.