Skip to content

fix(deps): patch 12 security advisories and unblock Dependabot - #343

Merged
hyperized merged 1 commit into
masterfrom
chore/security-updates
Aug 12, 2026
Merged

fix(deps): patch 12 security advisories and unblock Dependabot#343
hyperized merged 1 commit into
masterfrom
chore/security-updates

Conversation

@hyperized

Copy link
Copy Markdown
Owner

Why

Dependabot has been reporting advisories on this repo while its own security-update jobs were failing, so no fix PRs were ever opened and the alerts accumulated.

The cause is a platform mismatch, not the dependencies themselves. require.php was ^8.4, from which Dependabot derives config.platform.php = 8.4.0, but phpunit/phpunit requires php >=8.4.1 across the whole 13.x line. Every job died during resolution:

- phpunit/phpunit 13.1.1 requires php >=8.4.1 -> your php version
  (8.4; overridden via config.platform, actual: 8.4.24) does not satisfy that requirement.

Reproduced and confirmed locally:

config.platform.php Result
8.4.0 (what Dependabot derives) Your requirements could not be resolved
8.4.1 resolves cleanly

What changed

composer.jsonrequire.php ^8.4^8.4.1, stating the real minimum.

config.platform would also have unblocked Dependabot, but it applies to every composer update including CI, collapsing the 8.4/8.5 × prefer-lowest/prefer-stable matrix into four identical dependency sets. Declaring the floor in require keeps the matrix meaningful.

composer.lock — regenerated, clearing all 12 advisories:

Package From To Scope
guzzlehttp/guzzle 7.10.0 7.15.3 runtime
guzzlehttp/psr7 2.9.0 2.13.0 runtime
laravel/framework v13.4.0 v13.25.0 dev
league/commonmark 2.8.2 2.10.0 dev
squizlabs/php_codesniffer 4.0.1 4.0.4 dev
symfony/http-kernel v8.0.8 v8.0.15 dev
symfony/http-foundation v8.0.8 v8.1.4 dev
symfony/routing v8.0.8 v8.1.2 dev
symfony/mime v8.0.8 v8.1.4 dev
symfony/mailer v8.0.8 v8.1.2 dev
symfony/yaml v8.0.8 v8.1.2 dev
symfony/polyfill-intl-idn v1.34.0 v1.38.1 dev

84 packages move in total; only those carrying advisories are listed. The dev ones all arrive through orchestra/testbench.

.github/workflows/main.yml — new Composer audit job against the committed lock, which is what Dependabot scans. Deliberately outside the test matrix: --prefer-lowest resolves to the oldest versions the constraints allow and will always carry advisories.

.mergify.yml — the auto-merge rule now also requires the audit check, so a future advisory blocks a Dependabot merge rather than riding along with it. Worth a second look, since it changes when auto-merge fires.

.gitignoreinfection.log, a build artifact the suite writes.

Verification

composer audit --locked   No security vulnerability advisories found.
phpmd                     PASS
phpstan 2.2.8 (level 9)   PASS
phpcs 4.0.4 (PSR2)        PASS
phpmnd                    PASS
phpunit 13.1.14           OK (377 tests, 808 assertions)
infection                 347/347 mutants killed, 100% MSI

No new findings from the phpstan 2.1.46 → 2.2.8 or phpcs 4.0.1 → 4.0.4 bumps.

Dependabot resolution re-simulated against the new manifest at platform 8.4.1: Nothing to modify in lock file.

Dependabot's security-update jobs have been failing on this repo since
they could not resolve dependencies at all, so no fix PRs were ever
opened and the advisories piled up.

The cause is a platform mismatch. require.php was "^8.4", from which
Dependabot derives config.platform.php = 8.4.0, but phpunit/phpunit
requires php >=8.4.1 across the whole 13.x line. Every job died during
resolution. Raising the declared floor to ^8.4.1 states the real
minimum and lets Dependabot resolve again.

Setting config.platform would also have worked, but it applies to every
composer update including CI, which would collapse the 8.4/8.5 x
prefer-lowest/prefer-stable matrix into four identical dependency sets.

Regenerating the lock clears all 12 advisories. Runtime: guzzle
7.10.0 -> 7.15.3, psr7 2.9.0 -> 2.13.0. Development, via
orchestra/testbench: laravel/framework, league/commonmark,
php_codesniffer, symfony http-kernel, http-foundation, routing, mime,
mailer, yaml and polyfill-intl-idn.

Adds a Composer audit job that checks the committed lock, which is what
Dependabot scans. It sits outside the test matrix because
--prefer-lowest resolves to the oldest permitted versions and will
always carry advisories. Mergify now requires that check before
auto-merging Dependabot PRs, so a future advisory blocks the merge
instead of riding along with it.
@hyperized
hyperized merged commit 5234f99 into master Aug 12, 2026
8 of 9 checks passed
@hyperized
hyperized deleted the chore/security-updates branch August 12, 2026 11:11
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.

1 participant