@@ -129,7 +129,7 @@ private module Lxml {
129
129
*
130
130
* See https://lxml.de/apidoc/lxml.etree.html?highlight=xmlparser#lxml.etree.XMLParser
131
131
*/
132
- private class LxmlParser extends InstanceSource , DataFlow :: CallCfgNode {
132
+ private class LxmlParser extends InstanceSource , API :: CallNode {
133
133
LxmlParser ( ) {
134
134
this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "XMLParser" ) .getACall ( )
135
135
}
@@ -141,16 +141,17 @@ private module Lxml {
141
141
// resolve_entities has default True
142
142
not exists ( this .getArgByName ( "resolve_entities" ) )
143
143
or
144
- this .getArgByName ( "resolve_entities" ) .getALocalSource ( ) .asExpr ( ) = any ( True t )
144
+ this .getKeywordParameter ( "resolve_entities" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t )
145
145
)
146
146
or
147
147
( kind .isBillionLaughs ( ) or kind .isQuadraticBlowup ( ) ) and
148
- this .getArgByName ( "huge_tree" ) .getALocalSource ( ) .asExpr ( ) = any ( True t ) and
149
- not this .getArgByName ( "resolve_entities" ) .getALocalSource ( ) .asExpr ( ) = any ( False t )
148
+ this .getKeywordParameter ( "huge_tree" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t ) and
149
+ not this .getKeywordParameter ( "resolve_entities" ) .getAValueReachingRhs ( ) .asExpr ( ) =
150
+ any ( False t )
150
151
or
151
152
kind .isDtdRetrieval ( ) and
152
- this .getArgByName ( "load_dtd" ) .getALocalSource ( ) .asExpr ( ) = any ( True t ) and
153
- this .getArgByName ( "no_network" ) .getALocalSource ( ) .asExpr ( ) = any ( False t )
153
+ this .getKeywordParameter ( "load_dtd" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t ) and
154
+ this .getKeywordParameter ( "no_network" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( False t )
154
155
}
155
156
}
156
157
@@ -305,7 +306,7 @@ private module Lxml {
305
306
* See
306
307
* - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.iterparse
307
308
*/
308
- private class LxmlIterparseCall extends DataFlow :: CallCfgNode , XML:: XmlParsing:: Range ,
309
+ private class LxmlIterparseCall extends API :: CallNode , XML:: XmlParsing:: Range ,
309
310
FileSystemAccess:: Range {
310
311
LxmlIterparseCall ( ) {
311
312
this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "iterparse" ) .getACall ( )
@@ -318,11 +319,11 @@ private module Lxml {
318
319
kind .isXxe ( )
319
320
or
320
321
( kind .isBillionLaughs ( ) or kind .isQuadraticBlowup ( ) ) and
321
- this .getArgByName ( "huge_tree" ) .getALocalSource ( ) .asExpr ( ) = any ( True t )
322
+ this .getKeywordParameter ( "huge_tree" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t )
322
323
or
323
324
kind .isDtdRetrieval ( ) and
324
- this .getArgByName ( "load_dtd" ) .getALocalSource ( ) .asExpr ( ) = any ( True t ) and
325
- this .getArgByName ( "no_network" ) .getALocalSource ( ) .asExpr ( ) = any ( False t )
325
+ this .getKeywordParameter ( "load_dtd" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t ) and
326
+ this .getKeywordParameter ( "no_network" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( False t )
326
327
}
327
328
328
329
override predicate mayExecuteInput ( ) { none ( ) }
0 commit comments