Uploaded image for project: 'SonarXML'
  1. SonarXML
  2. SONARXML-113

S5594 should not raise on a activity expecting a android.intent.action.MAIN intent

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: Rules
    • Labels:
      None

      Description

      such kind of activities, with an intent-filter action name equals to android.intent.action.MAIN:

      <activity
          android:name=".MainActivity"
          <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
      </activity>
      

      is added by default to a fresh new android application created with android studio for instance.

      With the current behavior of the rule, we raise an issue, because an intent-filter is defined (which exports the activity) and there is no permissions set on the activity. It's a FP because for the main activity, it's intended to have an exported activity without permissions otherwise the android system is not able to run the application.

      We should not raise an issue for an activity component having an intent filter with an action name equals to android.intent.action.MAIN

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.gumowski Michael Gumowski
              Reporter:
              eric.therond Eric Therond
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: