Skip to content

Commit 5a70b1d

Browse files
committed
Fix SonarCloud S5322: add android:permission to exported receiver
Restricts USB permission broadcasts to system-level components with MANAGE_USB permission, preventing unauthorized apps from sending malicious intents to the receiver.
1 parent 3c201a9 commit 5a70b1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
<!-- Explicit receiver to handle USB permission PendingIntent on Android 14+ -->
4646
<receiver
4747
android:name="com.betaflight.plugin.serial.UsbPermissionReceiver"
48-
android:exported="true">
48+
android:exported="true"
49+
android:permission="android.permission.MANAGE_USB">
4950
<intent-filter>
5051
<action android:name="com.betaflight.USB_PERMISSION" />
5152
</intent-filter>

0 commit comments

Comments
 (0)