Skip to content

chore: sync with upstream 2.40.0 - #38

Merged
Raj-StepSecurity merged 3 commits into
mainfrom
auto-cherry-pick
Oct 21, 2026
Merged

Raj-StepSecurity merged 3 commits into
mainfrom
auto-cherry-pick

Conversation

@Raj-StepSecurity

Copy link
Copy Markdown
Contributor

@Raj-StepSecurity

Copy link
Copy Markdown
Contributor Author

📦 Target Release Version: 2.40.0
📋 Previous Release Version: 2.37.2

@Raj-StepSecurity Raj-StepSecurity added the review-required Trigger Claude AI code review on the PR label Oct 19, 2026
Comment thread src/utils.ts
const dest = fs.mkdtempSync(src + '-verbose-');
await fs.promises.cp(src, dest, {recursive: true, dereference: true});
const scripts = path.join(dest, 'scripts');
const verbose_run = path.join(scripts, path.basename(run_path));
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Cherry-Pick Verification Report

📦 Upstream Changes: 2.37.2...2.40.0

📋 File-by-File Analysis:

.github/ISSUE_TEMPLATE/bug.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 1 additions, 1 deletions)

.github/workflows/codeql.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - ❌ No PR patch available (+4 -4)

.github/workflows/docs.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 7 additions, 7 deletions)

.github/workflows/node.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+6 -3) | Missing 3 additions | Missing 3 deletions

.github/workflows/php.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+5 -5) | Missing 4 additions | Missing 4 deletions

.github/workflows/publish.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 11 additions, 6 deletions)

README.md

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+92 -56) | Missing 2 additions | Missing 6 deletions

__tests__/coverage.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

__tests__/extensions.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

__tests__/tools.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+166 -15)

__tests__/utils.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+187 -13)

jest.config.js

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/configs/brew_extensions

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/linux_libs

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/mod_priority

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/php-versions.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/configs/tools.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+14 -0)

src/extensions.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -2)

src/install.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/scripts/darwin.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+63 -18)

src/scripts/extensions/add_extensions.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+59 -3)

src/scripts/extensions/add_extensions.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+24 -6)

src/scripts/extensions/couchbase.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+15 -5)

src/scripts/extensions/geos.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+9 -3)

src/scripts/extensions/ibm.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -0)

src/scripts/extensions/oci.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -1)

src/scripts/extensions/patches/couchbase.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+12 -0)

src/scripts/extensions/patches/geos.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+2 -2)

src/scripts/extensions/relay.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+5 -1)

src/scripts/linux.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+4 -1)

src/scripts/tools/add_tools.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+78 -30)

src/scripts/tools/add_tools.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+31 -4)

src/scripts/tools/blackfire.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+7 -5)

src/scripts/tools/blackfire.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+4 -0)

src/scripts/tools/brew.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+51 -25)

src/scripts/tools/ppa.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+18 -9)

src/scripts/unix.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+59 -0)

src/scripts/win32.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+65 -43)

src/tools.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+100 -4)

src/utils.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+50 -9)

tsconfig.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+8 -5)

tsconfig.test.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+14 -0)

📊 Summary:

  • Total files changed upstream: 42
  • Files present in PR: 38/42
  • Files with matching changes: 35/42

❌ Overall Status: 🔴 INCOMPLETE - Missing files or changes

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

Action Type

Node-based action (runs on node24 per action.yml). This is a sync from upstream shivammathur/setup-php v2.37.2 to v2.40.0.


Passed Checks

  • License: Present with copyright of both Step Security and original author (shivammathur).
  • action.yml: Present with author: step-security.
  • SECURITY.md: Present with correct reporting contact.
  • FUNDING.yml: Not present.
  • .github/workflows/auto_cherry_pick.yml: Present.
  • .github/workflows/actions_release.yml: Present.
  • renovate.json: Not present.
  • PULL_REQUEST.md: Not present.
  • ISSUE_TEMPLATE: Not present.
  • CHANGELOG.md: Not present.
  • .vscode: Not present.
  • StepSecurity banner in README: Present on line 1.
  • README action usage examples: All use step-security/setup-php@v2 (major version only, no full semver).
  • Subscription check URL: Correct endpoint used.
  • upstream variable: shivammathur/setup-php — correctly matches auto_cherry_pick.yml original-owner/repo-name.
  • package.json author: step-security.
  • package.json repository: Points to github.com/step-security/setup-php.
  • dist/ folder: Present (dist/index.js).
  • build script in package.json: Present (tsc && ncc build -m -o dist).

Failed Checks

  • CI status badge changed from step-security to shivammathur (README.md line 7): The workflow badge previously linked to step-security/setup-php/workflows now points to shivammathur/setup-php/workflows. This should continue to reflect step-security's own CI status, not the upstream's.

  • Self-hosted runner wiki links changed from step-security to shivammathur (README.md lines 708-709): The Dockerized self-hosted runner guides were changed from step-security/setup-php/wiki to shivammathur/setup-php/wiki. These links should remain pointing to the step-security fork.

  • .github/CONTRIBUTING.md referenced but does not exist (README.md line 1020): The newly added Contributions section links to .github/CONTRIBUTING.md, but this file is absent from the repository. This is a broken link.


Warnings

  • New Contributions section (README lines 1016-1031): Entire section was synced verbatim from upstream, pointing to shivammathur's discussions, contributors graph, and GitHub Sponsors — none customized for step-security. May confuse users about where to report issues or seek support.

  • New Dependencies section (README lines 1073-1090): All dependency links reference upstream shivammathur/ repos and the upstream's network/dependencies graph. Copied verbatim without adaptation.

  • Verbose temp directory not cleaned up (src/utils.ts addVerbose): When verbose mode is active, a full copy of all scripts is written to a mkdtempSync-created temp directory and never explicitly removed. An fs.rmSync(dest, { recursive: true }) in a finally block after script execution would be cleaner.

  • New Switch-to-v2 wiki link points to shivammathur (README.md line 1008): The added versioning note links to shivammathur/setup-php/wiki/Switch-to-v2 rather than the step-security fork's wiki.


Security Findings

  • PowerShell checksum comparison relies on implicit case-insensitivity (src/scripts/tools/add_tools.ps1, Test-ToolChecksum): Get-FileHash returns uppercase hex, while extractChecksum() in TypeScript normalizes to lowercase. PowerShell's -eq is case-insensitive for strings by default so this works, but the intent would be clearer with $actual_checksum.ToLower() -eq $checksum_parts[1].

  • No issues found in checksum validation logic: extractChecksum() correctly restricts algorithms to sha256/sha512 with strict hex regex before values reach shell scripts, preventing injection.

  • No command injection vulnerabilities found: User inputs flow through sanitizeShellInput() / escapeForShell(); the new verbose env var is only used in regex tests, not executed directly.


Summary

This PR syncs substantive upstream features (PHP 8.7 nightly support, tool checksum pinning, verbose debug mode, new tools cpx/laravel-cloud). The core implementation is solid and well-tested, but the README sync incorrectly reverts several step-security links to the upstream shivammathur org — specifically the CI badge, self-hosted runner wiki links, and a broken CONTRIBUTING.md reference — which must be fixed before merging.

Comment thread README.md Outdated
<a href="https://github.com/step-security/setup-php" title="GitHub action to setup PHP"><img alt="GitHub Actions status" src="https://github.com/step-security/setup-php/workflows/Main%20workflow/badge.svg"></a>
<a href="https://github.com/step-security/setup-php/blob/main/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a>
<a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.6-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
<a href="https://github.com/shivammathur/setup-php" title="GitHub action to setup PHP"><img alt="GitHub Actions status" src="https://github.com/shivammathur/setup-php/workflows/Main%20workflow/badge.svg"></a>

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.

Failed Check — CI badge reverted to upstream org

This badge was previously linking to step-security/setup-php/workflows, correctly showing this fork's CI status. The sync changed it back to shivammathur/setup-php/workflows. It should be restored to point to the step-security fork:

Suggested change
<a href="https://github.com/shivammathur/setup-php" title="GitHub action to setup PHP"><img alt="GitHub Actions status" src="https://github.com/shivammathur/setup-php/workflows/Main%20workflow/badge.svg"></a>
<a href="https://github.com/step-security/setup-php"><img src="https://github.com/step-security/setup-php/workflows/Main%20workflow/badge.svg"></a>

Comment thread README.md Outdated
- [Linux](https://github.com/step-security/setup-php/wiki/Dockerized-self-hosted-runner-on-Linux)
- [Windows](https://github.com/step-security/setup-php/wiki/Dockerized-self-hosted-runner-on-Windows)
- To set up a containerized self-hosted runner, refer to the following guides as per your base operating system.
- [Linux](https://github.com/shivammathur/setup-php/wiki/Dockerized-self-hosted-runner-on-Linux)

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.

Failed Check — Self-hosted runner wiki links reverted to upstream org

These links previously pointed to step-security/setup-php/wiki and were changed by the sync back to shivammathur/setup-php/wiki. They should be restored to the step-security fork:

Suggested change
- [Linux](https://github.com/shivammathur/setup-php/wiki/Dockerized-self-hosted-runner-on-Linux)
- [Linux](https://github.com/step-security/setup-php/wiki/Dockerized-self-hosted-runner-on-Linux)
- [Windows](https://github.com/step-security/setup-php/wiki/Dockerized-self-hosted-runner-on-Windows)

Comment thread README.md Outdated

> Contributions are welcome!

- See [Contributor's Guide](.github/CONTRIBUTING.md "shivammathur/setup-php contribution guide") before you start.

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.

Failed Check — .github/CONTRIBUTING.md referenced but does not exist

This line links to .github/CONTRIBUTING.md, but the file is absent from the repository. This is a broken link and will 404 for users who click it. Either create the file or remove this line until it exists.

)
$checksum_parts = $Checksum -split ':'
$actual_checksum = (Get-FileHash -Path $Path -Algorithm $checksum_parts[0]).Hash
return $actual_checksum -eq $checksum_parts[1]

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.

Security Finding — Implicit case-insensitive comparison

Get-FileHash returns an uppercase hex digest (e.g. ABC123...), while extractChecksum() in TypeScript normalises the expected hash to lowercase before it reaches this script. PowerShell's -eq is case-insensitive for strings by default, so the comparison currently works — but this is a subtle implicit dependency.

Recommend making the intent explicit to guard against future changes:

Suggested change
return $actual_checksum -eq $checksum_parts[1]
return $actual_checksum.ToLower() -eq $checksum_parts[1]

Comment thread src/utils.ts
}
const extension = await scriptExtension(os);
const src = path.dirname(path.dirname(run_path));
const dest = fs.mkdtempSync(src + '-verbose-');

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.

Warning — Verbose temp directory is never cleaned up

mkdtempSync creates a copy of the entire scripts directory here whenever verbose mode is active. This temp directory (<src>-verbose-XXXXXX/) is returned and executed but never explicitly removed after the action finishes. The GitHub Actions runner workspace cleanup will eventually clear it, but an explicit cleanup in install.ts (e.g. fs.rmSync(dest, { recursive: true, force: true }) in a finally block after exec(tool + run_path)) would be safer and avoid accumulating temp copies on self-hosted runners across runs.

@Raj-StepSecurity

Copy link
Copy Markdown
Contributor Author

Sync verification

Warning

3 items need review: 3 files to check.

Upstream Versions Files dist/ reproducible config.json
shivammathur/setup-php 2.37.2 → 2.40.0 · compare 42 ✅ ✅

Review these

  • 👀 .github/workflows/node.yml: upstream and StepSecurity changed the same lines and one version was kept, please check
  • 👀 .github/workflows/php.yml: upstream and StepSecurity changed the same lines and one version was kept, please check
  • 👀 README.md: upstream and StepSecurity changed the same lines and one version was kept, please check
✅ 32 files: exactly upstream's version
✅ 3 files: upstream's changes alongside StepSecurity's
✅ 1 file: StepSecurity-specific changes only
👀 3 files: upstream and StepSecurity changed the same lines
✅ 2 files: build output or lockfiles, rebuilt from source
✅ 1 file: checked field by field
✅ config.json checks
Check Result
config.json is valid ✅
upstream.repository ✅
upstream.synced_tag is an upstream release ✅
upstream.synced_commit matches the tag ✅
upstream.synced_tag is the newest release ✅
upstream.archived ✅
onboarding_type ✅
action_type ✅
✅ Build checks
Check Result
dist/ is a reproducible build of the PR ✅
✅ Integrity checks
Check Result
actions are node24 with their entrypoints built ✅
the subscription check is called ✅
our workflows are unchanged ✅
removed upstream files stay removed ✅
files upstream deleted are gone ✅
every lockfile has its package.json ✅
no workflow gains write permissions ✅
the PR description is the upstream compare link ✅

@Raj-StepSecurity Raj-StepSecurity removed the review-required Trigger Claude AI code review on the PR label Oct 19, 2026
@Raj-StepSecurity Raj-StepSecurity added the review-required Trigger Claude AI code review on the PR label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Cherry-Pick Verification Report

📦 Upstream Changes: 2.37.2...2.40.0

📋 File-by-File Analysis:

.github/ISSUE_TEMPLATE/bug.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 1 additions, 1 deletions)

.github/workflows/codeql.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - ❌ No PR patch available (+4 -4)

.github/workflows/docs.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 7 additions, 7 deletions)

.github/workflows/node.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+6 -3) | Missing 3 additions | Missing 3 deletions

.github/workflows/php.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+5 -5) | Missing 4 additions | Missing 4 deletions

.github/workflows/publish.yml

  • Upstream has changes: ✅ Yes
  • File exists in PR: ❌ No
  • Status: 🔴 Missing - File missing in PR (upstream has 11 additions, 6 deletions)

README.md

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ❌ No
  • Status: 🟡 Partial - ❌ Cherry-pick incomplete (+92 -56) | Missing 4 additions | Missing 7 deletions

__tests__/coverage.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

__tests__/extensions.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

__tests__/tools.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+166 -15)

__tests__/utils.test.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+187 -13)

jest.config.js

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/configs/brew_extensions

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/linux_libs

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/mod_priority

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -0)

src/configs/php-versions.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/configs/tools.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+14 -0)

src/extensions.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -2)

src/install.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+1 -1)

src/scripts/darwin.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+63 -18)

src/scripts/extensions/add_extensions.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+59 -3)

src/scripts/extensions/add_extensions.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+24 -6)

src/scripts/extensions/couchbase.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+15 -5)

src/scripts/extensions/geos.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+9 -3)

src/scripts/extensions/ibm.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -0)

src/scripts/extensions/oci.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+11 -1)

src/scripts/extensions/patches/couchbase.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+12 -0)

src/scripts/extensions/patches/geos.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+2 -2)

src/scripts/extensions/relay.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+5 -1)

src/scripts/linux.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+4 -1)

src/scripts/tools/add_tools.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+78 -30)

src/scripts/tools/add_tools.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+31 -4)

src/scripts/tools/blackfire.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+7 -5)

src/scripts/tools/blackfire.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+4 -0)

src/scripts/tools/brew.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+51 -25)

src/scripts/tools/ppa.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+18 -9)

src/scripts/unix.sh

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+59 -0)

src/scripts/win32.ps1

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+65 -43)

src/tools.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+100 -4)

src/utils.ts

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+50 -9)

tsconfig.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+8 -5)

tsconfig.test.json

  • Upstream has changes: ✅ Yes
  • File exists in PR: ✅ Yes
  • Changes match: ✅ Yes
  • Status: 🟢 Perfect - ✅ All changes applied correctly (+14 -0)

📊 Summary:

  • Total files changed upstream: 42
  • Files present in PR: 38/42
  • Files with matching changes: 35/42

❌ Overall Status: 🔴 INCOMPLETE - Missing files or changes

@github-actions

Copy link
Copy Markdown
Contributor

PR Review

Action Type

Node-based action — uses node24 runtime with dist/index.js.


✅ Passed Checks

  • License present with dual copyright: shivammathur and contributors + Step Security, Inc. (2026)
  • action.yml present with author: 'step-security'
  • SECURITY.md present
  • FUNDING.yml not present ✓
  • .github/workflows/ contains both required files: auto_cherry_pick.yml and actions_release.yml
  • renovate.json not present ✓
  • PULL_REQUEST.md not present ✓
  • ISSUE_TEMPLATE folder not present ✓
  • CHANGELOG.md not present ✓
  • .vscode folder not present ✓
  • README examples use @v2 (major version only, no full semver tags) ✓
  • StepSecurity banner present on line 1 of README.md ✓
  • Subscription check present in src/install.ts, correctly calls https://agent.api.stepsecurity.io/v1/github/${GITHUB_REPOSITORY}/actions/maintained-actions-subscription
  • Upstream variable is 'shivammathur/setup-php' — correctly matches original-owner: "shivammathur" + repo-name: "setup-php" from auto_cherry_pick.yml
  • package.json author is "step-security" ✓
  • package.json repository URL is git+https://github.com/step-security/setup-php.git ✓
  • All declared dependencies are used: compare-versions (used in src/tools.ts and src/packagist.ts), axios, @actions/core, @actions/exec
  • dist/ folder is present ✓
  • package.json has a "build" script ✓

❌ Failed Checks

  • verbose documented as an action input but not defined in action.yml: The README (newly added section, ~line 524) documents verbose under the inputs heading alongside formal action inputs such as php-version, extensions, etc. However, action.yml does not define a verbose input. The actual usage is via env: verbose: true (an environment variable read via readEnv() in utils.ts). This framing is misleading to users who may try with: verbose: true and find it silently ignored. Either add verbose as a formal input in action.yml, or move its documentation out of the inputs listing and into the Verbose Setup section exclusively.

⚠️ Warnings

  • php.yml CI uses a third-party action (shivammathur/cache-extensions) pinned by hash — not by a step-security fork. The hash was updated in this PR (256729b… → de3c642…). This is acceptable for CI-only usage but worth noting for supply-chain awareness.
  • verbose input in README is positioned in the Inputs documentation section but the actual example correctly shows env: verbose: true. The inconsistency in placement may confuse users.

🔒 Security Findings

No critical security vulnerabilities found. Positive observations:

  • New checksum pinning (extractChecksum in src/tools.ts) correctly validates SHA256 (64 hex chars) and SHA512 (128 hex chars) format before verifying tool downloads. Malformed or unsupported algorithm strings are rejected with clear error messages.
  • PHP version injection hardening: parseVersion now validates input against a strict regex (^(latest|lowest|highest|nightly|master|pre|pre-installed|\d+\.x|\d+(\.\d+){0,2})$), preventing arbitrary version strings from reaching shell scripts.
  • Shell input sanitization: sanitizeShellInput strips $, backticks, quotes, semicolons, pipes, and other metacharacters. ini-values input is further protected via escapeForShell in config.ts.
  • addVerbose creates its temp copy via fs.mkdtempSync (race-condition safe) and uses path-based script patching rather than eval, with no new attack surface introduced.

Summary

This is a clean upstream sync from shivammathur/setup-php@2.40.0 bringing PHP 8.7 nightly support, checksum pinning for tools, a new verbose mode, and runner table updates. The one actionable issue is that the newly documented verbose option is categorized under action inputs in the README but is actually an environment variable and is absent from action.yml — this should be corrected before release.

Comment thread README.md
Comment on lines +524 to +529
#### `verbose` (optional)

- Specify to enable verbose output.
- Accepts `true`, `false`, `v`, `vv` and `vvv`.
- By default, it is set to `false`.
- See [verbose setup](#verbose-setup) for more info.

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.

verbose is not a formal action input — it's an environment variable.

This section is placed in the Inputs listing alongside php-version, extensions, etc., which implies it can be passed via with: verbose: true. However, action.yml does not define a verbose input, and the code reads it via readEnv('verbose') (an env-var lookup), not core.getInput(). The correct usage is:

env:
  verbose: true

Options to fix:

  1. Add verbose as a formal input to action.yml — the TypeScript already calls readEnv() which checks both INPUT_VERBOSE (set by GHA for formal inputs) and the raw env var, so no code change needed.
  2. Move this documentation block out of the Inputs section and keep it only in the Verbose Setup section below, to avoid misleading users.

@Raj-StepSecurity
Raj-StepSecurity merged commit 770f2f2 into main Oct 21, 2026
83 checks passed
@Raj-StepSecurity
Raj-StepSecurity deleted the auto-cherry-pick branch October 21, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-required Trigger Claude AI code review on the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants