@@ -76,26 +76,16 @@ private module SensitiveDataModeling {
76
76
}
77
77
78
78
/**
79
- * Gets a reference to a string constant that, if used as the key in a lookup,
80
- * indicates the presence of sensitive data with `classification`.
81
- */
82
- private DataFlow:: LocalSourceNode sensitiveLookupStringConst (
83
- DataFlow:: TypeTracker t , SensitiveDataClassification classification
84
- ) {
85
- t .start ( ) and
86
- nameIndicatesSensitiveData ( result .asExpr ( ) .( StrConst ) .getText ( ) , classification )
87
- or
88
- exists ( DataFlow:: TypeTracker t2 |
89
- result = sensitiveLookupStringConst ( t2 , classification ) .track ( t2 , t )
90
- )
91
- }
92
-
93
- /**
94
- * Gets a reference to a string constant that, if used as the key in a lookup,
95
- * indicates the presence of sensitive data with `classification`.
79
+ * Gets a reference (in local scope) to a string constant that, if used as the key in
80
+ * a lookup, indicates the presence of sensitive data with `classification`.
96
81
*/
97
82
DataFlow:: Node sensitiveLookupStringConst ( SensitiveDataClassification classification ) {
98
- sensitiveLookupStringConst ( DataFlow:: TypeTracker:: end ( ) , classification ) .flowsTo ( result )
83
+ // Note: If this is implemented with type-tracking, we will get cross-talk as
84
+ // illustrated in python/ql/test/experimental/dataflow/sensitive-data/test.py
85
+ exists ( DataFlow:: LocalSourceNode source |
86
+ nameIndicatesSensitiveData ( source .asExpr ( ) .( StrConst ) .getText ( ) , classification ) and
87
+ source .flowsTo ( result )
88
+ )
99
89
}
100
90
101
91
/** A function call that is considered a source of sensitive data. */
0 commit comments