Skip to content

Conversation

@wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Jul 7, 2025

Address https://cwe.mitre.org/data/definitions/200.html
Address https://cwe.mitre.org/data/definitions/212.html

To address https://github.com/woocommerce/woocommerce-gateway-stripe/security/dependabot/20 in the Stripe extension repository, we need to update axios to bump follow-redirects to at least 1.15.6 (1.15.9 in practice).

@wjrosa wjrosa self-assigned this Jul 7, 2025
@wjrosa wjrosa changed the title Updating axios version to 1.6.8 [SIRT] Updating axios version to 1.6.8 Jul 7, 2025
@daledupreez
Copy link

This seems like a reasonable change, but it's not clear to me how we would confirm that it is still working as expected.

@wjrosa
Copy link
Contributor Author

wjrosa commented Jul 8, 2025

From what I could see in the code, this is actually just used by our e2e tests (woocommerce-gateway-stripe/tests/e2e/utils/api.js#6):

// Ensure that global-setup.js runs before creating api client
if ( process.env.CONSUMER_KEY && process.env.CONSUMER_SECRET ) {
	api = new wcApi( {
		url: config.use.baseURL,
		consumerKey: process.env.CONSUMER_KEY,
		consumerSecret: process.env.CONSUMER_SECRET,
		version: 'wc/v3',
	} );
}

It is used below to create customers, products, orders, and other entities. If e2e tests continue to work with this update, we are good to go.

Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version bump seems ok, it's only bumping the patch version, so it should be compatible... and the tests pass:

Image

--

And, for the tests in the Stripe repo, using this lib locally with:
"@woocommerce/woocommerce-rest-api": "../woocommerce-rest-api-js-lib", the E2E tests also pass.

Checking the package-lock.json, there are still several resolved deps for Axios with versions < 1.6.8. However, since Axios is not used in the actual plugin package, but rather to set up the test environment, that shouldn't be a problem.

Copy link

@daledupreez daledupreez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for testing, @diegocurbelo!
🚀

@wjrosa wjrosa merged commit 2f22084 into master Jul 9, 2025
@wjrosa wjrosa changed the title [SIRT] Updating axios version to 1.6.8 [security] Updating axios version to 1.6.8 Jul 9, 2025
@wjrosa wjrosa changed the title [security] Updating axios version to 1.6.8 [SECURITY] Updating axios version to 1.6.8 Jul 9, 2025
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.

4 participants