File tree Expand file tree Collapse file tree 6 files changed +10
-8
lines changed
semmle/python/security/injection Expand file tree Collapse file tree 6 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 12
12
13
13
import python
14
14
import semmle.python.security.Paths
15
+ import semmle.python.security.strings.Untrusted
15
16
/* Sources */
16
17
import semmle.python.web.HttpRequest
17
18
/* Sinks */
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ module XpathInjection {
22
22
abstract class XpathInjectionSink extends TaintSink { }
23
23
24
24
/**
25
- * A Sink representing an argument to the `etree.Xpath ` call.
25
+ * A Sink representing an argument to the `etree.XPath ` call.
26
26
*
27
27
* from lxml import etree
28
28
* root = etree.XML("<xmlContent>")
29
29
* find_text = etree.XPath("`sink`")
30
30
*/
31
31
private class EtreeXpathArgument extends XpathInjectionSink {
32
- override string toString ( ) { result = "lxml.etree.Xpath " }
32
+ override string toString ( ) { result = "lxml.etree.XPath " }
33
33
34
34
EtreeXpathArgument ( ) {
35
35
exists ( CallNode call | call .getFunction ( ) .( AttrNode ) .getObject ( "XPath" ) .pointsTo ( etree ( ) ) |
Original file line number Diff line number Diff line change 1
- experimental/CWE-643 /Xslt.ql
1
+ experimental/CWE-091 /Xslt.ql
Original file line number Diff line number Diff line change 1
- experimental/CWE-643/xpath.ql
1
+ experimental/CWE-643/xpath.ql
Original file line number Diff line number Diff line change 1
1
| xpath.py:8:20:8:29 | lxml.etree.parse.xpath | externally controlled string |
2
- | xpath.py:13:29:13:38 | lxml.etree.Xpath | externally controlled string |
3
- | xpath.py:19:29:19:38 | lxml.etree.Xpath | externally controlled string |
2
+ | xpath.py:13:29:13:38 | lxml.etree.XPath | externally controlled string |
3
+ | xpath.py:19:29:19:38 | lxml.etree.XPath | externally controlled string |
4
4
| xpath.py:25:38:25:46 | lxml.etree.ETXpath | externally controlled string |
5
5
| xpath.py:32:29:32:34 | libxml2.parseFile.xpathEval | externally controlled string |
6
6
| xpathBad.py:13:20:13:43 | lxml.etree.parse.xpath | externally controlled string |
7
7
| xpathFlow.py:14:20:14:29 | lxml.etree.parse.xpath | externally controlled string |
8
- | xpathFlow.py:23:29:23:38 | lxml.etree.Xpath | externally controlled string |
9
- | xpathFlow.py:32:29:32:38 | lxml.etree.Xpath | externally controlled string |
8
+ | xpathFlow.py:23:29:23:38 | lxml.etree.XPath | externally controlled string |
9
+ | xpathFlow.py:32:29:32:38 | lxml.etree.XPath | externally controlled string |
10
10
| xpathFlow.py:41:31:41:40 | lxml.etree.ETXpath | externally controlled string |
11
11
| xpathFlow.py:49:29:49:38 | libxml2.parseFile.xpathEval | externally controlled string |
12
12
| xpathGood.py:13:20:13:37 | lxml.etree.parse.xpath | externally controlled string |
Original file line number Diff line number Diff line change 1
1
import python
2
2
import experimental.semmle.python.security.injection.Xpath
3
+ import semmle.python.security.strings.Untrusted
3
4
4
5
from XpathInjection:: XpathInjectionSink sink , TaintKind kind
5
6
where sink .sinks ( kind )
You can’t perform that action at this time.
0 commit comments