Strings.xml 文件中的密钥被泄露。有没有办法将键存储在其他文件中并使用 Strings.xml 中的值?

问题描述 投票:0回答:1
<resources>
  <string name="app_name">Test App</string>
  <string 
    moduleConfig="true" 
    name="CodePushDeploymentKey">
    PUT-YOUR-DEPLOYMENT-KEY-HERE
  </string>
</resources>

这是 String.xml 文件的示例代码,我在其中存储 CodePush 的 React Native 应用程序的密钥。

当我通过漏洞测试运行应用程序时,它表明密钥从 Strings.xml 文件中泄漏。那么除了 Strings.xml 之外还有其他方法来存储文件吗?或者我们如何防止键值从 Strings.xml 文件中泄漏?

android xml react-native security code-push
1个回答
0
投票

将其存储在 .env 文件中将确保可靠性。

了解更多信息。

答案链接

© www.soinside.com 2019 - 2024. All rights reserved.