File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
java/ql/src/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change
1
+ /** Provides classes to reason about XPath vulnerabilities. */
2
+
3
+ import java
1
4
import semmle.code.java.dataflow.FlowSources
2
5
import semmle.code.java.dataflow.TaintTracking
3
6
4
7
/**
5
8
* An abstract type representing a call to interpret XPath expressions.
6
9
*/
7
10
class XPathSink extends MethodAccess {
11
+ /**
12
+ * Gets the argument representing the XPath expressions to be evaluated.
13
+ */
8
14
abstract Expr getSink ( ) ;
9
15
}
10
16
@@ -44,10 +50,12 @@ class NodeSelectNodes extends XPathSink {
44
50
override Expr getSink ( ) { result = this .getArgument ( 0 ) }
45
51
}
46
52
53
+ /** A sink that represents a method that interprets XPath expressions. */
47
54
class XPathInjectionSink extends DataFlow:: ExprNode {
48
55
XPathInjectionSink ( ) { exists ( XPathSink sink | this .getExpr ( ) = sink .getSink ( ) ) }
49
56
}
50
57
58
+ /** A configuration that tracks data from a remote input source to a XPath evaluation sink. */
51
59
class XPathInjectionConfiguration extends TaintTracking:: Configuration {
52
60
XPathInjectionConfiguration ( ) { this = "XPathInjection" }
53
61
You can’t perform that action at this time.
0 commit comments