Skip to content

update note regarding pull_request_target#644

Open
beeequeue wants to merge 2 commits into
mainfrom
beeequeue-patch-1
Open

update note regarding pull_request_target#644
beeequeue wants to merge 2 commits into
mainfrom
beeequeue-patch-1

Conversation

@beeequeue
Copy link
Copy Markdown
Member

  • changes the note about pull_request_target to a CAUTION instead of a WARNING
  • merges the two sections about it into one
  • adds a note about using the bot as an alternative

beeequeue added 2 commits June 2, 2026 10:42
Add caution and warning notes regarding the use of pull_request_target event.
Added caution about using pull_request_target and alternative options.
@beeequeue beeequeue requested review from Andarist and bluwy June 2, 2026 08:49
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

⚠️ No Changeset found

Latest commit: 2df4dde

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread pr-status/README.md
> [!CAUTION]
> **This action uses `pull_request_target` by default to support PRs from forks.**
>
> Generally, **do not execute any code except for GitHub Actions** when using the `pull_request_target` event.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i'm still not entirely sure about the wording in this line, but i think it's a good guideline to give to people who don't know anything about the subject

i considered adding a line saying "e.g. installing dependencies can lead to cache poisoning in the main repo", but decided against it

Copy link
Copy Markdown
Member Author

@beeequeue beeequeue Jun 2, 2026

Choose a reason for hiding this comment

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

maybe it should say "do not execute any code except code inside GitHub Actions"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think previously the "do not run untrusted code" would fit better, since github actions can't guarantee that they won't run untrusted code either. Maybe we can give some examples of what not to do, but I don't think is necessary.

Comment thread pr-status/README.md
on:
pull_request_target:

permissions: {} # require explicitly stating all permissions in each job
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this should override whatever default permissions the repo is configured to use, so the comment step can't accidentally get content: write

Copy link
Copy Markdown
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

I'd like to suggest some changes but I don't have time now, blocking it for a while

Comment thread pr-status/README.md
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.

3 participants