python: Add summaries for container constructors

Also:
- turn on flow summaries for taint
- do not restrict node type
  (as now we need summary nodes)
This commit is contained in:
Rasmus Lerchedahl Petersen
2023-05-15 11:00:43 +02:00
parent 145eaf3947
commit 5b4f98d6c4
16 changed files with 302 additions and 30 deletions

View File

@@ -28,19 +28,19 @@ def test_construction():
)
ensure_tainted(
list(tainted_list), # $ MISSING: tainted
list(tainted_tuple), # $ MISSING: tainted
list(tainted_set), # $ MISSING: tainted
list(tainted_dict.values()), # $ MISSING: tainted
list(tainted_dict.items()), # $ MISSING: tainted
list(tainted_list), # $ tainted
list(tainted_tuple), # $ tainted
list(tainted_set), # $ tainted
list(tainted_dict.values()), # $ tainted
list(tainted_dict.items()), # $ tainted
tuple(tainted_list), # $ MISSING: tainted
set(tainted_list), # $ MISSING: tainted
frozenset(tainted_list), # $ MISSING: tainted
dict(tainted_dict), # $ MISSING: tainted
dict(k = tainted_string)["k"], # $ MISSING: tainted
dict(dict(k = tainted_string))["k"], # $ MISSING: tainted
dict(["k", tainted_string]), # $ MISSING: tainted
tuple(tainted_list), # $ tainted
set(tainted_list), # $ tainted
frozenset(tainted_list), # $ tainted
dict(tainted_dict), # $ tainted
dict(k = tainted_string)["k"], # $ tainted
dict(dict(k = tainted_string))["k"], # $ tainted
dict(["k", tainted_string]), # $ tainted
)
ensure_not_tainted(