|
5 | 5 | import tempfile |
6 | 6 | import shutil |
7 | 7 |
|
8 | | -open("file") # $ getAPathArgument="file" |
9 | | -open(file="file") # $ getAPathArgument="file" |
| 8 | +open("file") # $ getAPathArgument="file" threatModelSource[file]=open(..) |
| 9 | +open(file="file") # $ getAPathArgument="file" threatModelSource[file]=open(..) |
10 | 10 |
|
11 | 11 | o = open |
12 | 12 |
|
13 | | -o("file") # $ getAPathArgument="file" |
14 | | -o(file="file") # $ getAPathArgument="file" |
| 13 | +o("file") # $ getAPathArgument="file" threatModelSource[file]=o(..) |
| 14 | +o(file="file") # $ getAPathArgument="file" threatModelSource[file]=o(..) |
15 | 15 |
|
16 | 16 |
|
17 | | -builtins.open("file") # $ getAPathArgument="file" |
18 | | -builtins.open(file="file") # $ getAPathArgument="file" |
| 17 | +builtins.open("file") # $ getAPathArgument="file" threatModelSource[file]=builtins.open(..) |
| 18 | +builtins.open(file="file") # $ getAPathArgument="file" threatModelSource[file]=builtins.open(..) |
19 | 19 |
|
20 | 20 |
|
21 | | -io.open("file") # $ getAPathArgument="file" |
22 | | -io.open(file="file") # $ getAPathArgument="file" |
| 21 | +io.open("file") # $ getAPathArgument="file" threatModelSource[file]=io.open(..) |
| 22 | +io.open(file="file") # $ getAPathArgument="file" threatModelSource[file]=io.open(..) |
23 | 23 | io.open_code("file") # $ getAPathArgument="file" |
24 | 24 | io.FileIO("file") # $ getAPathArgument="file" |
25 | 25 |
|
26 | | -f = open("path") # $ getAPathArgument="path" |
| 26 | +f = open("path") # $ getAPathArgument="path" threatModelSource[file]=open(..) |
27 | 27 | f.write("foo") # $ getAPathArgument="path" fileWriteData="foo" |
28 | 28 | lines = ["foo"] |
29 | 29 | f.writelines(lines) # $ getAPathArgument="path" fileWriteData=lines |
@@ -87,8 +87,8 @@ def test_fspath(): |
87 | 87 | os.fspath(path=TAINTED_STRING), # $ tainted |
88 | 88 | ) |
89 | 89 |
|
90 | | -os.open("path", os.O_RDONLY) # $ getAPathArgument="path" |
91 | | -os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" |
| 90 | +os.open("path", os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) |
| 91 | +os.open(path="path", flags=os.O_RDONLY) # $ getAPathArgument="path" SPURIOUS: threatModelSource[file]=os.open(..) |
92 | 92 |
|
93 | 93 | os.access("path", os.R_OK) # $ getAPathArgument="path" |
94 | 94 | os.access(path="path", mode=os.R_OK) # $ getAPathArgument="path" |
|
0 commit comments