Logic Foundry

Build with understanding.

Python Security Developers Document How to Restrict Risky GitHub Actions Triggers

A report published on November 23, 2026, describes how Python Software Foundation security developers Seth Larson and Mike Fiedler addressed GitHub Actions triggers that can let outsiders start workflows with access to repository credentials. Larson is Python’s security developer in residence; Fiedler is a PyPI safety and security engineer. They also documented how other projects can apply similar policies.

The distinction between two pull-request triggers is central. A workflow started by pull_request for a fork runs with a read-only token and no secrets. The similarly named pull_request_target can run with a read/write token and access to repository and organization secrets. It is intended for tasks such as labeling a contributor’s pull request without running that contributor’s code. If the workflow checks out and executes the pull request instead, an outsider’s code can run with those credentials.

The developers also warn about issue_comment workflows. Anyone can comment on an issue or pull request, potentially starting a workflow that has access to the repository’s token and secrets. A workflow that inserts comment text into a shell command can introduce a separate command-injection risk.

According to the report, Larson and Fiedler removed the dangerous triggers and applied policies across the Python Software Foundation–stewarded psf, python and pypi GitHub organizations. Their rollout guidance calls for setting a policy, checking which workflows it would block, and then enforcing it. GitHub Team and Enterprise organizations can apply the policy across their repositories; on the Free plan, it must be applied repository by repository.