@@ -20,26 +20,6 @@ import semmle.python.dataflow.new.TaintTracking
2020import WebAppConstantSecretKeyDjango
2121import WebAppConstantSecretKeyFlask
2222
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-
4323newtype TFrameWork =
4424 Flask ( ) or
4525 Django ( )
@@ -58,17 +38,6 @@ module WebAppConstantSecretKeyConfig implements DataFlow::StateConfigSig {
5838 or
5939 state = Django ( ) and DjangoConstantSecretKeyConfig:: isSink ( sink )
6040 }
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- }
7241}
7342
7443module WebAppConstantSecretKey = TaintTracking:: GlobalWithState< WebAppConstantSecretKeyConfig > ;
0 commit comments