mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
adding starter files
This commit is contained in:
@@ -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 = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
3
java/ql/test/query-tests/security/CWE-926/Test.java
Normal file
3
java/ql/test/query-tests/security/CWE-926/Test.java
Normal file
@@ -0,0 +1,3 @@
|
||||
public class Test {
|
||||
|
||||
}
|
||||
1
java/ql/test/query-tests/security/CWE-926/options
Normal file
1
java/ql/test/query-tests/security/CWE-926/options
Normal file
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/google-android-9.0.0
|
||||
Reference in New Issue
Block a user