mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
25 lines
795 B
Plaintext
25 lines
795 B
Plaintext
import java
|
|
import semmle.code.java.security.UnsafeCertTrustQuery
|
|
import TestUtilities.InlineExpectationsTest
|
|
|
|
class UnsafeCertTrustTest extends InlineExpectationsTest {
|
|
UnsafeCertTrustTest() { this = "HasUnsafeCertTrustTest" }
|
|
|
|
override string getARelevantTag() { result = "hasUnsafeCertTrust" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasUnsafeCertTrust" and
|
|
exists(Expr unsafeTrust |
|
|
unsafeTrust instanceof RabbitMQEnableHostnameVerificationNotSet
|
|
or
|
|
exists(SslEndpointIdentificationFlowConfig config |
|
|
config.hasFlowTo(DataFlow::exprNode(unsafeTrust))
|
|
)
|
|
|
|
|
unsafeTrust.getLocation() = location and
|
|
element = unsafeTrust.toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|