@@ -109,15 +109,15 @@ private module Lxml {
109109 *
110110 * See https://lxml.de/apidoc/lxml.etree.html?highlight=xmlparser#lxml.etree.XMLParser
111111 */
112- module XMLParser {
112+ module XmlParser {
113113 /**
114114 * A source of instances of `lxml.etree` parsers, extend this class to model new instances.
115115 *
116116 * This can include instantiations of the class, return values from function
117117 * calls, or a special parameter that will be set when functions are called by an external
118118 * library.
119119 *
120- * Use the predicate `XMLParser ::instance()` to get references to instances of `lxml.etree` parsers.
120+ * Use the predicate `XmlParser ::instance()` to get references to instances of `lxml.etree` parsers.
121121 */
122122 abstract class InstanceSource extends DataFlow:: LocalSourceNode {
123123 /** Holds if this instance is vulnerable to `kind`. */
@@ -129,8 +129,8 @@ 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 {
133- LXMLParser ( ) {
132+ private class LxmlParser extends InstanceSource , DataFlow:: CallCfgNode {
133+ LxmlParser ( ) {
134134 this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "XMLParser" ) .getACall ( )
135135 }
136136
@@ -159,8 +159,8 @@ private module Lxml {
159159 *
160160 * See https://lxml.de/apidoc/lxml.etree.html?highlight=xmlparser#lxml.etree.get_default_parser
161161 */
162- private class LXMLDefaultParser extends InstanceSource , DataFlow:: CallCfgNode {
163- LXMLDefaultParser ( ) {
162+ private class LxmlDefaultParser extends InstanceSource , DataFlow:: CallCfgNode {
163+ LxmlDefaultParser ( ) {
164164 this =
165165 API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "get_default_parser" ) .getACall ( )
166166 }
@@ -196,8 +196,8 @@ private module Lxml {
196196 /**
197197 * A call to the `feed` method of an `lxml` parser.
198198 */
199- private class LXMLParserFeedCall extends DataFlow:: MethodCallNode , XML:: XmlParsing:: Range {
200- LXMLParserFeedCall ( ) { this .calls ( instance ( _) , "feed" ) }
199+ private class LxmlParserFeedCall extends DataFlow:: MethodCallNode , XML:: XmlParsing:: Range {
200+ LxmlParserFeedCall ( ) { this .calls ( instance ( _) , "feed" ) }
201201
202202 override DataFlow:: Node getAnInput ( ) { result in [ this .getArg ( 0 ) , this .getArgByName ( "data" ) ] }
203203
@@ -233,8 +233,8 @@ private module Lxml {
233233 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.parse
234234 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.parseid
235235 */
236- private class LXMLParsing extends DataFlow:: CallCfgNode , XML:: XmlParsing:: Range {
237- LXMLParsing ( ) {
236+ private class LxmlParsing extends DataFlow:: CallCfgNode , XML:: XmlParsing:: Range {
237+ LxmlParsing ( ) {
238238 this =
239239 API:: moduleImport ( "lxml" )
240240 .getMember ( "etree" )
@@ -257,7 +257,7 @@ private module Lxml {
257257 DataFlow:: Node getParserArg ( ) { result in [ this .getArg ( 1 ) , this .getArgByName ( "parser" ) ] }
258258
259259 override predicate vulnerableTo ( XML:: XmlParsingVulnerabilityKind kind ) {
260- this .getParserArg ( ) = XMLParser :: instanceVulnerableTo ( kind )
260+ this .getParserArg ( ) = XmlParser :: instanceVulnerableTo ( kind )
261261 or
262262 kind .isXxe ( ) and
263263 not exists ( this .getParserArg ( ) )
@@ -284,8 +284,8 @@ private module Lxml {
284284 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.parse
285285 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.parseid
286286 */
287- private class FileAccessFromLXMLParsing extends LXMLParsing , FileSystemAccess:: Range {
288- FileAccessFromLXMLParsing ( ) {
287+ private class FileAccessFromLxmlParsing extends LxmlParsing , FileSystemAccess:: Range {
288+ FileAccessFromLxmlParsing ( ) {
289289 this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( [ "parse" , "parseid" ] ) .getACall ( )
290290 // I considered whether we should try to reduce FPs from people passing file-like
291291 // objects, which will not be a file system access (and couldn't cause a
@@ -305,9 +305,9 @@ private module Lxml {
305305 * See
306306 * - https://lxml.de/apidoc/lxml.etree.html?highlight=parseids#lxml.etree.iterparse
307307 */
308- private class LXMLIterparseCall extends DataFlow:: CallCfgNode , XML:: XmlParsing:: Range ,
308+ private class LxmlIterparseCall extends DataFlow:: CallCfgNode , XML:: XmlParsing:: Range ,
309309 FileSystemAccess:: Range {
310- LXMLIterparseCall ( ) {
310+ LxmlIterparseCall ( ) {
311311 this = API:: moduleImport ( "lxml" ) .getMember ( "etree" ) .getMember ( "iterparse" ) .getACall ( )
312312 }
313313
0 commit comments