javascript - 在 npm install 之后我收到错误:Prototype Pollution in set-value
问题描述
我在 React Native 中有一个应用程序,当我运行 npm install 时,我收到此错误“在 1182 个扫描包中发现 15 个漏洞(5 个中等漏洞,10 个高漏洞)”。运行 npm audit 后,大部分错误包含以下内容:
设定值高原型污染
包装设定值
已修补 >=4.0.1
react-native 的依赖
路径 react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro-config > metro-core > jest-haste-map > sane > anymatch > micromatch > 大括号 > snapdragon > 基础 > 缓存基础 > 设置值
和这个:
chalk/ansi-regex 中的中度低效正则表达式复杂性
包 ansi 正则表达式
已修补 >=5.0.1
react-native 的依赖
路径 react-native > @react-native-community/cli > strip-ansi > ansi-regex
谁能帮我解决这些问题?
解决方案
请Moderate Inefficient Regular Expression Complexity in chalk/ansi-regex
参阅 Qix 对以下线程的评论:https ://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
tldr:在用户输入到达 API 之前对其进行清理(如果适用)
推荐阅读
- javascript - 如何将 WebGL 集成到使用画布和 2D context.drawImage 的现有游戏中?
- javascript - 如何在nodejs中将文件下载为pdf
- php - mysqli_fetch_assoc($result) 不显示所有结果
- reactjs - 如何使用 React NavLink 在新页面上呈现表单?
- powershell - 在 PowerShell 中通过 PIP 一次性升级过时的 Python 包
- r - 拟合数据集后将 binnin 模型存储在 R 中
- python - 如何在 django 自定义 APIView 中设置分页?
- mysql - 不能用 docker laravel 做 mysql
- excel - 使用 msxmlhttp60 设置“表变量”中的 Excel vba 问题
- python - 当我单击提交按钮时,我的数据库中没有任何显示