mirror of
https://github.com/github/codeql.git
synced 2026-02-23 18:33:42 +01:00
Remove redundant variable
This commit is contained in:
@@ -77,17 +77,12 @@ private class SpringUriInputParameterSource extends DataFlow::Node {
|
||||
*/
|
||||
private class CompileRegexSink extends DataFlow::ExprNode {
|
||||
CompileRegexSink() {
|
||||
exists(MethodCall ma, Method m | m = ma.getMethod() |
|
||||
(
|
||||
ma.getArgument(0) = this.asExpr() and
|
||||
(
|
||||
ma instanceof StringMatchesCall // input.matches(regexPattern)
|
||||
or
|
||||
ma instanceof PatternCompileCall // p = Pattern.compile(regexPattern)
|
||||
or
|
||||
ma instanceof PatternMatchesCall // p = Pattern.matches(regexPattern, input)
|
||||
)
|
||||
)
|
||||
exists(MethodCall ma | ma.getArgument(0) = this.asExpr() |
|
||||
ma instanceof StringMatchesCall // input.matches(regexPattern)
|
||||
or
|
||||
ma instanceof PatternCompileCall // p = Pattern.compile(regexPattern)
|
||||
or
|
||||
ma instanceof PatternMatchesCall // p = Pattern.matches(regexPattern, input)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user