Skip to content

fix(ci): check-trusted-trigger proceeds on a PR whose base is not the default branch #8979

Closed

Description

@kyle-sexton

Refs: #8240

Problem

check-trusted-trigger.mjs returns proceed: true for a pull request without checking that the PR's base is the default branch (.github/actions/check-trusted-trigger/check-trusted-trigger.mjs:812-822). It does check the default branch on its other paths (requireOnDefaultBranch, :298; push and dispatch, :419-464), but not on pull.base.ref. A trusted author's PR into a non-default branch could therefore pass the trust check.

Fix

Stop with a named reason when pull.base.ref is not the repository's default branch, unless a caller explicitly allows other bases. Add a test for each case.

Acceptance criteria

  • A PR whose base is not the default branch stops with a named reason.
  • A PR into the default branch still proceeds.
  • The PR's CI runs check-trusted-trigger.test.mjs, and it passes.

Attended: .github/** is protected, so this goes to Automation Lanes, with a Security & Cost pass.

Activity

  1. added theissue type on Oct 22, 2026
  2. added
    area: security
    needs-human
    status: confirmed
    on Oct 22, 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

    area: securityneeds-humanstatus: confirmed

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions