Skip to content

Commit c6d8fd4

Browse files
Add enhanced manifest analysis: permission, component, and intent filter security
1 parent bb93f61 commit c6d8fd4

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

test-app/app/src/main/AndroidManifest.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
33

4+
<!-- Dangerous permissions for testing -->
45
<uses-permission android:name="android.permission.INTERNET" />
6+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
7+
<uses-permission android:name="android.permission.CAMERA" />
8+
<uses-permission android:name="android.permission.READ_CONTACTS" />
9+
<uses-permission android:name="android.permission.READ_SMS" />
10+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
11+
<uses-permission android:name="android.permission.READ_CALL_LOG" />
512

613
<application
714
android:allowBackup="true"
@@ -17,7 +24,34 @@
1724
<action android:name="android.intent.action.MAIN" />
1825
<category android:name="android.intent.category.LAUNCHER" />
1926
</intent-filter>
27+
<!-- Intent filter with data for testing -->
28+
<intent-filter>
29+
<action android:name="com.example.ACTION_VIEW" />
30+
<category android:name="android.intent.category.DEFAULT" />
31+
<data android:mimeType="text/plain" />
32+
</intent-filter>
2033
</activity>
34+
35+
<!-- Exported Service without permission -->
36+
<service
37+
android:name=".MyService"
38+
android:exported="true" />
39+
40+
<!-- Exported Broadcast Receiver without permission -->
41+
<receiver
42+
android:name=".MyReceiver"
43+
android:exported="true">
44+
<intent-filter>
45+
<action android:name="com.example.ACTION_UPDATE" />
46+
</intent-filter>
47+
</receiver>
48+
49+
<!-- Exported Content Provider without permission -->
50+
<provider
51+
android:name=".MyProvider"
52+
android:authorities="com.example.provider"
53+
android:exported="true" />
54+
2155
</application>
2256

2357
</manifest>

test-app/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
plugins {
33
id("com.android.application") version "8.2.2" apply false
44
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
5-
id("com.davideagostini.analyzer") version "1.0.0" apply false
65
}

test-app/settings.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ pluginManagement {
44
mavenCentral()
55
gradlePluginPortal()
66
}
7+
includeBuild("../") {
8+
name = "android-build-analyzer"
9+
}
710
}
811

912
dependencyResolutionManagement {

0 commit comments

Comments
 (0)