mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
23 lines
693 B
Plaintext
23 lines
693 B
Plaintext
import java
|
|
import semmle.code.java.security.UnsafeCertTrustQuery
|
|
import utils.test.InlineExpectationsTest
|
|
|
|
module UnsafeCertTrustTest implements TestSig {
|
|
string getARelevantTag() { result = "hasUnsafeCertTrust" }
|
|
|
|
predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasUnsafeCertTrust" and
|
|
exists(Expr unsafeTrust |
|
|
unsafeTrust instanceof RabbitMQEnableHostnameVerificationNotSet
|
|
or
|
|
SslEndpointIdentificationFlow::flowTo(DataFlow::exprNode(unsafeTrust))
|
|
|
|
|
unsafeTrust.getLocation() = location and
|
|
element = unsafeTrust.toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<UnsafeCertTrustTest>
|