File tree Expand file tree Collapse file tree 2 files changed +34
-23
lines changed
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree 2 files changed +34
-23
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ private import semmle.python.dataflow.new.DataFlow
8
8
private import semmle.python.dataflow.new.TaintTracking
9
9
private import semmle.python.dataflow.new.RemoteFlowSources
10
10
private import experimental.semmle.python.Concepts
11
- private import semmle.python.Concepts
12
11
private import semmle.python.ApiGraphs
13
12
14
13
/**
@@ -99,25 +98,3 @@ private module Re {
99
98
override DataFlow:: Node getRegexNode ( ) { result = regexNode }
100
99
}
101
100
}
102
-
103
- // ---------------------------------------------------------------------------
104
- // xmltodict
105
- // ---------------------------------------------------------------------------
106
- /** Gets a reference to the `xmltodict` module. */
107
- API:: Node xmltodict ( ) { result = API:: moduleImport ( "xmltodict" ) }
108
-
109
- /**
110
- * A call to `xmltodict.parse`
111
- * See https://github.com/martinblech/xmltodict/blob/ae19c452ca000bf243bfc16274c060bf3bf7cf51/xmltodict.py#L198
112
- */
113
- private class XmlToDictParseCall extends Decoding:: Range , DataFlow:: CallCfgNode {
114
- XmlToDictParseCall ( ) { this = xmltodict ( ) .getMember ( "parse" ) .getACall ( ) }
115
-
116
- override predicate mayExecuteInput ( ) { none ( ) }
117
-
118
- override DataFlow:: Node getAnInput ( ) { result = this .getArg ( 0 ) }
119
-
120
- override DataFlow:: Node getOutput ( ) { result = this }
121
-
122
- override string getFormat ( ) { result = "XML" }
123
- }
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides classes modeling security-relevant aspects of the `xmltodict` PyPI package.
3
+ * See https://pypi.org/project/xmltodict/
4
+ */
5
+
6
+ private import python
7
+ private import semmle.python.dataflow.new.DataFlow
8
+ private import semmle.python.Concepts
9
+ private import semmle.python.ApiGraphs
10
+
11
+ /**
12
+ * Provides models for the `xmltodict` PyPI package.
13
+ * See https://pypi.org/project/xmltodict/
14
+ */
15
+ private module XmlToDictModel {
16
+ /** Gets a reference to the `xmltodict` module. */
17
+ API:: Node xmltodict ( ) { result = API:: moduleImport ( "xmltodict" ) }
18
+
19
+ /**
20
+ * A call to `xmltodict.parse`
21
+ * See https://github.com/martinblech/xmltodict/blob/ae19c452ca000bf243bfc16274c060bf3bf7cf51/xmltodict.py#L198
22
+ */
23
+ private class XmlToDictParseCall extends Decoding:: Range , DataFlow:: CallCfgNode {
24
+ XmlToDictParseCall ( ) { this = xmltodict ( ) .getMember ( "parse" ) .getACall ( ) }
25
+
26
+ override predicate mayExecuteInput ( ) { none ( ) }
27
+
28
+ override DataFlow:: Node getAnInput ( ) { result = this .getArg ( 0 ) }
29
+
30
+ override DataFlow:: Node getOutput ( ) { result = this }
31
+
32
+ override string getFormat ( ) { result = "XML" }
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments