当我跑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 │
└───────────────┴──────────────────────────────────────────────────────────────┘
在这个例子中,链接页面的修复部分显示为Update to version 4.17.5 or later.
.然而,在/node_modules/browser-sync/package.json
中有几行:
"devDependencies": {
"lodash-cli": "4.17.5",
}
不再依赖洛达斯.所以它应该已经是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",所以版本是正确的,但漏洞仍然出现在审计列表中.
我还是个新手.js和那些消息让我很困惑.有没有办法手动修复它,或者清除那些我无法处理的消息?