@@ -129,7 +129,7 @@ private module Lxml {
129129 *
130130 * See https://lxml.de/apidoc/lxml.etree.html?highlight=xmlparser#lxml.etree.XMLParser
131131 */
132- private class LxmlParser extends InstanceSource , DataFlow :: CallCfgNode {
132+ private class LxmlParser extends InstanceSource , API :: CallNode {
133133 LxmlParser ( ) {
134134 this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "XMLParser" ) .getACall ( )
135135 }
@@ -141,16 +141,17 @@ private module Lxml {
141141 // resolve_entities has default True
142142 not exists ( this .getArgByName ( "resolve_entities" ) )
143143 or
144- this .getArgByName ( "resolve_entities" ) .getALocalSource ( ) .asExpr ( ) = any ( True t )
144+ this .getKeywordParameter ( "resolve_entities" ) .getAValueReachingRhs ( ) .asExpr ( ) = any ( True t )
145145 )
146146 or
147147 ( 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 )
150151 or
151152 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 )
154155 }
155156 }
156157
@@ -305,7 +306,7 @@ private module Lxml {
305306 * See
306307 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.iterparse
307308 */
308- private class LxmlIterparseCall extends DataFlow :: CallCfgNode , XML:: XmlParsing:: Range ,
309+ private class LxmlIterparseCall extends API :: CallNode , XML:: XmlParsing:: Range ,
309310 FileSystemAccess:: Range {
310311 LxmlIterparseCall ( ) {
311312 this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "iterparse" ) .getACall ( )
@@ -318,11 +319,11 @@ private module Lxml {
318319 kind .isXxe ( )
319320 or
320321 ( 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 )
322323 or
323324 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 )
326327 }
327328
328329 override predicate mayExecuteInput ( ) { none ( ) }
0 commit comments