Raise php_codesniffer minimum to 4.0.2 for CVE-2026-67434 - #75
Merged
Conversation
PHP_CodeSniffer published an OS command injection advisory on 2026-08-05, covering everything below 3.13.6 and 4.0.0 up to but not including 4.0.2. The constraint here allowed 4.0.1, so a fresh install could pull an affected version. This is also what turned the prefer-lowest job red. Composer refuses to resolve packages under an active advisory, so it could not pick the declared 4.0.1 minimum and settled on 4.0.2, which validate-prefer-lowest then reported as a mismatch between the declared minimum and the installed one. Verified locally against 4.0.4: composer audit is clean and the suite passes on 8.4 and 8.5, so nothing between 4.0.1 and 4.0.4 affects a sniff here.
There was a problem hiding this comment.
Pull request overview
Raises the minimum required squizlabs/php_codesniffer version to avoid installing versions affected by CVE-2026-67434 and to unblock the CI prefer-lowest job that cannot resolve an advised-against minimum.
Changes:
- Update
composer.jsonto requiresquizlabs/php_codesniffer^4.0.2(instead of^4.0.1) to align the declared minimum with Composer’s security advisory constraints.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
prefer-lowestjob has been failing:That reads like a stale constraint, but the cause is a security advisory published on 2026-08-05:
composer.jsonrequired^4.0.1, so a fresh install could pull an affected version. Composer will not resolve a package under an active advisory, so--prefer-lowestcould not select the declared 4.0.1 minimum and landed on 4.0.2 - which is exactly the mismatchvalidate-prefer-lowestreports.Raising the floor to
^4.0.2fixes the advisory exposure and the job in one move.Suite passes on 8.4 and 8.5 against 4.0.4, so the tokenizer changes between 4.0.1 and 4.0.4 do not affect any sniff here.