我正在开始一个新的 React 项目,我只安装了非常基本的包(npx create-react-app),没有其他任何东西。当我运行审计时,我得到以下低漏洞:
=== npm audit security report ===
????????????????????????????????????????????????????????????????????????????????
? Manual Review ?
? Some vulnerabilities require your attention to resolve ?
? ?
? Visit https://go.npm.me/audit-guide for additional guidance ?
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
? 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 ? react-scripts ?
????????????????????????????????????????????????????????????????????????????????
? Path ? react-scripts > webpack-dev-server > yargs > yargs-parser ?
????????????????????????????????????????????????????????????????????????????????
? More info ? https://npmjs.com/advisories/1500 ?
????????????????????????????????????????????????????????????????????????????????
found 1 low severity vulnerability in 1896 scanned packages
1 vulnerability requires manual review. See the full report for details.
Run Code Online (Sandbox Code Playgroud)
我尝试了谷歌并在任何地方寻找解决此问题的方法,我重新安装了 yargs-parser 包但没有成功,并尝试多次重新安装该项目。
任何帮助将不胜感激。
Tec*_*oft 15
现在没有立即修复。 yargs-parser自从固定在react-scripts. 我们正在等待react-scripts更新以解决此警告。
值得注意的是,这不是一个“严重”的漏洞,应该只影响开发环境。它已在最新版本中修复,yargs-parser但我不会因为低风险漏洞而失眠。它们不时发生,社区通常很擅长修补它们。
您可以在此处查看此问题的进度或(取决于您的技能水平)为修复做出贡献:https : //github.com/facebook/create-react-app/issues/8529
小智 5
我们还需要添加这个:
“脚本”:{“预安装”:“npx npm-force-resolutions”}
然后在你的 package.json 添加:
“决议”:{“yargs-parser”:“^13.1.2”}
最后在您的终端上运行以下 commond:
rm -r node_modules
安装
| 归档时间: |
|
| 查看次数: |
11385 次 |
| 最近记录: |