resolved merge conflict in AndroidManifest lib

This commit is contained in:
Jami Cogswell
2022-08-22 11:20:22 -04:00
parent 0934c1d184
commit eacce03073
3 changed files with 3 additions and 29 deletions

View File

@@ -11,19 +11,8 @@ class ImplicitlyExportedAndroidComponent extends AndroidComponentXmlElement {
"android.intent.category.LAUNCHER" and
not this.requiresPermissions() and
not this.getParent().(AndroidApplicationXmlElement).requiresPermissions() and
//not this.getAnIntentFilterElement().hasLauncherCategoryElement() and
not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
//this.getFile() instanceof SourceAndroidManifestXmlFile
not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory() //and
//not this.getAnIntentFilterElement().getAnActionElement().getActionName() =
// "android.intent.action.MAIN"
}
// predicate isImplicitlyExported() {
// not this.hasExportedAttribute() and
// this.hasAnIntentFilterElement() and
// not this.requiresPermissions() and
// not this.getParent().(AndroidApplicationXmlElement).hasAttribute("permission") and
// not this.getAnIntentFilterElement().hasLauncherCategoryElement() and
// not this.getFile().(AndroidManifestXmlFile).isInBuildDirectory() //and
// not this.getAnIntentFilterElement().getAnActionElement().getActionName().matches("%MEDIA%") and // try MEDIA exclusion -- MRVA returns 251 results, so only removed 13
// not this.getAnIntentFilterElement().getAnActionElement().getActionName() =
// "android.intent.action.MAIN" // try MAIN exclusion -- MRVA returns 193 results, so removed 251-193 = 58 results
// }
}

View File

@@ -25,9 +25,6 @@ class AndroidManifestXmlFile extends XmlFile {
predicate isInBuildDirectory() { this.getFile().getRelativePath().matches("%build%") }
}
// class SourceAndroidManifestXmlFile extends AndroidManifestXmlFile {
// SourceAndroidManifestXmlFile() { not this.getFile().getRelativePath().matches("%build%") }
// }
/**
* A `<manifest>` element in an Android manifest file.
*/
@@ -238,7 +235,6 @@ class AndroidComponentXmlElement extends XmlElement {
/**
* Holds if this component element has an `android:exported` attribute.
*/
//predicate hasExportedAttribute() { this.hasAttribute("exported") }
predicate hasExportedAttribute() { exists(this.getExportedAttributeValue()) }
/**
@@ -264,13 +260,6 @@ class AndroidIntentFilterXmlElement extends XmlElement {
* Gets a `<category>` child element of this `<intent-filter>` element.
*/
AndroidCategoryXmlElement getACategoryElement() { result = this.getAChild() }
// /**
// * Holds if this `<intent-filter>` element has a `<category>` child element
// * named `android.intent.category.LAUNCHER`.
// */
// predicate hasLauncherCategoryElement() {
// this.getACategoryElement().getCategoryName() = "android.intent.category.LAUNCHER"
// }
}
/**

View File

@@ -13,9 +13,5 @@
import java
import semmle.code.java.security.ImplicitlyExportedAndroidComponent
// from ImplicitlyExportedAndroidComponent impExpAndroidComp
// where impExpAndroidComp.isImplicitlyExported()
// select impExpAndroidComp, "This component is implicitly exported."
from ImplicitlyExportedAndroidComponent impExpAndroidComp
//where exists(impExpAndroidComp)
select impExpAndroidComp, "This component is implicitly exported."