Friday 26 June 2026 18:13:55 GMT+02:00

Netcrook

HomeManifesto
News
Techcrook
Geocrook
WikicrookTeamAppContact
EnglishItalianoArabic

WIKICROOK

pull_request_target

A GitHub Actions trigger that can be risky if untrusted pull-request content is handled with elevated permissions or secrets.

pull_request_target is a GitHub Actions trigger that runs a workflow in the context of the target repository, not the contributor’s fork. That means the job can access repository secrets, write permissions, and other trusted resources even when the pull request comes from an untrusted source.

This matters because attackers can submit malicious changes that try to abuse workflow steps, script execution, or exposed secrets. A common defensive rule is to avoid checking out or executing untrusted pull-request code in a pull_request_target workflow unless the steps are tightly sandboxed. Safer patterns include using pull_request for testing contributor code, limiting permissions, separating approval from execution, and never handing secrets to jobs that process attacker-controlled input.

← WIKICROOK index