🌱 [scanner] fix: add fork guard to pull_request_target workflows#5955
Conversation
Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
❌ Deploy Preview for kubestellar-docs failed. Why did it fail? →
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@clubanderson: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Pull request overview
This PR mitigates a high-severity GitHub Actions security risk by adding a fork guard to pull_request_target workflows that currently run with write permissions, preventing execution on forked pull requests.
Changes:
- Add an
if:fork-guard condition to thecopilot-automationjob in.github/workflows/copilot-automation.yml. - Add the same
if:fork-guard condition to theai-fixjob in.github/workflows/ai-fix.yml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/copilot-automation.yml | Adds a job-level fork guard so the reusable workflow won’t run with write permissions on fork PRs. |
| .github/workflows/ai-fix.yml | Adds a job-level fork guard so the reusable workflow won’t run with write permissions on fork PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Fixes #5941
Fixes #5949
Adds fork guard (
github.event.pull_request.head.repo.full_name == github.repository) to pull_request_target workflows to prevent write-permission exploitation from forks.Signed-off-by: Copilot 223556219+Copilot@users.noreply.github.com