Skip to content

Commit eacce03

Browse files
Jami CogswellJami Cogswell
authored andcommitted
resolved merge conflict in AndroidManifest lib
1 parent 0934c1d commit eacce03

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

java/ql/lib/semmle/code/java/security/ImplicitlyExportedAndroidComponent.qll

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff 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
}

java/ql/lib/semmle/code/xml/AndroidManifest.qll

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff 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
/**

java/ql/src/Security/CWE/CWE-926/ImplicitlyExportedAndroidComponent.ql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@
1313
import java
1414
import semmle.code.java.security.ImplicitlyExportedAndroidComponent
1515

16-
// from ImplicitlyExportedAndroidComponent impExpAndroidComp
17-
// where impExpAndroidComp.isImplicitlyExported()
18-
// select impExpAndroidComp, "This component is implicitly exported."
1916
from ImplicitlyExportedAndroidComponent impExpAndroidComp
20-
//where exists(impExpAndroidComp)
2117
select impExpAndroidComp, "This component is implicitly exported."

0 commit comments

Comments
 (0)