mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Python: add MultiDict model
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
62db8cc633
commit
f1a72311ed
@@ -9,6 +9,7 @@ private import semmle.python.dataflow.new.TaintTracking
|
||||
private import semmle.python.Concepts
|
||||
private import semmle.python.ApiGraphs
|
||||
private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
|
||||
private import semmle.python.frameworks.data.ModelsAsData
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -28,6 +29,8 @@ module Multidict {
|
||||
/** Gets a reference to a `MultiDictProxy` class. */
|
||||
API::Node classRef() {
|
||||
result = API::moduleImport("multidict").getMember(["MultiDictProxy", "CIMultiDictProxy"])
|
||||
or
|
||||
result = ModelOutput::getATypeNode("multidict.MultiDictProxy~Subclass").getASubclass*()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,6 +21,7 @@ private import semmle.python.frameworks.Fabric
|
||||
private import semmle.python.frameworks.Httpx
|
||||
private import semmle.python.frameworks.Invoke
|
||||
private import semmle.python.frameworks.MarkupSafe
|
||||
private import semmle.python.frameworks.Multidict
|
||||
import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
|
||||
|
||||
class FlaskViewClasses extends FindSubclassesSpec {
|
||||
@@ -310,6 +311,12 @@ class MarkupSafe extends FindSubclassesSpec {
|
||||
override API::Node getAlreadyModeledClass() { result = MarkupSafeModel::Markup::classRef() }
|
||||
}
|
||||
|
||||
class Multidict extends FindSubclassesSpec {
|
||||
Multidict() { this = "multidict.MultiDictProxy~Subclass" }
|
||||
|
||||
override API::Node getAlreadyModeledClass() { result = Multidict::MultiDictProxy::classRef() }
|
||||
}
|
||||
|
||||
bindingset[fullyQualified]
|
||||
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
|
||||
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |
|
||||
|
||||
Reference in New Issue
Block a user