File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
csharp/ql/src/Security Features/CWE-730 Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,14 @@ import semmle.code.csharp.frameworks.system.text.RegularExpressions
1616import semmle.code.csharp.dataflow.DataFlow:: DataFlow:: PathGraph
1717
1818from TaintTrackingConfiguration c , DataFlow:: PathNode source , DataFlow:: PathNode sink
19- where c .hasFlowPath ( source , sink )
19+ where
20+ c .hasFlowPath ( source , sink ) and
2021 // No global timeout set
21- and not exists ( RegexGlobalTimeout r )
22- select sink .getNode ( ) .( Sink ) , source , sink ,
22+ 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 ,
2329 "$@ flows to regular expression operation with dangerous regex." , source .getNode ( ) , "User-provided value"
You can’t perform that action at this time.
0 commit comments