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 1212
1313import python
1414import semmle.python.security.Paths
15+ import semmle.python.security.strings.Untrusted
1516/* Sources */
1617import semmle.python.web.HttpRequest
1718/* Sinks */
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ module XpathInjection {
2222 abstract class XpathInjectionSink extends TaintSink { }
2323
2424 /**
25- * A Sink representing an argument to the `etree.Xpath ` call.
25+ * A Sink representing an argument to the `etree.XPath ` call.
2626 *
2727 * from lxml import etree
2828 * root = etree.XML("<xmlContent>")
2929 * find_text = etree.XPath("`sink`")
3030 */
3131 private class EtreeXpathArgument extends XpathInjectionSink {
32- override string toString ( ) { result = "lxml.etree.Xpath " }
32+ override string toString ( ) { result = "lxml.etree.XPath " }
3333
3434 EtreeXpathArgument ( ) {
3535 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 11| 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 |
44| xpath.py:25:38:25:46 | lxml.etree.ETXpath | externally controlled string |
55| xpath.py:32:29:32:34 | libxml2.parseFile.xpathEval | externally controlled string |
66| xpathBad.py:13:20:13:43 | lxml.etree.parse.xpath | externally controlled string |
77| 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 |
1010| xpathFlow.py:41:31:41:40 | lxml.etree.ETXpath | externally controlled string |
1111| xpathFlow.py:49:29:49:38 | libxml2.parseFile.xpathEval | externally controlled string |
1212| xpathGood.py:13:20:13:37 | lxml.etree.parse.xpath | externally controlled string |
Original file line number Diff line number Diff line change 11import python
22import experimental.semmle.python.security.injection.Xpath
3+ import semmle.python.security.strings.Untrusted
34
45from XpathInjection:: XpathInjectionSink sink , TaintKind kind
56where sink .sinks ( kind )
You can’t perform that action at this time.
0 commit comments