chore: upgrade axios to 1.18.0 - #585
Open
joaodordio wants to merge 2 commits into
Open
Conversation
Resolves the ten open advisories affecting axios 1.14.0, including the high severity proxy-through-interceptor-config-cloning issue (GHSA-gcfj-64vw-6mp9). All of them are patched in 1.18.0. Stops at 1.18.0 rather than the latest 1.20.0 because 1.20.0 adds a fourth generic to AxiosResponse that types config.params and config.data, which breaks compilation of authorization.test.ts. That cleanup belongs in its own change. Supersedes #577 from Vincent Taing, whose lockfile resolved packages from a private Artifactory mirror. Co-authored-by: Vincent Taing <vtaing@tockhq.com>
Closed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #585 +/- ##
=======================================
Coverage 74.43% 74.43%
=======================================
Files 57 57
Lines 2742 2742
Branches 821 820 -1
=======================================
Hits 2041 2041
Misses 660 660
Partials 41 41 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The react-example and example apps install their own axios copy. When only the root pin moved, tsc saw two structurally different AxiosResponse types across the two node_modules trees and the react-example build failed, taking the e2e job with it.
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.
Description
Supersedes #577 from @vincent-tock, who reported that the pinned
axios@1.14.0fails Squarespace's vulnerability scan. Thanks for raising it and for the detailed report.We couldn't take that PR directly for two reasons:
yarn.lockresolvedaxiosandfollow-redirectsfromartifactory.squarespace.net, a private mirror our CI and contributors can't reach.1.16.0, which is now itself affected by ten open advisories, including the high severityGHSA-gcfj-64vw-6mp9(Node HTTP adapter can use an inherited proxy after interceptor config cloning). Every one of those is patched in1.18.0.This PR bumps the
dependenciespin and the matchingresolutionsentry to1.18.0, with a lockfile regenerated against the public registry.Sample apps move too
react-exampleandexampleinstall their own copy of axios and were pinned to1.14.0alongside the root, same as the last bump in SDK-405. Moving only the root pin lefttsccomparing two structurally differentAxiosResponsetypes across the twonode_modulestrees, which broke thereact-examplebuild and took the e2e job down with it. Both pins now move in lockstep with the SDK, which restores the green build.Why 1.18.0 and not the latest 1.20.0
1.20.0adds a fourth genericPtoAxiosResponse, which typesconfig.paramsandconfig.datainstead of leaving themany. That breaks compilation ofsrc/authorization/authorization.test.tsin several places, e.g.JSON.parse(response.config.data)andresponse.config.params.email. Worth doing, but as its own change rather than folded into a security bump.Note on the dependency tree
axios@1.18.0addshttps-proxy-agent@^5.0.1as a runtime dependency. It's Node only and does not end up in the browser bundle (verified against the builtindex.js), but npm consumers will pick up one extra transitive dep. It already existed in the tree viahttp-proxy, so the lockfile just widens the existing range.Test Steps
Run locally against
main:yarn typecheckpassesyarn testpasses, 26/26 suites, 392 testsyarn buildandyarn build:nodecompile cleanlyyarn lintreports 0 errorsreact-exampleyarn buildcompiles cleanlyyarn.lockdiffs resolve entirely fromregistry.yarnpkg.comCI is green, including e2e on chromium, firefox and webkit.