Skip to content

pr-pipeline: treat a run head as forged when no caller or event head was gated #8945

Closed

Description

@kyle-sexton

Problem

In .github/workflows/pr-run-activity-read.yml, the report job's "Choose the head the check is posted on" step counts the PR head it read from the API as the gated head whenever neither the caller's head-sha input nor the event names one. That head may have moved during the run. A run job that names the moved head then reads as not forged, and its check is posted on that head.

No current caller can reach this: pr-unblock.yml always passes head-sha, and issue mode skips the report job.

Proposed fix

When there is no caller or event head, treat any non-empty run head as forged: drop the API-head fallback from the match set and keep the API head only as a posting target. Update the report-job test case that expects a run head matching the API head alone to post success, so it expects a forged result instead.

Context

Found in the security review of #8902 (5b), finding 3, and left as a follow-up.

🤖 Generated with Claude Code

Activity

  1. github-actions commented on Oct 21, 2026

    @github-actions
    Contributor

    Proposed work class: none

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Unconfirmed model suggestion: work-class: scoped
    Basis: automated intake triage; a maintainer confirms or changes it.

    Automated triage. A maintainer reviews it.

  2. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    on Oct 21, 2026
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

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: lowNice-to-have, cosmetic, or speculative; opportunistic.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions