npm漏洞修复 audit查看报告后怎样处理?

今天npm提示检测到了两个高危漏洞

运行 npm audit fix进行修复,修复完成后提示有一个漏洞无法自动修复,需要手动审核

运行 npm audit 得到以下安全报告:

                       === npm audit security report ===


                                 Manual Review
             Some vulnerabilities require your attention to resolve

          Visit https://go.npm.me/audit-guide for additional guidance


  High            Missing Origin Validation

  Package         webpack-dev-server

  Patched in      >=3.1.11

  Dependency of   vue-photo-preview

  Path            vue-photo-preview > webpack-dev-server

  More info       https://nodesecurity.io/advisories/725found 1 high severity vulnerability in 18322 scanned packages  1 vulnerability requires manual review. See the full report for details.

这个就看不懂的,是webpack-dev-server的问题还是vue-photo-preview的问题呢?

有没有大神能解答一下,这个漏洞需要怎么处理?


德玛西亚99
浏览 4610回答 2
2回答

茅侃侃

提示的很明显,是 vue-photo-preview 依赖的 webpack-dev-server 版本有漏洞风险。这个在 webpack-dev-server@3.1.11 之后被修复了。但 vue-photo-preview 其实只依赖 photoswipe,其他的 15 个依赖都应该是 Dev Dependencies。建议不要用 vue-photo-preview 这个库,直接用 photoswipe 就可以。

青春有我

vue-photo-preview 依赖的 webpack-dev-server,可以尝试升级一下。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript