@@ -44,42 +44,42 @@ def os_members():
44
44
# doesn't sound safe even if that is restricted to be within a certain directory.
45
45
if UNKNOWN :
46
46
env = {"FOO" : "foo" }
47
- os .execl ("path" , "<progname>" , "arg0" ) # $ getCommand="path" MISSING: getAPathArgument="path"
48
- os .execle ("path" , "<progname>" , "arg0" , env ) # $ getCommand="path" MISSING: getAPathArgument="path"
49
- os .execlp ("file" , "<progname>" , "arg0" ) # $ getCommand="file" MISSING: getAPathArgument="file"
50
- os .execlpe ("file" , "<progname>" , "arg0" , env ) # $ getCommand="file" MISSING: getAPathArgument="file"
51
- os .execv ("path" , ["<progname>" , "arg0" ]) # $ getCommand="path" MISSING: getAPathArgument="path"
52
- os .execve ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" MISSING: getAPathArgument="path"
53
- os .execvp ("file" , ["<progname>" , "arg0" ]) # $ getCommand="file" MISSING: getAPathArgument="file"
54
- os .execvpe ("file" , ["<progname>" , "arg0" ], env ) # $ getCommand="file" MISSING: getAPathArgument="file"
47
+ os .execl ("path" , "<progname>" , "arg0" ) # $ getCommand="path" getAPathArgument="path"
48
+ os .execle ("path" , "<progname>" , "arg0" , env ) # $ getCommand="path" getAPathArgument="path"
49
+ os .execlp ("file" , "<progname>" , "arg0" ) # $ getCommand="file" getAPathArgument="file"
50
+ os .execlpe ("file" , "<progname>" , "arg0" , env ) # $ getCommand="file" getAPathArgument="file"
51
+ os .execv ("path" , ["<progname>" , "arg0" ]) # $ getCommand="path" getAPathArgument="path"
52
+ os .execve ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" getAPathArgument="path"
53
+ os .execvp ("file" , ["<progname>" , "arg0" ]) # $ getCommand="file" getAPathArgument="file"
54
+ os .execvpe ("file" , ["<progname>" , "arg0" ], env ) # $ getCommand="file" getAPathArgument="file"
55
55
56
56
57
57
########################################
58
58
# https://docs.python.org/3.8/library/os.html#os.spawnl
59
59
env = {"FOO" : "foo" }
60
- os .spawnl (os .P_WAIT , "path" , "<progname>" , "arg0" ) # $ getCommand="path" MISSING: getAPathArgument="path"
61
- os .spawnle (os .P_WAIT , "path" , "<progname>" , "arg0" , env ) # $ getCommand="path" MISSING: getAPathArgument="path"
62
- os .spawnlp (os .P_WAIT , "file" , "<progname>" , "arg0" ) # $ getCommand="file" MISSING: getAPathArgument="file"
63
- os .spawnlpe (os .P_WAIT , "file" , "<progname>" , "arg0" , env ) # $ getCommand="file" MISSING: getAPathArgument="file"
64
- os .spawnv (os .P_WAIT , "path" , ["<progname>" , "arg0" ]) # $ getCommand="path" MISSING: getAPathArgument="path"
65
- os .spawnve (os .P_WAIT , "path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" MISSING: getAPathArgument="path"
66
- os .spawnvp (os .P_WAIT , "file" , ["<progname>" , "arg0" ]) # $ getCommand="file" MISSING: getAPathArgument="file"
67
- os .spawnvpe (os .P_WAIT , "file" , ["<progname>" , "arg0" ], env ) # $ getCommand="file" MISSING: getAPathArgument="file"
60
+ os .spawnl (os .P_WAIT , "path" , "<progname>" , "arg0" ) # $ getCommand="path" getAPathArgument="path"
61
+ os .spawnle (os .P_WAIT , "path" , "<progname>" , "arg0" , env ) # $ getCommand="path" getAPathArgument="path"
62
+ os .spawnlp (os .P_WAIT , "file" , "<progname>" , "arg0" ) # $ getCommand="file" getAPathArgument="file"
63
+ os .spawnlpe (os .P_WAIT , "file" , "<progname>" , "arg0" , env ) # $ getCommand="file" getAPathArgument="file"
64
+ os .spawnv (os .P_WAIT , "path" , ["<progname>" , "arg0" ]) # $ getCommand="path" getAPathArgument="path"
65
+ os .spawnve (os .P_WAIT , "path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" getAPathArgument="path"
66
+ os .spawnvp (os .P_WAIT , "file" , ["<progname>" , "arg0" ]) # $ getCommand="file" getAPathArgument="file"
67
+ os .spawnvpe (os .P_WAIT , "file" , ["<progname>" , "arg0" ], env ) # $ getCommand="file" getAPathArgument="file"
68
68
69
69
# unlike os.exec*, some os.spawn* functions is usable with keyword arguments. However,
70
70
# despite the docs using both `file` and `path` as the parameter name, you actually need
71
71
# to use `file` in all cases.
72
- os .spawnv (mode = os .P_WAIT , file = "path" , args = ["<progname>" , "arg0" ]) # $ getCommand="path" MISSING: getAPathArgument="path"
73
- os .spawnve (mode = os .P_WAIT , file = "path" , args = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" MISSING: getAPathArgument="path"
74
- os .spawnvp (mode = os .P_WAIT , file = "file" , args = ["<progname>" , "arg0" ]) # $ getCommand="file" MISSING: getAPathArgument="file"
75
- os .spawnvpe (mode = os .P_WAIT , file = "file" , args = ["<progname>" , "arg0" ], env = env ) # $ getCommand="file" MISSING: getAPathArgument="file"
72
+ os .spawnv (mode = os .P_WAIT , file = "path" , args = ["<progname>" , "arg0" ]) # $ getCommand="path" getAPathArgument="path"
73
+ os .spawnve (mode = os .P_WAIT , file = "path" , args = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" getAPathArgument="path"
74
+ os .spawnvp (mode = os .P_WAIT , file = "file" , args = ["<progname>" , "arg0" ]) # $ getCommand="file" getAPathArgument="file"
75
+ os .spawnvpe (mode = os .P_WAIT , file = "file" , args = ["<progname>" , "arg0" ], env = env ) # $ getCommand="file" getAPathArgument="file"
76
76
77
77
# `posix_spawn` Added in Python 3.8
78
- os .posix_spawn ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" MISSING: getAPathArgument="path"
79
- os .posix_spawn (path = "path" , argv = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" MISSING: getAPathArgument="path"
78
+ os .posix_spawn ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" getAPathArgument="path"
79
+ os .posix_spawn (path = "path" , argv = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" getAPathArgument="path"
80
80
81
- os .posix_spawnp ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" MISSING: getAPathArgument="path"
82
- os .posix_spawnp (path = "path" , argv = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" MISSING: getAPathArgument="path"
81
+ os .posix_spawnp ("path" , ["<progname>" , "arg0" ], env ) # $ getCommand="path" getAPathArgument="path"
82
+ os .posix_spawnp (path = "path" , argv = ["<progname>" , "arg0" ], env = env ) # $ getCommand="path" getAPathArgument="path"
83
83
84
84
########################################
85
85
@@ -126,9 +126,9 @@ def os_members():
126
126
subprocess .Popen (["<progname>" , "-c" , "vuln" ], executable = "/bin/bash" ) # $getCommand="/bin/bash" MISSING: getCommand="vuln"
127
127
128
128
if UNKNOWN :
129
- os .execl ("/bin/sh" , "<progname>" , "-c" , "vuln" ) # $getCommand="/bin/sh" MISSING: getCommand="vuln"
129
+ os .execl ("/bin/sh" , "<progname>" , "-c" , "vuln" ) # $getCommand="/bin/sh" getAPathArgument="/bin/sh" MISSING: getCommand="vuln"
130
130
131
- os .spawnl (os .P_WAIT , "/bin/sh" , "<progname>" , "-c" , "vuln" ) # $getCommand="/bin/sh" MISSING: getCommand="vuln"
131
+ os .spawnl (os .P_WAIT , "/bin/sh" , "<progname>" , "-c" , "vuln" ) # $getCommand="/bin/sh" getAPathArgument="/bin/sh" MISSING: getCommand="vuln"
132
132
133
133
134
134
########################################
0 commit comments