mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Simplify isSslSocket predicate
This commit is contained in:
@@ -69,11 +69,7 @@ private class SslEngineServerMode extends SslUnsafeCertTrustSanitizer {
|
||||
* or the qualifier of `createSocket` is an instance of `SSLSocketFactory`.
|
||||
*/
|
||||
private predicate isSslSocket(MethodAccess createSocket) {
|
||||
exists(Variable ssl, CastExpr ce |
|
||||
ce.getExpr() = createSocket and
|
||||
ce.getControlFlowNode().getASuccessor().(VariableAssign).getDestVar() = ssl and
|
||||
ssl.getType() instanceof SSLSocket
|
||||
)
|
||||
createSocket = any(CastExpr ce | ce.getType() instanceof SSLSocket).getExpr()
|
||||
or
|
||||
createSocket.getQualifier().getType().(RefType).getASupertype*() instanceof SSLSocketFactory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user