bandit/examples/os-exec.py
Jamie Finnigan cd7a2df127 Modify call_bad_names test to use regex and add to blacklist
This modifies the test performed in call_bad_names to use re.match, adds
additional functions to the blacklist, and adds examples that trigger those
new blacklist entries.

It is an intial pass at addressing https://github.com/chair6/bandit/issues/6,
but further changes will be required to clean this up, including separating
configuration from test code.
2014-07-25 11:10:03 -07:00

12 lines
232 B
Python

import os
os.execl(path, arg0, arg1)
os.execle(path, arg0, arg1, env)
os.execlp(file, arg0, arg1)
os.execlpe(file, arg0, arg1, env)
os.execv(path, args)
os.execve(path, args, env)
os.execvp(file, args)
os.execvpe(file, args, env)