-
Notifications
You must be signed in to change notification settings - Fork 215
ci: refactor PR commenting to use dedicated workflow #2290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Split PR comment functionality into a separate reusable workflow to eliminate security risks associated with using `pull_request_target` event. The new approach works as follows: - Source workflows upload comment message as artifacts - A dedicated `pr-comment` workflow downloads the artifact - Comments are posted using the safer `workflow_run` event trigger This provides a better security isolation by ensuring PR comment workflows run in the context of the base branch rather than the potentially untrusted PR branch. Benefits: - Eliminates `pull_request_target` event security risks - Centralizes PR commenting logic for consistency Addresses sustainable-computing-io#2287 Signed-off-by: vprashar2929 <[email protected]>
�[1m 🔆🔆🔆 Validating 🔆🔆🔆 �[0m
💻 CPU Comparison with base Kepler
💾 Memory Comparison with base Kepler (Inuse)
💾 Memory Comparison with base Kepler (Alloc)
⬇️ Download the Profiling artifacts from the Actions Summary page 📦 Artifact name: 🔧 Or use GitHub CLI to download artifacts: gh run download 17207212384 -n profile-artifacts-2290 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vprashar2929 , There seems like a lot going on here :) ..
we need to document this workflow in developer docs for future maintainers 🙏 ..
The doc should have the current workflow seq diagram and a reason for implementing it this way 🙏
Split PR comment functionality into a separate reusable workflow to eliminate security risks associated with using
pull_request_target
event.The new approach works as follows:
pr-comment
workflow downloads the artifactworkflow_run
event triggerThis provides a better security isolation by ensuring PR comment workflows run in the context of the base branch rather than the potentially untrusted PR branch.
Benefits:
pull_request_target
event security risksAddresses #2287