bandit/examples/new_candidates-nosec.py

19 lines
509 B
Python

import xml
import yaml
def subprocess_shell_cmd():
# sample function with known subprocess shell cmd candidates
# candidate #2
subprocess.Popen('/bin/ls *', shell=True) # nosec
def yaml_load():
# sample function with known yaml.load candidates
temp_str = yaml.dump({'a': '1', 'b': '2'})
# candidate #4
y = yaml.load(temp_str) # nosec
def xml_sax_make_parser():
# sample function with known xml.sax.make_parser candidates
# candidate #6
xml.sax.make_parser() # nosec