File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,19 +11,8 @@ class ImplicitlyExportedAndroidComponent extends AndroidComponentXmlElement {
1111 "android.intent.category.LAUNCHER" and
1212 not this .requiresPermissions ( ) and
1313 not this .getParent ( ) .( AndroidApplicationXmlElement ) .requiresPermissions ( ) and
14- // not this.getAnIntentFilterElement ().hasLauncherCategoryElement() and
15- not this .getFile ( ) .( AndroidManifestXmlFile ) . isInBuildDirectory ( )
16- //this.getFile() instanceof SourceAndroidManifestXmlFile
14+ not this .getFile ( ) .( AndroidManifestXmlFile ) . isInBuildDirectory ( ) // and
15+ // not this.getAnIntentFilterElement ().getAnActionElement().getActionName() =
16+ // "android.intent.action.MAIN"
1717 }
18- // predicate isImplicitlyExported() {
19- // not this.hasExportedAttribute() and
20- // this.hasAnIntentFilterElement() and
21- // not this.requiresPermissions() and
22- // not this.getParent().(AndroidApplicationXmlElement).hasAttribute("permission") and
23- // not this.getAnIntentFilterElement().hasLauncherCategoryElement() and
24- // not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory() //and
25- // not this.getAnIntentFilterElement().getAnActionElement().getActionName().matches("%MEDIA%") and // try MEDIA exclusion -- MRVA returns 251 results, so only removed 13
26- // not this.getAnIntentFilterElement().getAnActionElement().getActionName() =
27- // "android.intent.action.MAIN" // try MAIN exclusion -- MRVA returns 193 results, so removed 251-193 = 58 results
28- // }
2918}
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ class AndroidManifestXmlFile extends XmlFile {
2525 predicate isInBuildDirectory ( ) { this .getFile ( ) .getRelativePath ( ) .matches ( "%build%" ) }
2626}
2727
28- // class SourceAndroidManifestXmlFile extends AndroidManifestXmlFile {
29- // SourceAndroidManifestXmlFile() { not this.getFile().getRelativePath().matches("%build%") }
30- // }
3128/**
3229 * A `<manifest>` element in an Android manifest file.
3330 */
@@ -238,7 +235,6 @@ class AndroidComponentXmlElement extends XmlElement {
238235 /**
239236 * Holds if this component element has an `android:exported` attribute.
240237 */
241- //predicate hasExportedAttribute() { this.hasAttribute("exported") }
242238 predicate hasExportedAttribute ( ) { exists ( this .getExportedAttributeValue ( ) ) }
243239
244240 /**
@@ -264,13 +260,6 @@ class AndroidIntentFilterXmlElement extends XmlElement {
264260 * Gets a `<category>` child element of this `<intent-filter>` element.
265261 */
266262 AndroidCategoryXmlElement getACategoryElement ( ) { result = this .getAChild ( ) }
267- // /**
268- // * Holds if this `<intent-filter>` element has a `<category>` child element
269- // * named `android.intent.category.LAUNCHER`.
270- // */
271- // predicate hasLauncherCategoryElement() {
272- // this.getACategoryElement().getCategoryName() = "android.intent.category.LAUNCHER"
273- // }
274263}
275264
276265/**
Original file line number Diff line number Diff line change 1313import java
1414import semmle.code.java.security.ImplicitlyExportedAndroidComponent
1515
16- // from ImplicitlyExportedAndroidComponent impExpAndroidComp
17- // where impExpAndroidComp.isImplicitlyExported()
18- // select impExpAndroidComp, "This component is implicitly exported."
1916from ImplicitlyExportedAndroidComponent impExpAndroidComp
20- //where exists(impExpAndroidComp)
2117select impExpAndroidComp , "This component is implicitly exported."
You can’t perform that action at this time.
0 commit comments