@@ -52,7 +52,7 @@ class LoadClassMethod extends Method {
5252 * Holds if `ma` is a call to a class-loading method, and `sink` is the byte array
5353 * representing the class to be loaded.
5454 */
55- predicate loadClass ( MethodAccess ma , Expr sink ) {
55+ predicate loadsClass ( MethodAccess ma , Expr sink ) {
5656 exists ( Method m , int i | m = ma .getMethod ( ) |
5757 m instanceof LoadClassMethod and
5858 m .getParameter ( i ) .getType ( ) instanceof Array and // makeClass(java.lang.String name, byte[] data, ...)
@@ -85,17 +85,21 @@ predicate compile(MethodAccess ma, Expr sink) {
8585class CodeInjectionSink extends DataFlow:: ExprNode {
8686 CodeInjectionSink ( ) {
8787 runCode ( _, this .getExpr ( ) ) or
88- loadClass ( _, this .getExpr ( ) ) or
88+ loadsClass ( _, this .getExpr ( ) ) or
8989 compile ( _, this .getExpr ( ) )
9090 }
9191
9292 MethodAccess getMethodAccess ( ) {
9393 runCode ( result , this .getExpr ( ) ) or
94- loadClass ( result , this .getExpr ( ) ) or
94+ loadsClass ( result , this .getExpr ( ) ) or
9595 compile ( result , this .getExpr ( ) )
9696 }
9797}
9898
99+ /**
100+ * A taint configuration for tracking flow from `RemoteFlowSource` to a Jython method call
101+ * `CodeInjectionSink` that executes injected code.
102+ */
99103class CodeInjectionConfiguration extends TaintTracking:: Configuration {
100104 CodeInjectionConfiguration ( ) { this = "CodeInjectionConfiguration" }
101105
0 commit comments