Skip to content

🌱 [scanner] fix: add fork guard to pull_request_target workflows#5955

Merged
clubanderson merged 1 commit into
mainfrom
scanner/fix-5941
Jun 18, 2026
Merged

🌱 [scanner] fix: add fork guard to pull_request_target workflows#5955
clubanderson merged 1 commit into
mainfrom
scanner/fix-5941

Conversation

@clubanderson

Copy link
Copy Markdown
Contributor

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

Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clubanderson clubanderson requested a review from KPRoche as a code owner June 18, 2026 08:59
Copilot AI review requested due to automatic review settings June 18, 2026 08:59
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 18, 2026
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellar-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 3829971
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/6a33b38fad9d720008f5337a

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 18, 2026
@kubestellar-prow

Copy link
Copy Markdown

@clubanderson: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubestellar-docs-test 3829971 link true /test pull-kubestellar-docs-test

Full PR test history

Details

Instructions 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 the copilot-automation job in .github/workflows/copilot-automation.yml.
  • Add the same if: fork-guard condition to the ai-fix job 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.

@clubanderson clubanderson merged commit c4cd556 into main Jun 18, 2026
14 of 20 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the scanner/fix-5941 branch June 18, 2026 09:26
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. yaml

Projects

None yet

2 participants