You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[sec-check] maintainer-notes.jsonl is created world-readable (0644) under /data — every agent UID on the spoke can read all maintainer-private notes #17386
Severity: medium Type: permission-issue / information disclosure
src/pkg/maintainernotes/store.go persists maintainer notes as an append-only JSONL file at /data/maintainer-notes.jsonl and creates it with fileMode = 0o644 (appendLine, os.OpenFile(..., fileMode)). /data is drwxr-xr-x on a spoke, and every agent runs as its own unprivileged UID in the same node group as the hive process, so any agent process (or anything an agent is tricked into running) can cat /data/maintainer-notes.jsonl and read every note — live and tombstoned — across every repo and item.
The package documents these notes as private maintainer context ("waiting on legal", "owner wants this after the v6 cut") that "never goes to GitHub", and the dashboard shows them only to signed-in maintainers. The deliberate exposure to agents is the capped (KickSectionCap = 1024 bytes), per-item # Maintainer notes kick section for the items a kick lists. The file mode bypasses both the per-item scoping and the cap, and also exposes deleted notes (tombstones keep author/repo/number; the live-note text of a deleted note stays in the earlier line).
Sibling private dashboard state under /data is already 0600 (audit.jsonl, dashboard-sessions.json via session.goos.WriteFile(tmp, data, 0o600), prompt-history.jsonl), so this is an inconsistency with the repository's own convention for hive-private state, not a new policy.
An agent (hive's own threat model treats agents as untrusted principals — see the climemory symlink hardening in #17252/#17259) can read maintainers' private coordination notes for every item, including items it is not kicked for and notes that were deleted, and could exfiltrate them via the GitHub writes it is authorised to make. Notes may contain legal/commercial/people context maintainers explicitly chose not to post to GitHub.
Recommendation
Change fileMode to 0o600 in src/pkg/maintainernotes/store.go.
On open, tighten an existing file that is wider than 0600 (f.Chmod(0o600)) so spokes that already created the file at 0644 are repaired on the next write.
Add a test asserting the created file's mode is 0600 and that a pre-existing 0644 file is tightened.
Decision taken by hive: 0600 (owner-only) rather than 0640 — agents share the hive's primary group (node), so group-read is equivalent to world-read here.
Activity
🐛 fix(maintainernotes): create the notes file owner-only and tighten …