Skip to content

Commit 853857b

Browse files
yoffRasmusWL
andauthored
Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
1 parent aa010e4 commit 853857b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/ql/lib/semmle/python/frameworks/Lxml.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ private module Lxml {
2323
* A class constructor compiling an XPath expression.
2424
*
2525
* from lxml import etree
26-
* root = etree.XML("<xmlContent>")
2726
* find_text = etree.XPath("`sink`")
2827
* find_text = etree.ETXPath("`sink`")
2928
*
@@ -38,7 +37,7 @@ private module Lxml {
3837

3938
override DataFlow::Node getXPath() { result in [this.getArg(0), this.getArgByName("path")] }
4039

41-
override string getName() { result = "Lxml.etree" }
40+
override string getName() { result = "lxml.etree" }
4241
}
4342

4443
/**
@@ -72,6 +71,6 @@ private module Lxml {
7271
// TODO: implement when we get call nodes
7372
override DataFlow::Node getTree() { none() }
7473

75-
override string getName() { result = "Lxml.etree" }
74+
override string getName() { result = "lxml.etree" }
7675
}
7776
}

python/ql/src/Security/CWE-643/XpathInjection.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* malicious Xpath code by the user.
55
* @kind path-problem
66
* @problem.severity error
7+
* @security-severity 9.8
78
* @precision high
89
* @id py/xpath-injection
910
* @tags security

0 commit comments

Comments
 (0)