コンテンツにスキップ

Unused permissions (overprivileged)

未使用の権限(過剰な権限)

概要

アプリケーションは権限を要求しますが、付与されたリソースを使用しません。

推奨事項

アプリケーションのマニフェストから、宣言されている未使用の権限を削除してください。

たとえば、アプリケーションが ACCESS_FINE_LOCATION 権限を宣言しているにもかかわらず使用していない場合、アプリケーションのマニフェストから削除できます。

  • 変更前:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myapp">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <!-- Other application components -->
    </application>

</manifest>
  • 変更後:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myapp">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <!-- Other application components -->
    </application>

</manifest>

リンク

基準

  • OWASP_MASVS_L1:
    • MSTG_PLATFORM_1
  • OWASP_MASVS_L2:
    • MSTG_PLATFORM_1
  • CWE_TOP_25:
    • CWE_276
  • PCI_STANDARDS:
    • REQ_6_2
    • REQ_7_3
  • OWASP_MASVS_v2_1:
    • MASVS_PRIVACY_1
  • CNIL_FOR_EDITORS:
    • EDITORS_5_1_1
  • HIPAA_CONTROLS:
    • SECURITY221
    • SECURITY212
    • SECURITY213