Skip to content

fix(ci): check-signed-commits trusts the PR's current base to drop merged-in commits #8240

Closed

Description

@kyle-sexton

Problem

check-signed-commits drops a comparison commit from the lane's commits when GET /pulls/{n}/commits does not list it. That list is computed against the PR's current base branch, which can change during a lane run. A lane commit X that is reachable from the PR's base is therefore not checked. Two ways this could happen:

  • The PR targets a non-default, unprotected branch, and a contents: write lane token pushes X there.
  • A token with both contents: write and pull-requests: write (the merge effect in .github/actions/resolve-config/effect-grants.json) pushes X to a new branch, makes the head a verified commit on top of X, and retargets the PR base to that branch.

The filter predates #8237, which only narrows when it applies (the PR list must hold the whole PR). A security review of #8237 found it and rated it P4, low confidence. Not checked: whether any model step gets the merge grant, and whether the gate refuses a PR whose base is not the default branch.

Expected

  • A commit is dropped from the lane's commits only when it is reachable from the run job's trusted base-sha output, not from the PR's current base.
  • Alternatively, the filter applies only when pull.base.ref is the default branch.

Evidence to settle it

Can any lane's model job reach a token that can both push a branch and retarget the PR base? And does check-trusted-trigger (or the run job's gate) refuse a PR whose base is not the default branch? If the answer to the first is no, or to the second is yes, close this issue.

Activity

  1. added
    needs-triage
    on Oct 18, 2026
  2. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

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

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

    Automated triage. A maintainer reviews it.

  3. added
    needs-human
    and removed
    needs-triage
    on Oct 18, 2026
  4. kyle-sexton commented on Oct 22, 2026

    @kyle-sexton
    MemberAuthor

    The issue's own close rule fires. The only grant with both contents and pull-requests write is merge (.github/actions/resolve-config/effect-grants.json:18), and only the model-free merge-pr activity uses it. One gap remains, outside this issue: check-trusted-trigger.mjs:812-822 never checks that the PR's base is the default branch. Filed as a follow-up for Automation Lanes.

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-human

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions