Skip to content

Commit b779f9f

Browse files
Jami CogswellJami Cogswell
authored andcommitted
added casting
1 parent c010f92 commit b779f9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java/ql/src/Security/CWE/CWE-489/DebuggableAttributeEnabled.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ import semmle.code.xml.AndroidManifest
1616
from AndroidApplicationXmlElement androidAppElem
1717
where
1818
androidAppElem.isDebuggable() and
19-
not androidAppElem.getFile().isInBuildDirectory()
19+
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
2020
select androidAppElem.getAttribute("debuggable"), "The 'android:debuggable' attribute is enabled."

java/ql/test/query-tests/security/CWE-489/DebuggableAttributeEnabledTest.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class DebuggableAttributeEnabledTest extends InlineExpectationsTest {
1111
tag = "hasDebuggableAttributeEnabled" and
1212
exists(AndroidApplicationXmlElement androidAppElem |
1313
androidAppElem.isDebuggable() and
14-
not androidAppElem.getFile().isInBuildDirectory()
14+
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
1515
|
1616
androidAppElem.getAttribute("debuggable").getLocation() = location and
1717
element = androidAppElem.getAttribute("debuggable").toString() and

0 commit comments

Comments
 (0)