|
1 | 1 | /** Provides classes to reason about Groovy code injection attacks. */ |
2 | 2 |
|
3 | | -import semmle.code.java.dataflow.DataFlow |
4 | | -import semmle.code.java.dataflow.ExternalFlow |
5 | | -import semmle.code.java.frameworks.Networking |
| 3 | +private import semmle.code.java.dataflow.DataFlow |
| 4 | +private import semmle.code.java.dataflow.ExternalFlow |
| 5 | +private import semmle.code.java.frameworks.Networking |
6 | 6 |
|
7 | 7 | /** A data flow sink for Groovy expression injection vulnerabilities. */ |
8 | 8 | abstract class GroovyInjectionSink extends DataFlow::ExprNode { } |
@@ -98,7 +98,7 @@ private predicate groovyCompilationUnitTaintStep(DataFlow::Node fromNode, DataFl |
98 | 98 | m.getDeclaringType() instanceof TypeGroovyCompilationUnit |
99 | 99 | | |
100 | 100 | fromNode.asExpr() = ma.getArgument(ma.getNumArgument() - 1) and |
101 | | - toNode.asExpr() = ma.getQualifier() |
| 101 | + toNode.(PostUpdateNode).getPreUpdateNode().asExpr() = ma.getQualifier() |
102 | 102 | ) |
103 | 103 | } |
104 | 104 |
|
@@ -136,7 +136,7 @@ private predicate groovySourceUnitTaintStep(DataFlow::Node fromNode, DataFlow::N |
136 | 136 |
|
137 | 137 | /** |
138 | 138 | * Holds if `fromNode` to `toNode` is a dataflow step from a tainted object to |
139 | | - * a `ReaderSource` instance by calling `new *ReaderSource(tainted, ...)` |
| 139 | + * a `ReaderSource` instance by calling `new ReaderSource(tainted, ...)`. |
140 | 140 | */ |
141 | 141 | private predicate groovyReaderSourceTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { |
142 | 142 | exists(ClassInstanceExpr cie | cie.getConstructedType() instanceof TypeReaderSource | |
|
0 commit comments