chore: upgrade saloonphp/saloon to ^4.0#29
Merged
Conversation
Bumps the Saloon dependency to ^4.0 to remediate three security advisories that affect every 3.x release: - CVE-2026-33942 (high): insecure deserialization in AccessTokenAuthenticator (the class now omits __serialize / __unserialize entirely) - CVE-2026-33182 (medium): absolute URL in resolveEndpoint() could override the connector base URL, enabling SSRF and credential leak; v4 introduces an opt-in $allowBaseUrlOverride flag that defaults to false - CVE-2026-33183 (medium): fixture name path traversal in the mock client No patched 3.x release exists for these CVEs (issue #28's suggested ^3.16 bump is not viable). Saloon 4 keeps PHP ^8.2 and the public APIs this package depends on are unchanged: Authenticator contract, TokenAuthenticator, Response, Request, MockClient, MockResponse, AcceptsJson plugin, HasTries trait, and the Connector::getRequestException() signature. The connector resolves every endpoint relative to https://api.github.com, so the new base URL override default (off) matches existing behavior and requires no code changes. Closes #28
4 tasks
Clears two pre-existing dev-dep CVEs flagged by the Sentinel Gate (composer audit) so this PR can land green: - phpunit/phpunit 11.5.33 -> 11.5.50 (CVE-2026-24765, high): Unsafe deserialization in PHPT code coverage handling. Pulled via pestphp/pest; pest was bumped within its existing ^3.0 constraint (v3.8.4 -> v3.8.6) to satisfy phpunit ^11.5.50. - symfony/process v7.4.0 -> v7.4.11 (CVE-2026-24739, medium): Incorrect argument escaping under MSYS2/Git Bash on Windows. Dev-only transitive. Lockfile-only change; no composer.json constraints widened. Tests (85 passing, prior baseline) and PHPStan level 8 remain green. composer audit now reports no advisories.
Contributor
Author
|
Appended two dev-dep bumps to this branch to also clear the Sentinel Gate's pre-existing CVEs cleared:
Verification on the latest commit (97bf02e):
|
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
Bumps
saloonphp/saloonfrom^3.10to^4.0to remediate three security advisories. Drops 0 LOC of production code: Saloon 4 keeps every public API this package depends on.Closes #28.
Why ^4.0 and not ^3.16
Issue #28 suggested bumping to
^3.16once the patch lands on 3.x. That patch was never released — all three CVEs ship the fix in 4.0.0 and only 4.0.0. The advisory metadata confirmsAffected versions: <4.0.0for each.AccessTokenAuthenticator__serialize/__unserializeremoved from the classresolveEndpoint()overrode the connector's base URL (SSRF + credential leakage)$allowBaseUrlOverrideflag onConnector, defaults tofalsePre-upgrade
composer auditlisted all three. Post-upgrade onlyphpunit/phpunitandsymfony/processadvisories remain — both dev-only, both unrelated to this change.BC changes applied to connector code
None. Saloon 4 preserves every API surface this package touches:
Saloon\Http\Connector(extended insrc/Connector.php)Saloon\Contracts\Authenticator(returned by every auth strategy)Saloon\Http\Auth\TokenAuthenticator(used byTokenAuthentication,GitHubOAuth,GitHubAppAuthentication)Saloon\Http\Response(typed in every custom exception and ingetRequestException())Saloon\Http\Request,Saloon\Enums\Method(used in tests)Saloon\Http\Faking\MockClient,Saloon\Http\Faking\MockResponse(used in tests)Saloon\Traits\Plugins\AcceptsJsonConnector::getRequestException(Response, ?Throwable): ?Throwablesignature unchangedConnector::resolveBaseUrl(): stringcontract unchangedThe new
$allowBaseUrlOverrideflag defaults tofalse, which matches our behavior: every GitHub endpoint resolves relative tohttps://api.github.com. No request in this package or downstream consumers passes an absolute URL throughresolveEndpoint(), so the secure default is correct.PHP minimum stays at
^8.2|^8.3|^8.4— Saloon 4 requires PHP^8.2.Downstream impact for
conduit-ui/prNo upgrade required.
conduit-ui/prconsumesConduitUi\GitHubConnector\Connectorand never imports aSaloon\namespace directly. The connector's public API does not leak any Saloon type whose shape changed in v4 — it returns custom exceptions (GitHubExceptionsubclasses), accepts anAuthenticationStrategy(this package's interface), and exposes static repo-context helpers that have no Saloon coupling.If
conduit-ui/prever upgrades to Saloon 4 directly (for example to use the mock client in its own tests) it will inherit the same secure defaults — its only existing Saloon touch point is constructingConnectorinstances, which is forward-compatible.Test plan
composer test— 85 passed (Pest), unchanged from pre-upgradecomposer analyse— PHPStan level 4 clean, no errorscomposer audit— all three Saloon CVEs gone