File tree Expand file tree Collapse file tree
python/ql/test/experimental/dataflow/sensitive-data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,14 +20,24 @@ def encrypt_password(pwd):
2020account_id () # $ SensitiveDataSource=id
2121safe_to_store = encrypt_password (pwd )
2222
23+ f = get_password
24+ f () # $ SensitiveDataSource=password
25+
2326# attributes
2427foo = ObjectFromDatabase ()
2528foo .secret # $ SensitiveDataSource=secret
2629foo .username # $ SensitiveDataSource=id
2730
31+ # plain variables
32+ password = some_function ()
33+ print (password ) # $ MISSING: SensitiveDataSource=password
34+
2835# Special handling of lookups of sensitive properties
2936request .args ["password" ], # $ MISSING: SensitiveDataSource=password
3037request .args .get ("password" ) # $ SensitiveDataSource=password
3138
39+ x = "password"
40+ request .args .get (x ) # $ SensitiveDataSource=password
41+
3242# I don't think handling `getlist` is super important, just included it to show what we don't handle
3343request .args .getlist ("password" )[0 ] # $ MISSING: SensitiveDataSource=password
You can’t perform that action at this time.
0 commit comments