Skip to content

Commit b1d9c65

Browse files
author
Salah Baddou
committed
Add JndiInjection Sanitizer Class
1 parent 79cd761 commit b1d9c65

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,22 @@ class JndiInjectionFlowConfig extends TaintTracking::Configuration {
1717
override predicate isSink(DataFlow::Node sink) { sink instanceof JndiInjectionSink }
1818

1919
override predicate isSanitizer(DataFlow::Node node) {
20-
node.getType() instanceof PrimitiveType or node.getType() instanceof BoxedType
20+
node.getType() instanceof PrimitiveType or node.getType() instanceof BoxedType
21+
or
22+
node instanceof JndiInjectionSanitizer
2123
}
2224

2325
override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
2426
any(JndiInjectionAdditionalTaintStep c).step(node1, node2)
2527
}
2628
}
2729

30+
/**
31+
* A Class to be extended for Sanitizer Customizations
32+
*/
33+
34+
abstract class JndiInjectionSanitizer extends DataFlow::Node { }
35+
2836
/**
2937
* A method that does a JNDI lookup when it receives a `SearchControls` argument with `setReturningObjFlag` = `true`
3038
*/

0 commit comments

Comments
 (0)