Files
bandit/examples/new_candidates-nosec.py
Christopher J Schaefer 421e032bc8 Additional baseline candidate test coverage
Additional test cases to improve functional test coverage for baseline
candidate tests. Also includes example files for more complex candidate
comparisons.

Change-Id: I7d05c0f1e3f0d9e0a36c825654d28c19ed4c0bbd
2016-02-25 10:43:26 -06:00

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