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

Vulnerabilities found after npm install #3

Closed
dangelion opened this issue Apr 14, 2019 · 6 comments
Closed

Vulnerabilities found after npm install #3

dangelion opened this issue Apr 14, 2019 · 6 comments
Assignees

Comments

@dangelion
Copy link

Hi
after running npm install I get this message:

added 1743 packages from 735 contributors and audited 15913 packages in 43.147s
found 13 vulnerabilities (1 low, 10 moderate, 2 high)
  run `npm audit fix` to fix them, or `npm audit` for details

What's wrong?
Thanks

@pnikolov
Copy link
Member

Hi,

Thanks for sharing your feedback. It turns out that there are dev dependencies that have been reported to be vulnerable to Arbitrary File Overwrite (tar - reported 3 days ago sass/node-sass#2625)
All those are dev dependencies of node-sass with high severity but as those packages should not be part of your production code there is no actual risk.

Anyway I've reviewed the full npm audit report and have addressed all the reported issues and have just released Release 2.4.1 - Release Notes

  • NPM audit review and dependency packages updates
  • Auto fixing with npm audit fix
  • Manually updated
    • updated tar to 4.4.2 dependency path node-sass > node-gyp > tar - more info
    • updated braces to 2.3.2 dependency path browser-sync > micromatch > braces - more info
  • README file updated
  • Added instructions how to update/migrate to newer version of this setup.

So to resolve all reported vulnerabilities update to 2.4.1 release and make a clean install after this by running:

$ npm run ci

More instructions you can find in the README#clean-install

@pnikolov
Copy link
Member

I've just republished released Release 2.4.1 to correctly reference the updated package.json version. So feel free to install / update.

@dangelion
Copy link
Author

Hi @pnikolov
thanks for the fast answer! It solved.
Hope you're going to maintains this boilerplate for a long time, we're considering to adopt it for our projects. 👍

@pnikolov pnikolov self-assigned this Apr 15, 2019
@dangelion
Copy link
Author

Hi @pnikolov
I downloaded new release 2.4.2 and after npm install I get again:

found 2 vulnerabilities (1 low, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Let me know
Thanks

@pnikolov pnikolov reopened this Apr 22, 2019
@pnikolov
Copy link
Member

Thanks for the feedback. I was not aware that after updating the package version it will reintroduce the official latest versions of the referenced dependencies trees. I've release v2.4.3 and have additionally simulated clean install and here is the result:

added 1774 packages from 738 contributors and audited 15992 packages in 50.103s
found 0 vulnerabilities

Note: We are still waiting for a new release of node-sass that will not rely on the outdated tar and will simplify our release process.

@pnikolov
Copy link
Member

pnikolov commented Apr 22, 2019

I've just released Release 2.5.0

The main reason of this is the behaviour of npm install command. Every time you execute npm install it will rewrite your package-lock.json file and will reintroduce the current security issues inherited from the development packages of the package dependency (tar from node-sass > node-gyp > tar and braces from browser-sync > micromatch > braces).

So, from now on use only the npm ci command for setup/installation. It will respect the package-lock.json file and will not overwrite it. More on the clean install npm command can be read here npm ci

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

No branches or pull requests

2 participants