Skip to content

Commit 13decd3

Browse files
Jami CogswellJami Cogswell
authored andcommitted
update sink
1 parent bada986 commit 13decd3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

java/ql/lib/semmle/code/java/security/regexp/RegexInjection.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ abstract class RegexInjectionSanitizer extends DataFlow::ExprNode { }
1414
/** A method call that takes a regular expression as an argument. */
1515
private class DefaultRegexInjectionSink extends RegexInjectionSink {
1616
DefaultRegexInjectionSink() {
17-
exists(string kind |
18-
kind.matches(["regex-use[]", "regex-use[f1]", "regex-use[f-1]", "regex-use[-1]", "regex-use"]) and
19-
sinkNode(this, kind)
20-
)
17+
// we only select sinks where there is direct regex creation, not regex uses
18+
sinkNode(this, ["regex-use[]", "regex-use[f1]", "regex-use[f-1]", "regex-use[-1]", "regex-use"])
2119
}
2220
}
2321

0 commit comments

Comments
 (0)