[Security] fix pull_request_target workflow injection (pwn request)#3116
Open
dpfaffenbauer wants to merge 3 commits into
Open
[Security] fix pull_request_target workflow injection (pwn request)#3116dpfaffenbauer wants to merge 3 commits into
dpfaffenbauer wants to merge 3 commits into
Conversation
Switch fork-checkout CI workflows from pull_request_target to pull_request so untrusted fork code no longer runs with secrets and a writable token. Restrict frontend-build (auto-commit, write token) to same-repo branches. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Security: fix
pull_request_targetpwn-request vulnerabilityCI workflows here trigger on
pull_request_targetwhile checking out the PR head from the fork (ref: …head.sha,repository: …head.repo.full_name). That runs untrusted fork code in the trusted base-repo context — with repository secrets (PIMCORE_PRODUCT_KEY,PIMCORE_INSTANCE_IDENTIFIER,PIMCORE_SECRET) and a writableGITHUB_TOKEN. Classic "pwn request";actions/checkout@v6now hard-blocks it (see failing job on #3113).Fix
Switch these workflows from
pull_request_targettopull_request, so fork PRs run in the fork's restricted context (no secrets, read-only token).frontend-build.yamladditionally gets anifguard so it only runs for same-repo branches — it auto-commits built assets with a writable token, which a fork PR can't do underpull_requestanyway.cla-check.ymlintentionally keepspull_request_target(reads PR metadata only, no fork checkout).Trade-off: fork PRs no longer receive Pimcore secrets. Same-repo branches/PRs and
pushkeep them.Affected files:
behat.yml,behat_ui.yml,license-check.yaml,packages_bundles.yml,packages_components.yml,static.yml,frontend-build.yaml.🤖 Generated with Claude Code