Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf4b04a commit 8c753d7Copy full SHA for 8c753d7
1 file changed
csharp/ql/src/Security Features/CWE-730/ReDoS.ql
@@ -16,8 +16,14 @@ import semmle.code.csharp.frameworks.system.text.RegularExpressions
16
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
17
18
from TaintTrackingConfiguration c, DataFlow::PathNode source, DataFlow::PathNode sink
19
-where c.hasFlowPath(source, sink)
+where
20
+ c.hasFlowPath(source, sink) and
21
// No global timeout set
- and not exists(RegexGlobalTimeout r)
22
-select sink.getNode().(Sink), source, sink,
+ not exists(RegexGlobalTimeout r) and
23
+ (
24
+ sink.getNode() instanceof Sink
25
+ or
26
+ sink.getNode() instanceof ExponentialRegexSink
27
+ )
28
+select sink.getNode(), source, sink,
29
"$@ flows to regular expression operation with dangerous regex.", source.getNode(), "User-provided value"
0 commit comments