Skip to content

Digest and Merge Output Can Carry a Forged Status Line From a Thread Path #4606

Backlog

Description

@ptr727

Observed

merge captures the gate's printed output and pr_review_answers.route() reads each line matching ^status= to choose the next action. Two places read or print text that GitHub or git can make multi-line or quote-bearing without anchoring it to a line start.

  • scripts/pr_merge.py around line 140 tests "status=MERGED " not in text as a substring of all printed output, where route() reads at a line start. A title, thread body, or review body quoting status=MERGED on any line makes a refusal omit the pending= line its docstring promises.
  • scripts/pr_review_digest.py around line 338 prints a thread's path raw, while the body beside it is collapsed. Git permits a newline in a file name, so a thread on a path such as a newline status=MERGED x starts a line with status=MERGED in the captured text. route() then answers maintainer in place of redrive.

Read from code, not run. Whether GitHub serves such a path was not checked.

Expected

Print every API-controlled string on one line, as the title block now does (collapsed whitespace), and anchor the status=MERGED test at a line start as route() does.

Found by

The local strict review of the fix that collapses the held-title line. Class: pre-existing.

Activity

  1. added
    pre-existing
    on Dec 2, 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

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions