Repository navigation
Make the OSV job honour php-version and php-extensions - #29
Merged
Merged
Conversation
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The reusable
security.ymlacceptsphp-versionandphp-extensions, honours both incomposer-audit, and ignored both inosv-scan, which hardcodedphp-version: '8.4'and set no extensions.Any caller whose
composer.jsonfloors PHP above 8.4 therefore fails the OSV job — and fails in a way that points nowhere near the cause.How it presented
laranail/chrono("php": "^8.5") failed its first run of this workflow with:That is composer, in a job named "OSV.dev scan", in a step named "Set up PHP" — and the message names neither PHP nor a version. The obvious reading is that OSV-Scanner is broken. It isn't; composer was refusing to resolve a
^8.5requirement against an 8.4 runtime.Why it stayed hidden
The other four pilot repositories declare
"php": "^8.4.1 || ^8.5", so 8.4 satisfies them and the job passed. A default that happens to suit most callers hides the bug behind the ones it suits, and surfaces it only on the caller with the highest floor — which is also the caller least likely to be the first one tried.The fix
Both values now come from the inputs, in both jobs. The literal is replaced, not supplemented, so there is no second place for the two to drift apart.
Verified
php-version: ${{ inputs.php-version }}at 2 sites,extensions: ${{ inputs.php-extensions }}at 2 sites, hardcoded'8.4'at 0 — counted withgrep -F, because{is a metacharacter under ugrep and the first count came back 0 against a correct file.