@@ -20,26 +20,6 @@ import semmle.python.dataflow.new.TaintTracking
20
20
import WebAppConstantSecretKeyDjango
21
21
import WebAppConstantSecretKeyFlask
22
22
23
- private predicate stringConstCompare ( DataFlow:: GuardNode g , ControlFlowNode node , boolean branch ) {
24
- exists ( CompareNode cn | cn = g |
25
- exists ( StrConst str_const , Cmpop op |
26
- op = any ( Eq eq ) and branch = false
27
- or
28
- op = any ( NotEq ne ) and branch = true
29
- |
30
- cn .operands ( str_const .getAFlowNode ( ) , op , node )
31
- or
32
- cn .operands ( node , op , str_const .getAFlowNode ( ) )
33
- )
34
- )
35
- }
36
-
37
- class StringConstCompareBarrier extends DataFlow:: Node {
38
- StringConstCompareBarrier ( ) {
39
- this = DataFlow:: BarrierGuard< stringConstCompare / 3 > :: getABarrierNode ( )
40
- }
41
- }
42
-
43
23
newtype TFrameWork =
44
24
Flask ( ) or
45
25
Django ( )
@@ -58,17 +38,6 @@ module WebAppConstantSecretKeyConfig implements DataFlow::StateConfigSig {
58
38
or
59
39
state = Django ( ) and DjangoConstantSecretKeyConfig:: isSink ( sink )
60
40
}
61
-
62
- predicate isBarrier ( DataFlow:: Node sanitizer , FlowState state ) {
63
- ( state = Flask ( ) or state = Django ( ) ) and
64
- sanitizer instanceof StringConstCompareBarrier
65
- }
66
-
67
- predicate isAdditionalFlowStep (
68
- DataFlow:: Node node1 , FlowState state1 , DataFlow:: Node node2 , FlowState state2
69
- ) {
70
- none ( )
71
- }
72
41
}
73
42
74
43
module WebAppConstantSecretKey = TaintTracking:: GlobalWithState< WebAppConstantSecretKeyConfig > ;
0 commit comments