【问题标题】:Denial of Service http-proxy: Ionic Angular拒绝服务 http-proxy:Ionic Angular
【发布时间】:2020-05-17 08:36:03
【问题描述】:

我有 Ionic Angular 项目,今天在我安装了一些 npm 包之后,

它在末尾显示found 3 vulnerabilities (1 low, 2 high) 消息。

当我运行npm audit 时,它返回了这个,

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Denial of Service                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ http-proxy                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @angular-devkit/build-angular [dev]                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @angular-devkit/build-angular > webpack-dev-server >         │
│               │ http-proxy-middleware > http-proxy                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1486                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Denial of Service                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ http-proxy                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ No patch available                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ karma [dev]                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ karma > http-proxy                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1486                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ yargs-parser                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @angular-devkit/build-angular [dev]                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @angular-devkit/build-angular > webpack-dev-server > yargs > │
│               │ yargs-parser                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1500                            │
└───────────────┴──────────────────────────────────────────────────────────────┘

然后我跑了npm audit --prod

                       === npm audit security report ===                        

found 0 vulnerabilities
 in 78 scanned packages

意思是说,对生产环境没有影响?

一旦我访问审计报告中的给定链接以获取更多信息,它会说,

目前没有可用的修复程序。在修复可用之前,请考虑使用替代包。

那么http-proxy 包有什么替代方案吗?

提前致谢。

【问题讨论】:

  • 如果你运行npm audit fix 那么它现在就解决了。刚遇到同样的问题,但已经有解决此问题的方法。

标签: node.js angular npm webpack-dev-server http-proxy-middleware


【解决方案1】:

意思是说,对生产环境没有影响?

是的,它不会影响您的产品环境。 http-proxy 仅在您的开发依赖项中使用,您可以在“Depenceny of”行中看到。

那么 http-proxy 包有什么替代方案吗?

我不这么认为,因为 Angular 自己使用它。我们必须等到官方修复。

【讨论】:

    猜你喜欢
    • 2020-09-01
    • 2015-08-26
    • 1970-01-01
    • 1970-01-01
    • 2021-03-22
    • 2020-10-08
    • 2018-03-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多