File tree Expand file tree Collapse file tree 3 files changed +3
-29
lines changed Expand file tree Collapse file tree 3 files changed +3
-29
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,8 @@ class ImplicitlyExportedAndroidComponent extends AndroidComponentXmlElement {
11
11
"android.intent.category.LAUNCHER" and
12
12
not this .requiresPermissions ( ) and
13
13
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"
17
17
}
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
- // }
29
18
}
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ class AndroidManifestXmlFile extends XmlFile {
25
25
predicate isInBuildDirectory ( ) { this .getFile ( ) .getRelativePath ( ) .matches ( "%build%" ) }
26
26
}
27
27
28
- // class SourceAndroidManifestXmlFile extends AndroidManifestXmlFile {
29
- // SourceAndroidManifestXmlFile() { not this.getFile().getRelativePath().matches("%build%") }
30
- // }
31
28
/**
32
29
* A `<manifest>` element in an Android manifest file.
33
30
*/
@@ -238,7 +235,6 @@ class AndroidComponentXmlElement extends XmlElement {
238
235
/**
239
236
* Holds if this component element has an `android:exported` attribute.
240
237
*/
241
- //predicate hasExportedAttribute() { this.hasAttribute("exported") }
242
238
predicate hasExportedAttribute ( ) { exists ( this .getExportedAttributeValue ( ) ) }
243
239
244
240
/**
@@ -264,13 +260,6 @@ class AndroidIntentFilterXmlElement extends XmlElement {
264
260
* Gets a `<category>` child element of this `<intent-filter>` element.
265
261
*/
266
262
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
- // }
274
263
}
275
264
276
265
/**
Original file line number Diff line number Diff line change 13
13
import java
14
14
import semmle.code.java.security.ImplicitlyExportedAndroidComponent
15
15
16
- // from ImplicitlyExportedAndroidComponent impExpAndroidComp
17
- // where impExpAndroidComp.isImplicitlyExported()
18
- // select impExpAndroidComp, "This component is implicitly exported."
19
16
from ImplicitlyExportedAndroidComponent impExpAndroidComp
20
- //where exists(impExpAndroidComp)
21
17
select impExpAndroidComp , "This component is implicitly exported."
You can’t perform that action at this time.
0 commit comments