added casting

This commit is contained in:
Jami Cogswell
2022-08-03 10:41:46 -04:00
parent c010f92811
commit b779f9f935
2 changed files with 2 additions and 2 deletions

View File

@@ -16,5 +16,5 @@ import semmle.code.xml.AndroidManifest
from AndroidApplicationXmlElement androidAppElem
where
androidAppElem.isDebuggable() and
not androidAppElem.getFile().isInBuildDirectory()
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
select androidAppElem.getAttribute("debuggable"), "The 'android:debuggable' attribute is enabled."

View File

@@ -11,7 +11,7 @@ class DebuggableAttributeEnabledTest extends InlineExpectationsTest {
tag = "hasDebuggableAttributeEnabled" and
exists(AndroidApplicationXmlElement androidAppElem |
androidAppElem.isDebuggable() and
not androidAppElem.getFile().isInBuildDirectory()
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
|
androidAppElem.getAttribute("debuggable").getLocation() = location and
element = androidAppElem.getAttribute("debuggable").toString() and