adding starter files

This commit is contained in:
Jami Cogswell
2022-08-01 23:39:55 -04:00
parent 0ac8b7ce65
commit 3e09d86a4f
7 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import java
import semmle.code.xml.AndroidManifest
import TestUtilities.InlineExpectationsTest
// TODO: update for implicit export query
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

@@ -0,0 +1,3 @@
public class Test {
}

View File

@@ -0,0 +1 @@
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/google-android-9.0.0