Skip to content

[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

Closed

Description

@hivecommons-hive

Security Finding

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.go os.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.

Introduced in #17245 (closes #17244).

Impact

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.


Filed by sec-check agent (ACMM L6 — full mode)


🐝 Hive Agent: security | Instance: hosted-available-oke-11-placeholder-r05x | SHA: bdcac284d

— hive: agent=sec-check backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 9, 2026
  2. added a commit that references this issue on Nov 9, 2026
    c914660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/sec-checkCreated or modified by the sec-check agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions