Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix security issues #20

Merged
merged 11 commits into from
Aug 27, 2019
Merged

feat: fix security issues #20

merged 11 commits into from
Aug 27, 2019

Conversation

favna
Copy link
Contributor

@favna favna commented Aug 23, 2019

This library was ridden with old libraries causing a tonne of security vulnerabilities to it and everyone using the library. This PR aims to fix all of the issues while also generally upgrading the development environment to a more modern standard (by replacing the mix of Sinon, Mocha, Nyc, Proxyrequire with Jest). I also upgraded husky and removed deprecated packages replacing them with their proper equivalents.

As Yargs is one of the main players that got an upgrade and between V10 and V14 they have dropped NodeJS support for NodeJS version 6 and lower this library now therefore also requires NodeJS version 8 or higher. I've configured this appropiately in the engines field of the package.json as well. At least Yarn users will get alerted about it now...

That said, this should be a major version upgrade in semantic-release but I'm not too familiar with its workings on how to control that so I'll leave that in your hands.

Here are some text dumps

Security vulnerabilities before:

npm i

> husky@0.14.3 install /Users/favna/dev/temp/node_modules/husky
> node ./bin/install.js

husky
setting up Git hooks
done


> sinon@4.5.0 postinstall /Users/favna/dev/temp/node_modules/sinon
> node scripts/support-sinon.js

Have some ❤️ for Sinon? You can support the project via Open Collective:
 > https://opencollective.com/sinon/donate

added 1211 packages from 1684 contributors and audited 7741 packages in 12.55s
found 105 vulnerabilities (26 low, 7 moderate, 72 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Security vulnerabilities after:

 npm audit
                                                                                
                       === npm audit security report ===                        
                                                                                
found 0 vulnerabilities
 in 890447 scanned packages

@nanovazquez
Copy link
Owner

First of all, great work! Thank you for taking the time and effort in doing all of this.

I did a first pass and I agree in most of your changes, still, it is a big PR with multiple changes. It is indeed a major, I'll take care of the commit message later (it's really simple to trigger a major with semantic release, you just have to add BREAKING CHANGE: in the commit message body, see here).

I'll try my best to have it ready this weekend, please wait for it a little bit more.

@nanovazquez nanovazquez self-requested a review August 24, 2019 02:08
@nanovazquez
Copy link
Owner

nanovazquez commented Aug 24, 2019

Hey @favna, how are you? I've made some small changes to this PR and sent you another PR to your main branch (here). Could you please take a look and if all looks good to you merge it to your master branch?

In a nutshell, I'm fixing the test suite, updating documentation and reverting back the change to update yargs, we don't need it to fix all the security issues:

➜  yargs-interactive git:(refactor/fix-tests) npm audit

                       === npm audit security report ===

found 0 vulnerabilities
 in 890555 scanned packages

Without the yargs update, we can release a new patch version (or minor, still wondering what's best in this case) this weekend. Then, updating yargs in a major version is going to take just a one-liner PR.

@favna
Copy link
Contributor Author

favna commented Aug 24, 2019

Changes pretty much look good aside from some extra stuff I posted there concerning yargs upgrade. I'll merge that PR when we come to a conclusion there, then we can merge this one after.

favna and others added 3 commits August 26, 2019 22:40
@nanovazquez
Copy link
Owner

@favna: One more PR to go: https://github.com/Favna/yargs-interactive/pull/3. This one fixes some tests.

Co-authored-by: nanovazquez <marianodvazquez@gmail.com>
@favna favna changed the title Upgrade development environment refactor: upgrade development environment Aug 27, 2019
@nanovazquez nanovazquez changed the title refactor: upgrade development environment feat: fix security issues Aug 27, 2019
@nanovazquez nanovazquez merged commit 30904df into nanovazquez:master Aug 27, 2019
@nanovazquez
Copy link
Owner

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants