Ang*_*sta 6 security android google-play-services fortify
我们正在使用Fortify扫描我的Android源代码,但我无法摆脱这个问题:
类别:Android不良做法:缺少Google Play服务更新的安全提供程序(1个问题)
Fortify指向以下代码行:
tools:replace =“ android:allowBackup”>
AndroidManifest.xml:37 null()
<application
android:name=".test"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:allowBackup"> <!--FORTIFY POINTS TO THIS LINE-->
Run Code Online (Sandbox Code Playgroud)
强化建议:
修补安全提供程序的最简单方法是调用同步方法installIfNeeded()。如果用户体验在等待操作完成时不受线程阻塞的影响,那么这是适当的,否则应以异步方式完成。
有关此问题的更多信息
我已关注Android的“ 更新您的安全提供商”以防御SSL漏洞
并尝试了两种方法:
installIfNeed() 和installIfNeededAsync()
但是问题仍然存在。我测试我的代码,它工作正常。
这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="test">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".test"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:allowBackup">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<provider
android:name=".syncadapter.StubProvider"
android:authorities="com.neseapl.nyp.provider"
android:exported="false"
android:syncable="true"/>
<service
android:name=".syncadapter.SyncService"
android:exported="false">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>
<service
android:name=".syncadapter.AuthenticatorService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator"/>
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/account_authenticator" />
</service>
<activity
android:name=".activities.Test"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
我的清单中缺少任何内容吗?谢谢!
小智 2
我最近在使用 Fortify 时遇到了类似的问题。正如 Silvia Ragui 指出的那样,Fortify 没有正确分析这个运行时进程。虽然 installIfNeeded() 和 installIfNeededAsync() 将更新 APK 实际部署中的安全提供程序,但当您重新提交到 Fortify 时,它似乎不会清除错误。
\n\n然而,根本问题是过时的安全提供程序,这通常是由于您的包中的游戏服务库过时造成的。
\n\n以下是直接来自 fortify 仪表板的建议:
\n\n\n\n\nAndroid 依靠安全提供程序来提供安全的网络通信。默认设备加密库通常是旧版本的 OpenSSL,其中包含已知缺陷。为了克服这个问题,Google 提供了一种机制,让应用程序通过 Google Play Services ProviderInstaller 客户端\xe2\x80\x9cpatch\xe2\x80\x9d 本地 OpenSSL 副本。\xe2\x80\x99s 已确定该应用程序未使用更新的提供程序,从而使该应用程序暴露于较旧的已知 OpenSSL 漏洞和弱点。>
\n
实际问题与 Silvia 日志中的最后一行相同:
\n\n\n\n\nW/GooglePlayServicesUtil Google Play 服务已过时
\n
在我们的例子中,我们更新到了包中的 Play Services 的最新版本,并实施了上述修复(当我们这样做时,我们发现有一个必须修复的小错误,并且可能阻止更新修补安全提供程序) )
\n\n新版本成功解决了该问题。我建议您更新到最新的 Play 服务,因为这也会更新安全提供商。
\n| 归档时间: |
|
| 查看次数: |
1186 次 |
| 最近记录: |