react native 0.64.2 NPM审计7个中度警告



我已经在react native 0.64.2中创建了一段时间的应用程序,我在审计我的项目(npm审计)时注意到几个错误消息,我决定创建一个新的空白项目并执行包的审计(npm审计),事实证明给出了同样的问题,我离开审计的结果

% npm audit
# npm audit report
xmldom  *
Severity: moderate
Misinterpretation of malicious XML input - https://npmjs.com/advisories/1769
fix available via `npm audit fix --force`
Will install react-native@0.62.0, which is a breaking change
node_modules/xmldom
plist  >=0.3.2
Depends on vulnerable versions of xmldom
node_modules/plist
@react-native-community/cli-platform-ios  *
Depends on vulnerable versions of plist
Depends on vulnerable versions of xcode
node_modules/@react-native-community/cli-platform-ios
react-native  <=0.0.0-ffdfbbec0 || >=0.62.1
Depends on vulnerable versions of @react-native-community/cli
Depends on vulnerable versions of @react-native-community/cli-platform-ios
node_modules/react-native
@react-native-community/cli  >=5.0.0-alpha.0
Depends on vulnerable versions of react-native
node_modules/@react-native-community/cli
simple-plist  *
Depends on vulnerable versions of plist
node_modules/simple-plist
xcode  >=0.8.3
Depends on vulnerable versions of simple-plist
node_modules/xcode
7 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force

我不想使用命令(npm audit fix——force),因为我正在使用React Native 0.64.2,该命令将用React Native 0.62.0取代项目,我正在为Android和IOS编程,还有其他解决方案来解决这个问题吗?

正确,你不应该运行npm audit fix——force。包确保您的依赖关系结构在安装之间是一致的。如果您强制进行审计修复,您将失去这种保护,并且您的代码可能很容易以不总是立即明显的方式出错。

请阅读以下内容:

https://www.voitanos.io/blog/don-t-be-alarmed-by-vulnerabilities-after-running-npm-install/

"自从NPM的人在每次安装NPM后自动扫描漏洞以来,我看到了越来越多的问题....

注意它说这些包(mime &parsejson)都被SharePoint框架使用的一个核心微软包引用:@microsoft/sp-build-web &@microsoft/sp-webpart-workbench…

这些是其他人添加到他们的包中的依赖项。你不能只是改变别人的依赖,而不期望发生任何不利的事情。也许事情会工作得很好,但是改变上游的依赖关系听起来像一个微不足道的改变吗?它不应该…因为它不是。">

当我看到这个的时候,我也感到不安,我停下来,思考,并记住最好不要做太多。如果一切都在源代码控制之下,您可以尝试https://github.com/raineorshine/npm-check-updates。但这是我能走的最远的了。

相关内容

最新更新