Skip to content

Improvement in documentation for pull_request_target event usage in README #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

suyashgaonkar
Copy link
Contributor

Description:
Added documentation explaining how to be careful with an action with the pull_request_target event to avoid security issues. Improved instructions for users who want to trigger the action on pull requests from forks or for enhanced security scenarios.

Related issue:
Related to #755

@Copilot Copilot AI review requested due to automatic review settings May 20, 2025 10:28
@suyashgaonkar suyashgaonkar requested a review from a team as a code owner May 20, 2025 10:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the README by adding a security warning about using the pull_request_target event and improves guidance for workflows that need write permissions on forked pull requests.

  • Adds a cautionary note on potential security risks when using pull_request_target
  • Emphasizes designing workflows to avoid executing untrusted code and limiting sensitive access
Comments suppressed due to low confidence (3)

README.md:262

  • Correct the spelling of "advisible" to "advisable".
Hence it is advisible that pull_request_target should only be used in workflows that are carefully designed to avoid executing untrusted code...

README.md:262

  • [nitpick] This sentence is very long and contains multiple clauses. Consider splitting it into two or more sentences and removing the comma splice before "Hence" for readability.
There exists a potentially dangerous misuse of the pull_request_target workflow trigger that may lead to malicious PR authors (i.e. attackers) being able to obtain repository write permissions or stealing repository secrets, Hence it is advisible...

README.md:262

  • [nitpick] The list item marker (-) and indentation were removed. Add the leading hyphen and proper indentation to maintain consistent markdown list formatting.
[`pull_request_target`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) instead of `pull_request` (see example [above](#create-workflow)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants