@@ -76,26 +76,16 @@ private module SensitiveDataModeling {
7676 }
7777
7878 /**
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`.
9681 */
9782 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+ )
9989 }
10090
10191 /** A function call that is considered a source of sensitive data. */
0 commit comments