The following activity is flagged for Major vulnerability “Restrict access to exported components with appropriate permissions”
<activity
android:name="com.MyShareActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
If I added a custom permission, my app will not show up on Android ShareSheet. I tried both “normal” and “dangerous”.
Removing android:exported will cause a warning from Android Studio and it recommends to add this attribute.
Is this a false positive by SonarQube?