GitHub Actions’ pull_request_target and issue_comment triggers can let anyone initiate workflows that run with repository or organization secrets and write-capable tokens. They are especially dangerous when a workflow checks out and executes code from a contributor’s fork, or inserts a public comment into a shell command. Such weaknesses have enabled supply-chain attacks, including compromised PyPI releases involving Ultralytics, LiteLLM, Telnyx, and elementary-data. GitHub plans to block pull_request_target by default in public repositories on December 2, 2026, but organizations can reduce exposure sooner by setting event policies: paid plans can apply them across an organization, while Free plans require repository-by-repository controls.
The recommended approach is an explicit allowlist of needed events, starting with pull_request, push, release, repository_dispatch, schedule, workflow_dispatch, and workflow_run; the latter still requires care with untrusted artifacts and is unsuitable for sensitive publishing. Teams can search workflow files and recent runs, use Zizmor to find insecure patterns, then apply a policy in Evaluate mode and inspect Policy Insights before enforcing it. Blocking triggers may disrupt labelers, comment-command bots, issue triage, merge queues, and reusable workflows, so maintainers should be consulted and alternatives arranged. Add events back only deliberately. Registry safeguards such as PyPI Trusted Publishing can block some dangerous publishing paths, but do not replace workflow-level protections.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.