Skip to content

Security Fix: Replace third-party GitHub Actions with native gh CLI equivalents#9252

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/review-replace-third-party-gh-actions
Draft

Security Fix: Replace third-party GitHub Actions with native gh CLI equivalents#9252
Copilot wants to merge 2 commits into
masterfrom
copilot/review-replace-third-party-gh-actions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

Security Fix

Severity

  • Critical
  • High
  • Medium
  • Low

Description

Two third-party GitHub Actions were removed from the CI workflows and replaced with equivalent implementations using GitHub's built-in gh CLI and REST API — eliminating untrusted code execution in the runner environment.

Root Cause

tj-actions/changed-files@v45 was compromised as part of CVE-2025-30066, allowing the malicious action to exfiltrate runner secrets. LouisBrunner/checks-action and madrapps/add-reviewers were flagged during the subsequent audit of all third-party action dependencies.

Link to Security Notice

https://www.cve.org/CVERecord?id=CVE-2025-30066

Solution

status-check-override.yaml

  • Replaced tj-actions/changed-files@v45 with a gh api call to GET /repos/{repo}/pulls/{number}/files (paginated), followed by a shell loop that matches each path against an allow-list regex — equivalent behavior, zero third-party code.
  • Replaced LouisBrunner/checks-action@v2.0.0 with a direct gh api POST /repos/{repo}/check-runs call to create the synthetic success check.
  • Removed the now-unnecessary actions/checkout@v4 step (no local git ops needed).
  • Added least-privilege permissions: { checks: write, pull-requests: read }.

add-geometry-reviewers.yaml

  • Replaced madrapps/add-reviewers@v1 with gh pr edit --add-reviewer, the canonical built-in mechanism.
  • Added permissions: { pull-requests: write }.

Additional Notes

mszostok/codeowners-validator@v0.7.0 in sanity.yaml was reviewed and intentionally left in place — it provides non-trivial CODEOWNERS validation (syntax, duplicate patterns, unowned files) with no built-in GitHub equivalent and was not involved in this CVE.

Copilot AI changed the title [WIP] Review and replace third party GitHub actions Security Fix: Replace third-party GitHub Actions with native gh CLI equivalents Apr 30, 2026
Copilot AI requested a review from aruniverse April 30, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review/Replace use of third party gh actions

2 participants