Skip to content

Commit 6b66323

Browse files
Simplified JexlInjectionLib.qll and removed LocalUserInput
1 parent 34b6ed0 commit 6b66323

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ class JexlInjectionConfig extends TaintTracking::Configuration {
1212

1313
override predicate isSource(DataFlow::Node source) {
1414
source instanceof TaintedSpringRequestBody or
15-
source instanceof RemoteFlowSource or
16-
source instanceof LocalUserInput
15+
source instanceof RemoteFlowSource
1716
}
1817

1918
override predicate isSink(DataFlow::Node sink) { sink instanceof JexlEvaluationSink }
@@ -30,7 +29,7 @@ class JexlInjectionConfig extends TaintTracking::Configuration {
3029
*/
3130
private class TaintedSpringRequestBody extends DataFlow::Node {
3231
TaintedSpringRequestBody() {
33-
exists(SpringServletInputAnnotation a | this.asParameter().getAnAnnotation() = a)
32+
this.asParameter().getAnAnnotation() instanceof SpringServletInputAnnotation
3433
}
3534
}
3635

@@ -137,7 +136,7 @@ private class SandboxedJexlSource extends DataFlow::ExprNode {
137136
m.getDeclaringType() instanceof JexlBuilder and
138137
m.hasName(["uberspect", "sandbox"]) and
139138
m.getReturnType() instanceof JexlBuilder and
140-
(ma = this.asExpr() or ma.getQualifier() = this.asExpr())
139+
this.asExpr() = [ma, ma.getQualifier()]
141140
)
142141
or
143142
exists(ConstructorCall cc |

0 commit comments

Comments
 (0)