File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ private class DefaultJexlEvaluationSink extends JexlEvaluationSink {
1616 DefaultJexlEvaluationSink ( ) { sinkNode ( this , "jexl-injection" ) }
1717}
1818
19+ /**
20+ * A sink for Expresssion Language injection vulnerabilities via Jexl,
21+ * that is, method calls that run evaluation of a JEXL expression.
22+ */
23+ abstract class JexlEvaluationSanitizer extends DataFlow:: ExprNode { }
24+
25+ private class ExternalJexlEvaluationSanitizer extends JexlEvaluationSanitizer {
26+ ExternalJexlEvaluationSanitizer ( ) { barrierNode ( this , "jexl-injection" ) }
27+ }
28+
1929/**
2030 * A unit class for adding additional taint steps.
2131 *
@@ -48,6 +58,8 @@ module JexlInjectionConfig implements DataFlow::ConfigSig {
4858
4959 predicate isSink ( DataFlow:: Node sink ) { sink instanceof JexlEvaluationSink }
5060
61+ predicate isBarrier ( DataFlow:: Node node ) { node instanceof JexlEvaluationSanitizer }
62+
5163 predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
5264 any ( JexlInjectionAdditionalTaintStep c ) .step ( node1 , node2 )
5365 }
You can’t perform that action at this time.
0 commit comments