
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.
14 lines
259 B
Python
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')
|
|
|