@@ -19,7 +19,7 @@ abstract class SensitiveExpr extends Expr {
19
19
abstract string describe ( ) ;
20
20
21
21
/** Gets a classification of the kind of sensitive data this expression might contain. */
22
- abstract SensitiveExpr :: Classification getClassification ( ) ;
22
+ abstract SensitiveDataClassification getClassification ( ) ;
23
23
}
24
24
25
25
/** DEPRECATED: Use `SensitiveDataClassification` and helpers instead. */
@@ -42,7 +42,7 @@ deprecated module SensitiveExpr {
42
42
43
43
/** A function call that might produce sensitive data. */
44
44
class SensitiveCall extends SensitiveExpr , InvokeExpr {
45
- SensitiveExpr :: Classification classification ;
45
+ SensitiveDataClassification classification ;
46
46
47
47
SensitiveCall ( ) {
48
48
classification = this .getCalleeName ( ) .( SensitiveDataFunctionName ) .getClassification ( )
@@ -57,7 +57,7 @@ class SensitiveCall extends SensitiveExpr, InvokeExpr {
57
57
58
58
override string describe ( ) { result = "a call to " + getCalleeName ( ) }
59
59
60
- override SensitiveExpr :: Classification getClassification ( ) { result = classification }
60
+ override SensitiveDataClassification getClassification ( ) { result = classification }
61
61
}
62
62
63
63
/** An access to a variable or property that might contain sensitive data. */
@@ -81,7 +81,7 @@ abstract class SensitiveWrite extends DataFlow::Node { }
81
81
82
82
/** A write to a variable or property that might contain sensitive data. */
83
83
private class BasicSensitiveWrite extends SensitiveWrite {
84
- SensitiveExpr :: Classification classification ;
84
+ SensitiveDataClassification classification ;
85
85
86
86
BasicSensitiveWrite ( ) {
87
87
exists ( string name |
@@ -102,18 +102,18 @@ private class BasicSensitiveWrite extends SensitiveWrite {
102
102
}
103
103
104
104
/** Gets a classification of the kind of sensitive data the write might handle. */
105
- SensitiveExpr :: Classification getClassification ( ) { result = classification }
105
+ SensitiveDataClassification getClassification ( ) { result = classification }
106
106
}
107
107
108
108
/** An access to a variable or property that might contain sensitive data. */
109
109
private class BasicSensitiveVariableAccess extends SensitiveVariableAccess {
110
- SensitiveExpr :: Classification classification ;
110
+ SensitiveDataClassification classification ;
111
111
112
112
BasicSensitiveVariableAccess ( ) {
113
113
name .regexpMatch ( maybeSensitive ( classification ) ) and not name .regexpMatch ( notSensitive ( ) )
114
114
}
115
115
116
- override SensitiveExpr :: Classification getClassification ( ) { result = classification }
116
+ override SensitiveDataClassification getClassification ( ) { result = classification }
117
117
}
118
118
119
119
/** A function name that suggests it may be sensitive. */
@@ -128,16 +128,16 @@ abstract class SensitiveFunctionName extends string {
128
128
/** A function name that suggests it may produce sensitive data. */
129
129
abstract class SensitiveDataFunctionName extends SensitiveFunctionName {
130
130
/** Gets a classification of the kind of sensitive data this function may produce. */
131
- abstract SensitiveExpr :: Classification getClassification ( ) ;
131
+ abstract SensitiveDataClassification getClassification ( ) ;
132
132
}
133
133
134
134
/** A method that might return sensitive data, based on the name. */
135
135
class CredentialsFunctionName extends SensitiveDataFunctionName {
136
- SensitiveExpr :: Classification classification ;
136
+ SensitiveDataClassification classification ;
137
137
138
138
CredentialsFunctionName ( ) { this .regexpMatch ( maybeSensitive ( classification ) ) }
139
139
140
- override SensitiveExpr :: Classification getClassification ( ) { result = classification }
140
+ override SensitiveDataClassification getClassification ( ) { result = classification }
141
141
}
142
142
143
143
/**
@@ -173,7 +173,7 @@ class CleartextPasswordExpr extends SensitiveExpr {
173
173
174
174
override string describe ( ) { none ( ) }
175
175
176
- override SensitiveExpr :: Classification getClassification ( ) { none ( ) }
176
+ override SensitiveDataClassification getClassification ( ) { none ( ) }
177
177
}
178
178
179
179
/**
0 commit comments