The Node Security Platform has identified over 824,000 versions of npm packages in the npm Registry that are impacted by at least one vulnerability.
These new protections include automatic warnings if a developer attempts to use open source code with known security issues, and `npm audit`, an npm command that allows developers to analyze complex, interdependent code to pinpoint specific vulnerabilities.
`npm audit` and insecure code warnings are available today to beta users and will roll out automatically to all users of npm@6 and the npm Registry over a period of weeks. The protections are free of charge to all users of the npm Registry with no required registration. In addition, customers of npm, Inc.’s paid offerings will receive pre-publication vulnerability disclosures, formerly a premium tier of the Node Security Platform product.
When a user downloads code from the npm Registry, npm will review the request against the Node Security Platform database and return a warning if the code contains a vulnerability. In addition, the `npm audit` command within npm@6 will allow the developer to recursively analyze trees of dependent code to identify specifically what’s insecure. Typical packages can be analyzed in less than one second.
Without npm@6, developers must rely on manual code reviews of complex, interdependent packages, or third-party scans and audits that introduce additional complexity into developer workflows.
Instead, npm is giving away these protections with npm@6 for maximum community benefit. The move is the latest step by the world’s largest software registry to improve the performance and stability of how developers build applications.
Other notable npm@6 benefits include:
- Performance enhancements—up to 17X faster than npm of one year ago.
- Optimizations for continuous integration (CI)—a special `npm ci` mode makes using npm within CI workflows 2–3X faster.
- Webhooks management—to configure real-time notifications of npm registry and package changes and use these to power new developer tools.
- More visible package integrity metadata—makes it easier to verify that a package hasn’t been tampered with or corrupted.
- Automatic resolution of lockfile conflicts—enables teams to more easily share reproducible code builds.
Node Security Platform vulnerability alerts are already available to users of npm’s beta registry and will become available to all npm Registry users in coming weeks. To learn more, visit: https://go.npm.me/npm6.
About npm, Inc.