mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
22 lines
837 B
Plaintext
22 lines
837 B
Plaintext
import java
|
|
import semmle.code.xml.AndroidManifest
|
|
import TestUtilities.InlineExpectationsTest
|
|
|
|
class DebuggableAttributeEnabledTest extends InlineExpectationsTest {
|
|
DebuggableAttributeEnabledTest() { this = "DebuggableAttributeEnabledTest" }
|
|
|
|
override string getARelevantTag() { result = "hasDebuggableAttributeEnabled" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasDebuggableAttributeEnabled" and
|
|
exists(AndroidApplicationXmlElement androidAppElem |
|
|
androidAppElem.isDebuggable() and
|
|
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
|
|
|
|
|
androidAppElem.getAttribute("debuggable").getLocation() = location and
|
|
element = androidAppElem.getAttribute("debuggable").toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|