npm审核返回奇怪的依赖关系

时间:2019-02-20 08:47:34

标签: javascript npm npm-audit

Npm审核返回的输出带有一些有效的警告,但也带有看起来像随机十六进制字符串的怪异依赖关系。每当我运行npm audit时,该字符串都会更改,并且对于审计中引用的所有软件包都是相同的。

我该如何摆脱呢? Npm版本是6.8.0

High            Cross-Site Scripting (XSS)
Package         jquery
Patched in      >=3.0.0
Dependency of   28941ae593a0bfccfbff69e6c9be45d3edb864692c815174fff557331de…
Path            28941ae593a0bfccfbff69e6c9be45d3edb864692c815174fff557331de…
                >
                39e4d897653a99aeb635bac80469694d1066d648e1fc9d3ac63ded7789c…
                > jquery

More info       https://npmjs.com/advisories/328


Moderate        Prototype Pollution
Package         lodash
Patched in      >=4.17.11
Dependency of   browserify-resolutions [dev]
Path            browserify-resolutions > lodash

More info       https://npmjs.com/advisories/782

Moderate        Prototype Pollution
Package         lodash
Patched in      >=4.17.11
Dependency of   28941ae593a0bfccfbff69e6c9be45d3edb864692c815174fff557331de…
Path            28941ae593a0bfccfbff69e6c9be45d3edb864692c815174fff557331de…
                > lodash

More info       https://npmjs.com/advisories/782

1 个答案:

答案 0 :(得分:2)

我刚刚遇到了同样的问题。在查看 npm docs 后,这已在第 7 版中得到解决。我刚刚使用 npm 7+ 运行了 npm audit,它指出了确切的包,这些包是没有散列的罪魁祸首。