Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/maven-pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:

name: Build on JDK 21
runs-on: ubuntu-22.04
if: github.event.pull_request.head.repo.full_name == github.repository
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This job-level guard prevents PRs from forks from running, which helps mitigate RCE risk when using write permissions in PR workflows. Ensure this aligns with all PR flow scenarios (e.g., pull_request_target vs pull_request) and consider adding a brief justification in the workflow header for future maintainers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! The if condition was added to prevent
fork PRs from running with write-scoped tokens, mitigating potential
RCE via pull_request_target. Will add a comment in the workflow if
maintainer requests it.

steps:

- name: Checkout Code
Expand Down
Loading