You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MAUI Android应用Fortify告警:缺失Google Play服务更新安全提供者

问题:Fortify持续触发“Android不良实践:缺失Google Play服务更新安全提供者”警报

我已经按照官方文档和StackOverflow相关方案完成配置,但Fortify仍报该安全问题,相关配置如下:

AndroidManifest.xml 片段

<application android:label="XXXXXXXXX" android:networkSecurityConfig="@xml/network_security_config">
    <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
    <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND" android:networkSecurityConfig="@xml/network_security_config">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
            <category android:name="${applicationId}" />
        </intent-filter>
    </receiver>
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.gms.security.ProviderInstaller"
        android:value="true"/>
</application>

MainActivity 代码实现(MAUI Android)

public class MainActivity : MauiAppCompatActivity, ProviderInstaller.IProviderInstallListener
{
protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);
    ProviderInstaller.InstallIfNeeded(Android.App.Application.Context);
    // 其他业务代码
}

public void OnProviderInstallFailed(int errorCode, Intent? recoveryIntent)
{
    // 失败处理逻辑
}

public void OnProviderInstalled()
{
    // 成功回调逻辑
}
}

疑问与诉求

这是MAUI Android应用,没有传统Android项目的build.gradle文件。我想确认这是否是Fortify的误报?如果不是,还需要哪些额外的缓解措施才能让Fortify认可该安全配置?

内容的提问来源于stack exchange,提问作者Ruben Mora

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 11:41:09