From 7704a9eeacf333d7feaff533e9890ed3f7242dad Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 23 Aug 2022 10:38:10 +0200 Subject: [PATCH] apply suggestions from Python review Co-authored-by: Rasmus Wriedt Larsen --- python/ql/lib/semmle/python/frameworks/Stdlib.qll | 2 +- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 9 --------- python/ql/src/Security/CWE-327/Ssl.qll | 12 ------------ 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index eba6df5c186..3ba54a41718 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -1845,7 +1845,7 @@ private module StdlibPrivate { deprecated module SimpleHTTPServer = SimpleHttpServer; // --------------------------------------------------------------------------- - // CgiHttpServer (Python 2 only) + // CGIHTTPServer (Python 2 only) // --------------------------------------------------------------------------- /** Gets a reference to the `CGIHTTPServer` module. */ API::Node cgiHttpServer() { result = API::moduleImport("CGIHTTPServer") } diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index f967333aa34..0cb4828084f 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -24,9 +24,6 @@ class PyOpenSslContextCreation extends ContextCreation, DataFlow::CallCfgNode { } } -/** DEPRECATED: Alias for PyOpenSslContextCreation */ -deprecated class PyOpenSSLContextCreation = PyOpenSslContextCreation; - class ConnectionCall extends ConnectionCreation, DataFlow::CallCfgNode { ConnectionCall() { this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Connection").getACall() @@ -58,9 +55,6 @@ class UnspecificPyOpenSslContextCreation extends PyOpenSslContextCreation, Unspe UnspecificPyOpenSslContextCreation() { library instanceof PyOpenSsl } } -/** DEPRECATED: Alias for UnspecificPyOpenSslContextCreation */ -deprecated class UnspecificPyOpenSSLContextCreation = UnspecificPyOpenSslContextCreation; - class PyOpenSsl extends TlsLibrary { PyOpenSsl() { this = "pyOpenSSL" } @@ -89,6 +83,3 @@ class PyOpenSsl extends TlsLibrary { result instanceof UnspecificPyOpenSslContextCreation } } - -/** DEPRECATED: Alias for PyOpenSsl */ -deprecated class PyOpenSSL = PyOpenSsl; diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 03a98c2420a..ec2d70766d5 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -27,9 +27,6 @@ class SslContextCreation extends ContextCreation, DataFlow::CallCfgNode { } } -/** DEPRECATED: Alias for SslContextCreation */ -deprecated class SSLContextCreation = SslContextCreation; - class SslDefaultContextCreation extends ContextCreation { SslDefaultContextCreation() { this = API::moduleImport("ssl").getMember("create_default_context").getACall() @@ -40,9 +37,6 @@ class SslDefaultContextCreation extends ContextCreation { override string getProtocol() { result = "TLS" } } -/** DEPRECATED: Alias for SslDefaultContextCreation */ -deprecated class SSLDefaultContextCreation = SslDefaultContextCreation; - /** Gets a reference to an `ssl.Context` instance. */ API::Node sslContextInstance() { result = API::moduleImport("ssl").getMember(["SSLContext", "create_default_context"]).getReturn() @@ -178,9 +172,6 @@ class UnspecificSslContextCreation extends SslContextCreation, UnspecificContext } } -/** DEPRECATED: Alias for UnspecificSslContextCreation */ -deprecated class UnspecificSSLContextCreation = UnspecificSslContextCreation; - class UnspecificSslDefaultContextCreation extends SslDefaultContextCreation, ProtocolUnrestriction { override DataFlow::Node getContext() { result = this } @@ -190,9 +181,6 @@ class UnspecificSslDefaultContextCreation extends SslDefaultContextCreation, Pro } } -/** DEPRECATED: Alias for UnspecificSslDefaultContextCreation */ -deprecated class UnspecificSSLDefaultContextCreation = UnspecificSslDefaultContextCreation; - class Ssl extends TlsLibrary { Ssl() { this = "ssl" }