Merge pull request #5103 from tausbn/python-port-flask-to-api-graphs · thboop/codeql@bf401c7 · GitHub
Skip to content

Commit bf401c7

Browse files
authored
Merge pull request github#5103 from tausbn/python-port-flask-to-api-graphs
Python: Port Flask models to use API graphs
2 parents 6eafa9d + 2ca12aa commit bf401c7

5 files changed

Lines changed: 157 additions & 358 deletions

File tree

‎python/ql/src/semmle/python/ApiGraphs.qll‎

Lines changed: 19 additions & 7 deletions

‎python/ql/src/semmle/python/dataflow/new/internal/Attributes.qll‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ private class SetAttrCallAsAttrWrite extends AttrWrite, CfgNode {
159159
* Instances of this class correspond to the `NameNode` for `attr`, and also gives access to `value` by
160160
* virtue of being a `DefinitionNode`.
161161
*/
162-
private class ClassAttributeAssignmentNode extends DefinitionNode, NameNode { }
162+
private class ClassAttributeAssignmentNode extends DefinitionNode, NameNode {
163+
ClassAttributeAssignmentNode() { this.getScope() = any(ClassExpr c).getInnerScope() }
164+
}
163165

164166
/**
165167
* An attribute assignment via a class field, e.g.

‎python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll‎

Lines changed: 20 additions & 3 deletions

0 commit comments

Comments
 (0)