mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Use MethodCallNode for MarkupSafe string-format
This commit is contained in:
@@ -67,13 +67,8 @@ private module MarkupSafeModel {
|
||||
}
|
||||
|
||||
/** A string format with `markupsafe.Markup` as the format string. */
|
||||
class StringFormat extends Markup::InstanceSource, DataFlow::CallCfgNode {
|
||||
StringFormat() {
|
||||
exists(DataFlow::AttrRead attr | this.getFunction() = attr |
|
||||
attr.getAttributeName() = "format" and
|
||||
attr.getObject() = instance()
|
||||
)
|
||||
}
|
||||
class StringFormat extends Markup::InstanceSource, DataFlow::MethodCallNode {
|
||||
StringFormat() { this.calls(instance(), "format") }
|
||||
}
|
||||
|
||||
/** Taint propagation for `markupsafe.Markup`. */
|
||||
|
||||
Reference in New Issue
Block a user