File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
python/ql/src/experimental/semmle/python/security/injection Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,16 @@ class CsvInjectionFlowConfig extends TaintTracking::Configuration {
21
21
}
22
22
}
23
23
24
- class StartsWithCheck extends DataFlow:: BarrierGuard {
25
- StartsWithCheck ( ) { this .( CallNode ) .getNode ( ) .getFunc ( ) .( Attribute ) .getName ( ) = "startswith" }
24
+ private class StartsWithCheck extends DataFlow:: BarrierGuard {
25
+ Attribute attr ;
26
+
27
+ StartsWithCheck ( ) {
28
+ this .( CallNode ) .getNode ( ) .getFunc ( ) = attr and
29
+ attr .getName ( ) = "startswith"
30
+ }
26
31
27
32
override predicate checks ( ControlFlowNode node , boolean branch ) {
28
- node = this . ( CallNode ) . getNode ( ) . getFunc ( ) . ( Attribute ) .getObject ( ) .getAFlowNode ( ) and
33
+ node = attr .getObject ( ) .getAFlowNode ( ) and
29
34
branch = true
30
35
}
31
36
}
You can’t perform that action at this time.
0 commit comments