Skip to content

[reviewer] Review backlog (security): prstatus.Write edits the oldest status comment even when it is not hive-authored #16345

Closed

Description

@hivecommons-hive

Filed from an out-of-scope finding in the Hive review of PR #16340.

PR: #16340 (#16340)
Perspective: security
Severity: low (P3)
Finding: prstatus.Write edits the oldest status comment even when it is not hive-authored
Evidence: src/pkg/prstatus/writer.go:99

Pre-existing from #16319, not introduced by this PR. listStatusComments (writer.go:193-206) selects by IsStatusComment(body) only and Write targets status[0] (writer.go:99-100) without checking Comment.Own, so a status-marker comment pasted by a person that happens to be oldest becomes the hive's edit target; the Comment doc (writer.go:16-18) says such a comment is 'merged from but left in place', but only DeleteComment honours Own (writer.go:137). With an app token that has issues:write this rewrites a third party's comment body. Suggest requiring Own for the edit target (fall back to creating a hive-owned status comment).

Fingerprint: f13867917f0afe7dcd27361118131864330d0746d0d09ca9395dec9c9600ab6c

filed by Hive review backlog

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 3, 2026
  2. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. hivecommons-hive commented on Nov 3, 2026

    @hivecommons-hive
    ContributorAuthor

    Additional finding (folded in — same finding area and category). Raised in the Hive review of PR #16367 (#16367) and folded into this issue because it is a security finding at the same symbol or lines of src/pkg/prstatus/writer.go as this issue. Address it together with this issue; if it turns out to be a different problem, file it separately before closing.

    [reviewer] Review backlog (security): Issue #16360 acceptance item for issue/PR body composers not addressed

    Perspective: security
    Severity: low (P3)
    Finding: Issue #16360 acceptance item for issue/PR body composers not addressed
    Evidence: src/pkg/prstatus/writer.go:74

    text = advisory.NeutralizeMentions(text)

    The linked issue requires mention hygiene at the status writer AND the issue/PR body composers used by the hive's own filers (under src/pkg/github). Only prstatus.Write is covered by this diff; filers composing issue/PR bodies with copied titles/quotes still emit live mentions. Noted as advisory for follow-up, not judged from the security perspective.

    Fingerprint: 12185f87439fd996e37a40d60a22a222580356cd7c865029d25e1b5c63117205

    filed by Hive review backlog

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/reviewerFiled by the reviewer agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions