bandit/examples/os-popen.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

14 lines
259 B
Python

import os
from os import popen
import os as o
from os import popen as pos
os.popen('/bin/uname -av')
popen('/bin/uname -av')
o.popen('/bin/uname -av')
pos('/bin/uname -av')
os.popen2('/bin/uname -av')
os.popen3('/bin/uname -av')
os.popen4('/bin/uname -av')