Skip to content

[Bug/write-safety]: command authority conflates org MEMBER with repo maintainer (P1, agent-layer prereq) #788

Description

@JSONbored

Problem

src/settings/command-authorization.ts:138 maps commenter author_association === OWNER || MEMBER → maintainer role. MEMBER is org membership, not maintainer-of-this-repo. The HTTP write path (requireRepoWriteAccess) deliberately avoids trusting association for exactly this reason.

Why this is a hard agent-layer prerequisite

Acceptable while commands are read-only — becomes a privilege-escalation bug the moment @gittensory commands gain write power (merge/close/review) in Phase 1 (#778). Must be fixed before N6.

Fix

When commands become write-capable, resolve real repo permission via the installation (getRepositoryCollaboratorPermission) instead of author_association.

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions