Skip to content

[Security] fix pull_request_target workflow injection (pwn request)#2988

Closed
dpfaffenbauer wants to merge 1 commit intocoreshop:5.0from
dpfaffenbauer:fix/pull-request-target-cve
Closed

[Security] fix pull_request_target workflow injection (pwn request)#2988
dpfaffenbauer wants to merge 1 commit intocoreshop:5.0from
dpfaffenbauer:fix/pull-request-target-cve

Conversation

@dpfaffenbauer
Copy link
Copy Markdown
Member

Switch pull_request_target to pull_request on workflows that checkout and execute code from PR forks. Running untrusted fork code with pull_request_target exposes repository secrets (PIMCORE_SECRET, PIMCORE_INSTANCE_IDENTIFIER, PIMCORE_PRODUCT_KEY) and GITHUB_TOKEN write permissions via composer scripts, modified source files, etc.

Affected workflows:

  • static.yml, license-check.yaml, packages_bundles.yml, packages_components.yml: switched trigger to pull_request
  • behat.yml, behat_ui.yml: removed dead pull_request_target checkout steps (trigger was already pull_request)
  • docs_next.yml: switched to pull_request for consistency

cla-check.yml intentionally kept on pull_request_target — it does not check out PR code, which is the safe usage pattern.

Switch pull_request_target to pull_request on workflows that checkout
and execute code from PR forks. Running untrusted fork code with
pull_request_target exposes repository secrets (PIMCORE_SECRET,
PIMCORE_INSTANCE_IDENTIFIER, PIMCORE_PRODUCT_KEY) and GITHUB_TOKEN
write permissions via composer scripts, modified source files, etc.

Affected workflows:
- static.yml, license-check.yaml, packages_bundles.yml,
  packages_components.yml: switched trigger to pull_request
- behat.yml, behat_ui.yml: removed dead pull_request_target checkout
  steps (trigger was already pull_request)
- docs_next.yml: switched to pull_request for consistency

cla-check.yml intentionally kept on pull_request_target — it does
not check out PR code, which is the safe usage pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@dpfaffenbauer
Copy link
Copy Markdown
Member Author

Superseded by PR from coreshop/CoreShop branch (fork PRs don't receive secrets, breaking CI).

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant