Skip to content

chore: use pull_request_target to allow deleting previews from froks#697

Merged
gwarf merged 3 commits intoEGI-Federation:mainfrom
gwarf:fix_preview_deletion_for_forks
Jan 14, 2025
Merged

chore: use pull_request_target to allow deleting previews from froks#697
gwarf merged 3 commits intoEGI-Federation:mainfrom
gwarf:fix_preview_deletion_for_forks

Conversation

@gwarf
Copy link
Member

@gwarf gwarf commented Jan 9, 2025

Uses pull_request_target to delete previews of PRs from forks.

See also https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/

It grants write access using the GITHUB_TOKEN, but it is safe as:

  • No code from the PR is built or executed
  • The workflow file in use is the one from the base branch (main)

Related issue :

Fix #696

@gwarf gwarf linked an issue Jan 9, 2025 that may be closed by this pull request
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

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

LGTM

@gwarf gwarf merged commit 4616d36 into EGI-Federation:main Jan 14, 2025
@gwarf gwarf deleted the fix_preview_deletion_for_forks branch January 14, 2025 11:32
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.

Ensure PR preview deletion is working correctly in all cases

2 participants