Skip to content

Conversation

@johnboyes
Copy link
Collaborator

The issue was that a new release was not being created properly
when the PR came from a fork.

The fix is to trigger the release process on pull_request_target
rather than pull_request. There are some security concerns to be
aware of when using pull_request_target, but they are not applicable
to our use case here, as we only trigger it when the PR is closed (which
means no danger that a malicious actor could run malicious code
without it having been reviewed).

The [issue][1] was that a new release was not being created properly
when the PR came from a fork.

The fix is to trigger the release process on [`pull_request_target`][2]
rather than `pull_request`.  There are some [security concerns][3] to be
aware of when using `pull_request_target`, but they are not applicable
to our use case here, as we only trigger it when the PR is closed (which
means no danger that a malicious actor could run malicious code without
it having been reviewed).

[1]: https://github.com/SpectoLabs/hoverfly-github-action/actions/runs/13983200352
[2]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
[3]: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
@johnboyes johnboyes added the patch Semantic versioning: backwards compatible bug fixes label Mar 21, 2025
@johnboyes johnboyes merged commit ad1e674 into SpectoLabs:main Mar 21, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Semantic versioning: backwards compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant