当我运行npm install
时,它会显示found 33 vulnerabilities (2 low, 31 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
。
然而,npm audit fix
的输出为up to date in 11s
fixed 0 of 33 vulnerabilities in 24653 scanned packages
33 vulnerabilities required manual review and could not be updated
review
这个词是不是意味着用户不能修复这个问题?
当我运行npm audit
时,它会给我一个类似于以下表格的列表:
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low │ Prototype Pollution │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ lodash │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=4.17.5 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ browser-sync [dev] │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ browser-sync > easy-extender > lodash │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://nodesecurity.io/advisories/577 │
└───────────────┴──────────────────────────────────────────────────────────────┘
在这个例子中,链接页面的修复部分说“更新到4.17.5或更高版本”。然而,在/node_modules/browser-sync/package.json
中有以下几行:
"devDependencies": {
"lodash-cli": "4.17.5",
}
现在不再有lodash的依赖关系,因此它应该已经是v4.17.5。我还检查了/node_modules/lodash/lodash.json
文件,其中包含var VERSION ='4.17.10';
一行。在/node_modules/lodash/package.json
中有这些行:
"_from": "lodash@^4.17.4",
"_id": "lodash@4.17.10",
我相信版本显示在“_id”而不是“_from”,因此版本是正确的,但漏洞仍然出现在审核列表中。
我还是新手在node.js中,这些消息让我感到困惑。有没有办法手动修复或摆脱那些我无法处理的消息?