Security

GitHub Will Block pull_request_target by Default on Dec. 2; Python’s Security Team Shows How to Get Ahead of It

Leave a comment

Python Software Foundation security folks Seth Larson and Mike Fiedler wrote up how to “de-fang” dangerous GitHub Actions triggers (Slashdot picked it up today), and there’s a date attached: starting December 2, 2026, GitHub will block the pull_request_target trigger by default in public repositories.

The problem is simple and nasty. A fork pull request under the plain pull_request trigger runs with a read-only token and no secrets. pull_request_target looks almost identical in YAML but runs with a read/write token and your repo and org secrets. If that workflow checks out and runs the PR’s code, any stranger with a GitHub account can run code with your credentials: a “pwn request.” issue_comment carries similar risk, especially when comment text gets pasted into a shell step. They point to real PyPI incidents tied to these patterns, including Ultralytics (December 2024), LiteLLM and Telnyx (March 2026), and elementary-data (April 2026).

The PSF has removed those triggers and applied blocking policies across the psf, python and pypi orgs. On Team or Enterprise plans you can do it org-wide with one policy; on Free, one repo at a time. Their advice: set the policy, check what it would block, then enforce.

My take

Don’t wait for December 2. Grep your workflows today. I’ve got a quick how-to for that in this batch, and if you can’t explain why a workflow needs pull_request_target, it probably doesn’t.

God Bless, and May the Source Be with You!

References & Further Reading

Subscribe (RSS) Follow Security via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.