Files
codeql/java/ql/test/query-tests/security/CWE-926/TestApplicationPermission/AndroidManifest.xml
2022-08-22 12:41:22 -04:00

109 lines
3.8 KiB
XML

<?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="com.example.happybirthday">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.HappyBirthday"
tools:targetApi="31"
android:permission=".Test">
<!-- Safe: 'application' element has 'permission' attribute --> <activity
android:name=".Activity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<!-- Safe: 'application' element has 'permission' attribute --> <receiver
android:name=".CheckInstall">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_INSTALL"/>
</intent-filter>
</receiver>
<!-- Safe: 'application' element has 'permission' attribute --> <service
android:name=".backgroundService">
<intent-filter>
<action android:name="android.intent.action.START_BACKGROUND"/>
</intent-filter>
</service>
<!-- Safe: 'application' element has 'permission' attribute --> <provider
android:name=".MyCloudProvider">
<intent-filter>
<action android:name="android.intent.action.DOCUMENTS_PROVIDER"/>
</intent-filter>
</provider>
<!-- Safe: 'android:exported' explicitly set --> <activity
android:name=".Activity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<!-- Safe: no intent filter --> <activity
android:name=".Activity">
</activity>
<!-- Safe: has 'permission' attribute --> <activity
android:name=".Activity"
android:permission=".Test">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<!-- Safe: 'provider' with read and write permissions set --> <provider
android:name=".MyCloudProvider"
android:readPermission=".TestRead"
android:writePermission=".TestWrite">
<intent-filter>
<action android:name="android.intent.action.DOCUMENTS_PROVIDER"/>
</intent-filter>
</provider>
<!-- Safe: 'application' element has 'permission' attribute --> <provider
android:name=".MyCloudProvider"
android:readPermission=".TestRead">
<intent-filter>
<action android:name="android.intent.action.DOCUMENTS_PROVIDER"/>
</intent-filter>
</provider>
<!-- Safe: 'application' element has 'permission' attribute --> <provider
android:name=".MyCloudProvider"
android:writePermission=".TestWrite">
<intent-filter>
<action android:name="android.intent.action.DOCUMENTS_PROVIDER"/>
</intent-filter>
</provider>
<!-- Safe: has category 'android.intent.category.LAUNCHER' --> <activity
android:name=".Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>