如何修复 vue-cli-service 漏洞?
how to fix vue-cli-service vulnerability?
我刚刚尝试使用 @vue/cli 4.3.1
创建一个新项目,全新安装 Ubuntu 19.10,npm 6.14.4
。当我 cd
进入项目并 运行 npm install
时,我得到以下信息:
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
运行 npm audit fix
产生
fixed 0 of 1 vulnerability in 1285 scanned packages
1 vulnerability required manual review and could not be updated
运行宁npm audit
,我得到
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ http-proxy │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ No patch available │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @vue/cli-service [dev] │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @vue/cli-service > webpack-dev-server > │
│ │ http-proxy-middleware > http-proxy │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://npmjs.com/advisories/1486 │
└───────────────┴──────────────────────────────────────────────────────────────┘
这是预期的吗?普通的?可以修复吗?我很担心这种情况发生在没有安装任何恶意软件的干净环境中,但我也不是 npm 专家...我应该在这里做什么?
我在建立一个新的 Vue 项目时遇到了同样的问题。我能够在 Github Vue/Vue-cli 上找到 post 他们解决问题的地方:
https://github.com/vuejs/vue-cli/issues/5489#issuecomment-629326414
post 说他们正在跟踪这个问题,但请注意:
Note: as it's only used for the local development server, it's not an
actual security vulnerability on Vue CLI projects. Feel free to ignore
it if @vue/cli-service is the only source of this dependency in your
project.
所以,我先走了,暂时忽略了。我希望当他们更新 NPM 包时,它将使用更新的 http-proxy,从而解决问题。
根据跟踪器本身,它说它已在 http-proxy 版本 1.18.1 中修复。
我建议,在创建 vue cli 项目之前,将 node 和 npm 升级到可用的最新版本。我遇到了同样的问题,这为我解决了部分问题(从之前的 108 个漏洞到之后的 45 个)。
我刚刚尝试使用 @vue/cli 4.3.1
创建一个新项目,全新安装 Ubuntu 19.10,npm 6.14.4
。当我 cd
进入项目并 运行 npm install
时,我得到以下信息:
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
运行 npm audit fix
产生
fixed 0 of 1 vulnerability in 1285 scanned packages
1 vulnerability required manual review and could not be updated
运行宁npm audit
,我得到
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ http-proxy │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ No patch available │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @vue/cli-service [dev] │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ @vue/cli-service > webpack-dev-server > │
│ │ http-proxy-middleware > http-proxy │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://npmjs.com/advisories/1486 │
└───────────────┴──────────────────────────────────────────────────────────────┘
这是预期的吗?普通的?可以修复吗?我很担心这种情况发生在没有安装任何恶意软件的干净环境中,但我也不是 npm 专家...我应该在这里做什么?
我在建立一个新的 Vue 项目时遇到了同样的问题。我能够在 Github Vue/Vue-cli 上找到 post 他们解决问题的地方:
https://github.com/vuejs/vue-cli/issues/5489#issuecomment-629326414
post 说他们正在跟踪这个问题,但请注意:
Note: as it's only used for the local development server, it's not an actual security vulnerability on Vue CLI projects. Feel free to ignore it if @vue/cli-service is the only source of this dependency in your project.
所以,我先走了,暂时忽略了。我希望当他们更新 NPM 包时,它将使用更新的 http-proxy,从而解决问题。
根据跟踪器本身,它说它已在 http-proxy 版本 1.18.1 中修复。
我建议,在创建 vue cli 项目之前,将 node 和 npm 升级到可用的最新版本。我遇到了同样的问题,这为我解决了部分问题(从之前的 108 个漏洞到之后的 45 个)。