diff --git a/python/ql/lib/semmle/python/frameworks/Aiohttp.qll b/python/ql/lib/semmle/python/frameworks/Aiohttp.qll index e7680495929..78d269c31d3 100644 --- a/python/ql/lib/semmle/python/frameworks/Aiohttp.qll +++ b/python/ql/lib/semmle/python/frameworks/Aiohttp.qll @@ -32,6 +32,8 @@ module AiohttpWebModel { /** Gets a reference to the `aiohttp.web.View` class or any subclass. */ API::Node subclassRef() { result = API::moduleImport("aiohttp").getMember("web").getMember("View").getASubclass*() + or + result = ModelOutput::getATypeNode("aiohttp.web.View~Subclass").getASubclass*() } } diff --git a/python/ql/src/meta/ClassHierarchy/Find.ql b/python/ql/src/meta/ClassHierarchy/Find.ql index 4b9ce1fdbb8..0f860452a08 100644 --- a/python/ql/src/meta/ClassHierarchy/Find.ql +++ b/python/ql/src/meta/ClassHierarchy/Find.ql @@ -431,6 +431,12 @@ class AiochClient extends FindSubclassesSpec { override API::Node getAlreadyModeledClass() { result = Aioch::Client::subclassRef() } } +class AiohttpView extends FindSubclassesSpec { + AiohttpView() { this = "aiohttp.web.View~Subclass" } + + override API::Node getAlreadyModeledClass() { result = AiohttpWebModel::View::subclassRef() } +} + bindingset[fullyQualified] predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) { exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |