mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Add SetDefaultConnectionFactoryMethod class
This commit is contained in:
@@ -61,10 +61,8 @@ predicate trustedDomain(string domainName) {
|
||||
*/
|
||||
private predicate trustedSocketFactory(MethodAccess setSocketFactory, boolean default) {
|
||||
exists(MethodAccess getSocketFactory, MethodAccess initSslContext |
|
||||
exists(Method m | setSocketFactory.getMethod().getASourceOverriddenMethod*() = m |
|
||||
default = true and
|
||||
m.getDeclaringType() instanceof HttpsUrlConnection and
|
||||
m.hasName("setDefaultSSLSocketFactory")
|
||||
exists(Method m | setSocketFactory.getMethod() = m |
|
||||
default = true and m instanceof SetDefaultConnectionFactoryMethod
|
||||
or
|
||||
default = false and m instanceof SetConnectionFactoryMethod
|
||||
) and
|
||||
|
||||
@@ -150,6 +150,13 @@ class SetConnectionFactoryMethod extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
class SetDefaultConnectionFactoryMethod extends Method {
|
||||
SetDefaultConnectionFactoryMethod() {
|
||||
this.hasName("setDefaultSSLSocketFactory") and
|
||||
this.getDeclaringType().getAnAncestor() instanceof HttpsUrlConnection
|
||||
}
|
||||
}
|
||||
|
||||
class SetHostnameVerifierMethod extends Method {
|
||||
SetHostnameVerifierMethod() {
|
||||
this.hasName("setHostnameVerifier") and
|
||||
|
||||
Reference in New Issue
Block a user