File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
python/ql/test/experimental/dataflow/sensitive-data Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,24 @@ def encrypt_password(pwd):
20
20
account_id () # $ SensitiveDataSource=id
21
21
safe_to_store = encrypt_password (pwd )
22
22
23
+ f = get_password
24
+ f () # $ SensitiveDataSource=password
25
+
23
26
# attributes
24
27
foo = ObjectFromDatabase ()
25
28
foo .secret # $ SensitiveDataSource=secret
26
29
foo .username # $ SensitiveDataSource=id
27
30
31
+ # plain variables
32
+ password = some_function ()
33
+ print (password ) # $ MISSING: SensitiveDataSource=password
34
+
28
35
# Special handling of lookups of sensitive properties
29
36
request .args ["password" ], # $ MISSING: SensitiveDataSource=password
30
37
request .args .get ("password" ) # $ SensitiveDataSource=password
31
38
39
+ x = "password"
40
+ request .args .get (x ) # $ SensitiveDataSource=password
41
+
32
42
# I don't think handling `getlist` is super important, just included it to show what we don't handle
33
43
request .args .getlist ("password" )[0 ] # $ MISSING: SensitiveDataSource=password
You can’t perform that action at this time.
0 commit comments