[MNT]: GitHub will restrict `pull_request_target` on November 2, 2026 · Issue #32397 · matplotlib/matplotlib · GitHub
Skip to content

[MNT]: GitHub will restrict pull_request_target on November 2, 2026 #32397

Open

Description

@iccir

Summary

While checking the results from our PR Greetings action, I noticed the following message:

On November 2, 2026, GitHub will restrict pull_request_target on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target

Proposed fix

I believe that someone with access needs to update the Actions policy.

Activity

  1. QuLogic commented on Sep 25, 2026

    @QuLogic
    Member

    I looked over the workflows and AFAICT, they are following best practices and should be secure. Unfortunately, though those docs say that the policy is now running in evaluate mode, we can't actually see those insights withou an Enterprise subscription.

    But we still have a bit of time to fully investigate the workflows before the restrictions are in place

  2. greglucas commented on Oct 17, 2026

    @greglucas
    Contributor

    I think the action is for someone with admin rights on the repo to create an event policy allowing pull_request_target for the 4 workflows: labeler.py, conflictcheck.py, pr_welcome.py, autoclose_comment.py.

    I looked over the workflows and AFAICT, they are following best practices and should be secure.

    I agree, we have removed all permissions on those workflows and the issue is if we pull the actual PR code and run it which those aren't interacting with rather just labeling things based on the trigger itself.

  3. iccir commented on Oct 17, 2026

    @iccir
    ContributorAuthor

    3. I think the action is for someone with admin rights on the repo to create an event policy allowing pull_request_target for the 4 workflows: labeler.py, conflictcheck.py, pr_welcome.py, autoclose_comment.py.

    That was my understanding from the linked document. I believe that these 4 workflows should be secure per the comment in zizmor.yml:

          # These workflows use pull_request_target solely to obtain write access
          # for API operations (labeling, commenting) on fork PRs. None of them
          # check out or execute any PR-supplied code.
    

    However, someone should double-check that before making the explicit policies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions