@@ -91,23 +91,23 @@ private predicate inputTypeFieldNotCached(Field f) {
91
91
}
92
92
93
93
/** Configuration that finds uses of `setInputType` for non cached fields. */
94
- private class GoodInputTypeConf extends DataFlow:: Configuration {
95
- GoodInputTypeConf ( ) { this = "GoodInputTypeConf" }
96
-
97
- override predicate isSource ( DataFlow:: Node node ) {
94
+ private module GoodInputTypeConfig implements DataFlow:: ConfigSig {
95
+ predicate isSource ( DataFlow:: Node node ) {
98
96
inputTypeFieldNotCached ( node .asExpr ( ) .( FieldAccess ) .getField ( ) )
99
97
}
100
98
101
- override predicate isSink ( DataFlow:: Node node ) { node .asExpr ( ) = setInputTypeForId ( _) }
99
+ predicate isSink ( DataFlow:: Node node ) { node .asExpr ( ) = setInputTypeForId ( _) }
102
100
103
- override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
101
+ predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
104
102
exists ( OrBitwiseExpr bitOr |
105
103
node1 .asExpr ( ) = bitOr .getAChildExpr ( ) and
106
104
node2 .asExpr ( ) = bitOr
107
105
)
108
106
}
109
107
}
110
108
109
+ private module GoodInputTypeFlow = DataFlow:: Make< GoodInputTypeConfig > ;
110
+
111
111
/** Gets a regex indicating that an input field may contain sensitive data. */
112
112
private string getInputSensitiveInfoRegex ( ) {
113
113
result =
@@ -130,8 +130,8 @@ AndroidEditableXmlElement getASensitiveCachedInput() {
130
130
result .getId ( ) .regexpMatch ( getInputSensitiveInfoRegex ( ) ) and
131
131
(
132
132
not inputTypeNotCached ( result .getInputType ( ) ) and
133
- not exists ( GoodInputTypeConf conf , DataFlow:: Node sink |
134
- conf . hasFlowTo ( sink ) and
133
+ not exists ( DataFlow:: Node sink |
134
+ GoodInputTypeFlow :: hasFlowTo ( sink ) and
135
135
sink .asExpr ( ) = setInputTypeForId ( result .getId ( ) )
136
136
)
137
137
)
0 commit comments