diff --git a/java/ql/src/Security/CWE/CWE-489/DebuggableAttributeEnabled.ql b/java/ql/src/Security/CWE/CWE-489/DebuggableAttributeEnabled.ql index 9061e15b3b1..d2016921d0c 100644 --- a/java/ql/src/Security/CWE/CWE-489/DebuggableAttributeEnabled.ql +++ b/java/ql/src/Security/CWE/CWE-489/DebuggableAttributeEnabled.ql @@ -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." diff --git a/java/ql/test/query-tests/security/CWE-489/DebuggableAttributeEnabledTest.ql b/java/ql/test/query-tests/security/CWE-489/DebuggableAttributeEnabledTest.ql index 831b7bce346..76433545aa5 100644 --- a/java/ql/test/query-tests/security/CWE-489/DebuggableAttributeEnabledTest.ql +++ b/java/ql/test/query-tests/security/CWE-489/DebuggableAttributeEnabledTest.ql @@ -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