【发布时间】:2018-10-31 09:16:56
【问题描述】:
我最近将一个 Angular CLI 5 应用程序推送到 GitHub,它显示以下内容:
We found a potential security vulnerability in one of your dependencies.
A dependency defined in net-incident/package-lock.json has known security vulnerabilities and should be updated.
Dependencies defined in net-incident/package-lock.json 816
hapijs / hoek Known security vulnerability in 2.16.3
我查看了“npm audit”的输出并执行了各种更新,包括以下内容(未建议):
npm install --save-dev request@2.86.0
“request”包包含“hawk”,其中包含“hoek”。当我查看 node_modules 中的“请求”包时,版本已更改。但是来自“npm audit”的以下两个更新似乎没有做任何事情:
npm update fsevents --depth 4 npm update stringstream --depth 5
我还剩下以下内容:
[!] 33 vulnerabilities found [12201 packages audited]
Severity: 5 Low | 24 Moderate | 4 High
Run `npm audit` for more detail
许多漏洞如下:
Moderate Prototype pollution
Package hoek
Patched in > 4.2.0 < 5.0.0 || >= 5.0.3
Dependency of karma
Path karma > log4js > loggly > request > hawk > boom > hoek
More info https://nodesecurity.io/advisories/566
最后,应用程序无法编译,所以我更换了包和锁定文件,现在我又回到了开头。我真的很想解决安全问题。如何摆脱讨厌的“hook”漏洞?
【问题讨论】:
-
这让我成功了一半:Running suggested command doesnt fix npm vulnerability,但我仍然遇到 Hoek 7 漏洞问题。
-
剩下的问题似乎与 karma 相关。追踪业力问题here #2994
-
我发布了对我有用的解决方案stackoverflow.com/questions/50759164/npm-audit-fixes
-
我觉得#2994快要被清理了,所以我想我会等一下。
标签: node.js angular github npm