rename expected file, add ql file, delete qlref file

This commit is contained in:
Jami Cogswell
2022-07-30 18:32:35 -04:00
parent 8c4b98c04f
commit d8dbdfcd70
4 changed files with 22 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
import java
import semmle.code.xml.AndroidManifest
import TestUtilities.InlineExpectationsTest
class DebuggableAttributeTrueTest extends InlineExpectationsTest {
DebuggableAttributeTrueTest() { this = "DebuggableAttributeEnabledTest" }
override string getARelevantTag() { result = "hasDebuggableAttributeEnabled" }
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "hasDebuggableAttributeEnabled" and
exists(AndroidXmlAttribute androidXmlAttr |
androidXmlAttr.getName() = "debuggable" and
androidXmlAttr.getValue() = "true" and
not androidXmlAttr.getLocation().getFile().getRelativePath().matches("%/build%")
|
androidXmlAttr.getLocation() = location and
element = androidXmlAttr.toString() and
value = ""
)
}
}

View File

@@ -1 +0,0 @@
| TestTrue.xml:7:5:17:30 | debuggable=true | The 'debuggable' attribute is enabled. |

View File

@@ -1 +0,0 @@
Security/CWE/CWE-489/DebuggableAttributeTrue.ql