@@ -11,6 +11,7 @@ struct MyStruct {
11
11
password_file_path : String ,
12
12
password_enabled : String ,
13
13
mfa : String ,
14
+ numfailed : String ,
14
15
}
15
16
16
17
impl MyStruct {
@@ -25,10 +26,11 @@ fn test_passwords(
25
26
password : & str , pass_word : & str , passwd : & str , my_password : & str , password_str : & str ,
26
27
pass_phrase : & str , passphrase : & str , passPhrase : & str , backup_code : & str ,
27
28
auth_key : & str , authkey : & str , authKey : & str , authentication_key : & str , authenticationkey : & str , authenticationKey : & str , oauth : & str ,
28
- harmless : & str , encrypted_password : & str , password_hash : & str ,
29
+ harmless : & str , encrypted_password : & str , password_hash : & str , passwordFile : & str ,
29
30
ms : & MyStruct
30
31
) {
31
32
// passwords
33
+
32
34
sink ( password) ; // $ sensitive=password
33
35
sink ( pass_word) ; // $ MISSING: sensitive=password
34
36
sink ( passwd) ; // $ sensitive=password
@@ -59,13 +61,16 @@ fn test_passwords(
59
61
sink ( qry) ; // $ MISSING: sensitive=password
60
62
61
63
// not passwords
64
+
62
65
sink ( harmless) ;
63
66
sink ( encrypted_password) ;
64
67
sink ( password_hash) ;
68
+ sink ( passwordFile) ; // $ SPURIOUS: sensitive=password
65
69
66
70
sink ( ms. harmless . as_str ( ) ) ;
67
71
sink ( ms. password_file_path . as_str ( ) ) ;
68
72
sink ( ms. password_enabled . as_str ( ) ) ;
73
+ sink ( ms. numfailed . as_str ( ) ) ;
69
74
70
75
sink ( get_string ( ) ) ;
71
76
let harmless2 = get_string ( ) ;
@@ -82,10 +87,11 @@ fn get_next_token() -> String { get_string() }
82
87
fn test_credentials (
83
88
account_key : & str , accnt_key : & str , license_key : & str , secret_key : & str , is_secret : bool , num_accounts : i64 ,
84
89
username : String , user_name : String , userid : i64 , user_id : i64 , my_user_id_64 : i64 , unique_id : i64 , uid : i64 ,
85
- sessionkey : & [ u64 ; 4 ] , session_key : & [ u64 ; 4 ] , hashkey : & [ u64 ; 4 ] , hash_key : & [ u64 ; 4 ] ,
90
+ sessionkey : & [ u64 ; 4 ] , session_key : & [ u64 ; 4 ] , hashkey : & [ u64 ; 4 ] , hash_key : & [ u64 ; 4 ] , sessionkeypath : & [ u64 ; 4 ] , account_key_path : & [ u64 ; 4 ] ,
86
91
ms : & MyStruct
87
92
) {
88
93
// credentials
94
+
89
95
sink ( account_key) ; // $ sensitive=id
90
96
sink ( accnt_key) ; // $ sensitive=id
91
97
sink ( license_key) ; // $ MISSING: sensitive=secret
@@ -108,12 +114,15 @@ fn test_credentials(
108
114
sink ( get_secret_token ( ) ) ; // $ sensitive=secret
109
115
110
116
// not (necessarily) credentials
117
+
111
118
sink ( is_secret) ;
112
119
sink ( num_accounts) ; // $ SPURIOUS: sensitive=id
113
120
sink ( unique_id) ;
114
121
sink ( uid) ; // $ SPURIOUS: sensitive=id
115
122
sink ( hashkey) ;
116
123
sink ( hash_key) ;
124
+ sink ( sessionkeypath) ; // $ SPURIOUS: sensitive=id
125
+ sink ( account_key_path) ; // $ SPURIOUS: sensitive=id
117
126
118
127
sink ( ms. get_certificate_url ( ) ) ; // $ SPURIOUS: sensitive=certificate
119
128
sink ( ms. get_certificate_file ( ) ) ; // $ SPURIOUS: sensitive=certificate
@@ -134,11 +143,17 @@ struct DeviceInfo {
134
143
macaddr12 : [ u8 ; 12 ] ,
135
144
mac_addr : MacAddr ,
136
145
networkMacAddress : String ,
146
+
147
+ // not private device info
148
+ macro_value : bool ,
149
+ mac_command : u32 ,
150
+ skip_address : String ,
137
151
}
138
152
139
153
impl DeviceInfo {
140
154
fn test_device_info ( & self , other : & DeviceInfo ) {
141
155
// private device info
156
+
142
157
sink ( & self . api_key ) ; // $ MISSING: sensitive=id
143
158
sink ( & other. api_key ) ; // $ MISSING: sensitive=id
144
159
sink ( & self . deviceApiToken ) ; // $ MISSING: sensitive=id
@@ -149,6 +164,12 @@ impl DeviceInfo {
149
164
sink ( self . mac_addr . values ) ; // $ MISSING: sensitive=id
150
165
sink ( self . mac_addr . values [ 0 ] ) ; // $ MISSING: sensitive=id
151
166
sink ( & self . networkMacAddress ) ; // $ MISSING: sensitive=id
167
+
168
+ // not private device info
169
+
170
+ sink ( self . macro_value ) ;
171
+ sink ( self . mac_command ) ;
172
+ sink ( & self . skip_address ) ;
152
173
}
153
174
}
154
175
@@ -164,6 +185,12 @@ struct Financials {
164
185
routingNumberText : String ,
165
186
iban : String ,
166
187
iBAN : String ,
188
+
189
+ num_accounts : i32 ,
190
+ total_accounts : i32 ,
191
+ accounting : i32 ,
192
+ unaccounted : bool ,
193
+ multiband : bool ,
167
194
}
168
195
169
196
enum Gender {
@@ -210,12 +237,14 @@ enum ContactDetails {
210
237
HomePhoneNumber ( String ) ,
211
238
MobileNumber ( String ) ,
212
239
Email ( String ) ,
240
+ FavouriteColor ( String ) ,
213
241
}
214
242
215
243
fn test_private_info (
216
244
info : & MyPrivateInfo , details : & ContactDetails ,
217
245
) {
218
246
// private info
247
+
219
248
sink ( info. mobile_phone_num . as_str ( ) ) ; // $ MISSING: sensitive=private
220
249
sink ( info. mobile_phone_num . to_string ( ) ) ; // $ MISSING: sensitive=private
221
250
sink ( info. contact_email . as_str ( ) ) ; // $ MISSING: sensitive=private
@@ -273,5 +302,15 @@ fn test_private_info(
273
302
274
303
// not private info
275
304
305
+ let modulesEx = 1 ;
306
+ sink ( modulesEx) ;
307
+
276
308
sink ( info. financials . harmless . as_str ( ) ) ;
309
+ sink ( info. financials . num_accounts ) ;
310
+ sink ( info. financials . total_accounts ) ;
311
+ sink ( info. financials . accounting ) ;
312
+ sink ( info. financials . unaccounted ) ;
313
+ sink ( info. financials . multiband ) ;
314
+
315
+ sink ( ContactDetails :: FavouriteColor ( "blue" . to_string ( ) ) ) ;
277
316
}
0 commit comments