@@ -52,7 +52,7 @@ class LoadClassMethod extends Method {
52
52
* Holds if `ma` is a call to a class-loading method, and `sink` is the byte array
53
53
* representing the class to be loaded.
54
54
*/
55
- predicate loadClass ( MethodAccess ma , Expr sink ) {
55
+ predicate loadsClass ( MethodAccess ma , Expr sink ) {
56
56
exists ( Method m , int i | m = ma .getMethod ( ) |
57
57
m instanceof LoadClassMethod and
58
58
m .getParameter ( i ) .getType ( ) instanceof Array and // makeClass(java.lang.String name, byte[] data, ...)
@@ -85,17 +85,21 @@ predicate compile(MethodAccess ma, Expr sink) {
85
85
class CodeInjectionSink extends DataFlow:: ExprNode {
86
86
CodeInjectionSink ( ) {
87
87
runCode ( _, this .getExpr ( ) ) or
88
- loadClass ( _, this .getExpr ( ) ) or
88
+ loadsClass ( _, this .getExpr ( ) ) or
89
89
compile ( _, this .getExpr ( ) )
90
90
}
91
91
92
92
MethodAccess getMethodAccess ( ) {
93
93
runCode ( result , this .getExpr ( ) ) or
94
- loadClass ( result , this .getExpr ( ) ) or
94
+ loadsClass ( result , this .getExpr ( ) ) or
95
95
compile ( result , this .getExpr ( ) )
96
96
}
97
97
}
98
98
99
+ /**
100
+ * A taint configuration for tracking flow from `RemoteFlowSource` to a Jython method call
101
+ * `CodeInjectionSink` that executes injected code.
102
+ */
99
103
class CodeInjectionConfiguration extends TaintTracking:: Configuration {
100
104
CodeInjectionConfiguration ( ) { this = "CodeInjectionConfiguration" }
101
105
0 commit comments