What is GitHub’s `pull_request_target` event and why must it be used with extreme caution?

Github Hard

Github — Hard

What is GitHub’s `pull_request_target` event and why must it be used with extreme caution?

Key points

  • `pull_request_target` events run in the base repository's context
  • Fork PRs can introduce untrusted code, threatening security
  • Secrets and write permissions are vulnerable to exfiltration
  • Careful input sanitization is necessary to mitigate risks

Ready to go further?

Related questions