File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/stdlib Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3463,6 +3463,14 @@ module StdlibPrivate {
3463
3463
) and
3464
3464
preservesValue = false
3465
3465
)
3466
+ or
3467
+ // flow from input string to attribute on match object
3468
+ exists ( int arg | arg = methodName .( RegexExecutionMethod ) .getStringArgIndex ( ) - offset |
3469
+ input in [ "Argument[" + arg + "]" , "Argument[string:]" ] and
3470
+ methodName = "finditer" and
3471
+ output = "ReturnValue.ListElement.Attribute[string]" and
3472
+ preservesValue = true
3473
+ )
3466
3474
)
3467
3475
}
3468
3476
}
Original file line number Diff line number Diff line change 39
39
compiled_pat .match (ts ).string , # $ tainted
40
40
re .compile (ts ).match ("safe" ).re .pattern , # $ tainted
41
41
42
- list (re .finditer (pat , ts ))[0 ].string , # $ MISSING: tainted
43
- [m .string for m in re .finditer (pat , ts )], # $ MISSING: tainted
42
+ list (re .finditer (pat , ts ))[0 ].string , # $ tainted
43
+ [m .string for m in re .finditer (pat , ts )], # $ tainted
44
44
45
45
list (re .finditer (pat , ts ))[0 ].groups ()[0 ], # $ MISSING: tainted
46
46
[m .groups ()[0 ] for m in re .finditer (pat , ts )], # $ MISSING: tainted
You can’t perform that action at this time.
0 commit comments