Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Fix significantly outdated dependencies and security vulnerabilities#22

Closed
agrohs wants to merge 9 commits intomobify:developfrom
uniquelyparticular:fix-outdated-dependencies
Closed

Fix significantly outdated dependencies and security vulnerabilities#22
agrohs wants to merge 9 commits intomobify:developfrom
uniquelyparticular:fix-outdated-dependencies

Conversation

@agrohs
Copy link
Copy Markdown

@agrohs agrohs commented May 23, 2019

Description

This PR includes updates to several outdated dependencies (including a few w significant security vulnerabilities in the old versions).

Fixes #19

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Changes

.babelrc, rollup.config.js and package.json script updates related the following package updates.

Minor versions updates:
"atob": "^2.0.3">"^2.1.2"
"btoa": "^1.1.2">"^1.2.1"
"eslint-import-resolver-webpack": "^0.8.3">"eslint-import-resolver-webpack": "^0.11.1"
"eslint-plugin-import": "2.3.0">"eslint-plugin-import": "^2.17.2"
"express": "^4.16.2">"express": "^4.17.0"
"jsdoc": "^3.4.3">"jsdoc": "^3.6.2"
"mobify-code-style": "2.8.1">"mobify-code-style": "^2.8.4"

Major version updates:
"superagent": "3.5.2">"^5.0.5"
"babel-cli": "^6.24.1">"@babel/cli": "^7.4.4"
"babel-core": "6.18.0">"@babel/core": "^7.4.5"
"babel-preset-env": "^1.6.1">"@babel/preset-env": "^7.4.5"
"eslint": "3.19.0">"eslint": "^5.16.0"
"mocha": "~2.3.4">"mocha": "^6.1.4"
"rollup": "^0.49.3">"rollup": "^1.12.3"
"rollup-plugin-babel": "^3.0.2">"rollup-plugin-babel": "^4.3.2"
"rollup-plugin-commonjs": "^8.2.6">"rollup-plugin-commonjs": "^10.0.0"
"rollup-plugin-node-resolve": "^3.0.0">"rollup-plugin-node-resolve": "^5.0.0"
"sinon": "1.17.3">"sinon": "^7.3.2"

Remove dependencies (should no longer be needed):
"babel-plugin-external-helpers": "^6.22.0"

Additional dependencies (required as peer for updated packages above - or for testing):
"@babel/register": "^7.4.4"
"webpack": "^4.32.2"

How to test this PR?

Ran full test suite using npm run test (including updating from test config in package.json from babel-core/register to @babel/register)

IMPORTANT: The following 2 existing tests failed due to coding issues in existing test (CustomersApi.spec.js) that are now flagged by the newer/updated version of "mocha" (Error: Resolution method is overspecified. Specify a callback or return a Promise). I have gone ahead and fixed these two issues but would love an extra pair of eyes on them as they are the only changes I needed to make to the tests in order to pass.
FAILED:
Screen Shot 2019-05-23 at 11 29 57 AM
UPDATED/PASSED:
Screen Shot 2019-05-23 at 11 47 29 AM

NOTE: there are also few existing tests that throw an UnhandledPromiseRejectionWarning and should be addressed in the core code, but they appeared in existing test suite run before making any changes
Screen Shot 2019-05-23 at 11 44 15 AM

Checklist:

  • My code follows the style guidelines of this project (npm run lint)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md and CHANGELOG.md)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (npm test)

@agrohs
Copy link
Copy Markdown
Author

agrohs commented May 23, 2019

As per my other note on #19, I'd also suggest adding something like Renovate(bot) to this repo go forward. It will automatically create pull requests for manual review/consideration each time one of the dependencies in this project has a version update. This can help avoid major updates to a bunch of packages all in one commit/PR.

Just my 2 cents!
Adam

@johnboxall
Copy link
Copy Markdown
Member

Well that's cool 🎈 – thanks @agrohs!

bitmoji

I'll see if I can find time to review over the next week two weeks 🕐

@agrohs
Copy link
Copy Markdown
Author

agrohs commented May 24, 2019

As an aside, I have a separate PR ready to go that brings in generation of, storage and validation/checking of oAuth tokens for oAuth required requests to the Shop API (using it locally within our project via the fork for now). It is branched starting from the above new packages/PR as the starting point so will keep it in my fork and wait to submit that PR till this one is reviewed/cleared but just wanted to send a heads up!

@johnboxall
Copy link
Copy Markdown
Member

generation of, storage and validation/checking of oAuth tokens for oAuth required requests to the Shop API

@agrohs – well that also sounds pretty cool :)

We use this package both client & server-side (in browser & in Node) – as a side effect of that, we also manage JWTs outside the scope of this package.

I'd be really interested in seeing what you're doing and I think it would be valuable to document strategies to persist tokens but we'd probably have to put our thinking caps on a bit around whether we'd accept a patch that added storage.

@agrohs
Copy link
Copy Markdown
Author

agrohs commented May 25, 2019 via email

@agrohs
Copy link
Copy Markdown
Author

agrohs commented Jun 5, 2019

Just checking in on this PR?

@bendvc
Copy link
Copy Markdown
Contributor

bendvc commented Jul 2, 2019

@agrohs Going to close this PR. I was not away of it when updating the dependancies in another. If you are interested you can see what was changed here --> #23

@bendvc bendvc closed this Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

VULNERABILITY: Denial Of Service in superagent < 3.7.0

3 participants