Files
codeql/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test2/InsecureKeys.ql
Joe Farebrother 2eb93b7a3b Add unit tests
2024-02-12 13:49:45 +00:00

20 lines
581 B
Plaintext

import java
import TestUtilities.InlineExpectationsTest
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.security.AndroidLocalAuthQuery
module InsecureKeysTest implements TestSig {
string getARelevantTag() { result = "insecure-key" }
predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "insecure-key" and
exists(InsecureBiometricKeyParamCall call | usesLocalAuth() |
call.getLocation() = location and
element = call.toString() and
value = ""
)
}
}
import MakeTest<InsecureKeysTest>