Check the owner of each secret file, not only its mode #79

Open
opened 2026-11-15 23:49:40 +00:00 by svc-agent-writer · 0 comments

Split out of #65 at triage on 2026-11-16. The operator agreed that this check needs its own spec.

Problem

A secret file's owner is not checked. Only its mode is checked (kit/secrets.py). The README says "owner-only file". A secret file that is mode 0600 but owned by another user passes the check today.

Constraints

  • kit/secrets.py is a *secret* path, so the merge is T4.
  • The Kubernetes pod copies secrets through init containers (deploy/k8s/base/messagesmind.yaml:27-48). The owner rule must hold for those copies, which another uid may write. Check the runAsUser and fsGroup of each container before you choose the rule.
  • The macOS launchd install and the container install must both pass check after the change.

Acceptance criteria

  • A secret file that the process user does not own is refused with a named code and its config location. Alternatively, the README says exactly which owners are allowed, and why.
  • A test covers a file owned by another uid. Use a synthetic fixture only, with no real secrets.
  • The README and SECURITY sentences match the code.

Filed under: operator word "Yes, do it your way" on #65 triage, 2026-11-16

Split out of #65 at triage on 2026-11-16. The operator agreed that this check needs its own spec. ## Problem A secret file's owner is not checked. Only its mode is checked (`kit/secrets.py`). The README says "owner-only file". A secret file that is mode 0600 but owned by another user passes the check today. ## Constraints - `kit/secrets.py` is a `*secret*` path, so the merge is T4. - The Kubernetes pod copies secrets through init containers (`deploy/k8s/base/messagesmind.yaml:27-48`). The owner rule must hold for those copies, which another uid may write. Check the `runAsUser` and `fsGroup` of each container before you choose the rule. - The macOS launchd install and the container install must both pass `check` after the change. ## Acceptance criteria - A secret file that the process user does not own is refused with a named code and its config location. Alternatively, the README says exactly which owners are allowed, and why. - A test covers a file owned by another uid. Use a synthetic fixture only, with no real secrets. - The README and SECURITY sentences match the code. --- Filed under: operator word "Yes, do it your way" on #65 triage, 2026-11-16
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#79
No description provided.