Python: Add MarkupSafe model

This commit is contained in:
Taus
2023-10-10 14:15:46 +00:00
committed by Rasmus Wriedt Larsen
parent cdb0ac524d
commit 62db8cc633
2 changed files with 13 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ private import semmle.python.frameworks.Aiohttp
private import semmle.python.frameworks.Fabric
private import semmle.python.frameworks.Httpx
private import semmle.python.frameworks.Invoke
private import semmle.python.frameworks.MarkupSafe
import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
class FlaskViewClasses extends FindSubclassesSpec {
@@ -303,6 +304,12 @@ class InvokeContext extends FindSubclassesSpec {
}
}
class MarkupSafe extends FindSubclassesSpec {
MarkupSafe() { this = "markupsafe.Markup~Subclass" }
override API::Node getAlreadyModeledClass() { result = MarkupSafeModel::Markup::classRef() }
}
bindingset[fullyQualified]
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |