Skip to content

Commit 6295e49

Browse files
committed
Initial commit
1 parent d410687 commit 6295e49

File tree

3 files changed

+411
-0
lines changed

3 files changed

+411
-0
lines changed

Diff for: .bandit.yml

+398
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,398 @@
1+
---
2+
### Bandit config file
3+
4+
### This config may optionally select a subset of tests to run or skip by
5+
### filling out the 'tests' and 'skips' lists given below. If no tests are
6+
### specified for inclusion then it is assumed all tests are desired. The skips
7+
### set will remove specific tests from the include set. This can be controlled
8+
### using the -t/-s CLI options. Note that the same test ID should not appear
9+
### in both 'tests' and 'skips', this would be nonsensical and is detected by
10+
### Bandit at runtime.
11+
12+
# Available tests:
13+
# B101 : assert_used
14+
# B102 : exec_used
15+
# B103 : set_bad_file_permissions
16+
# B104 : hardcoded_bind_all_interfaces
17+
# B105 : hardcoded_password_string
18+
# B106 : hardcoded_password_funcarg
19+
# B107 : hardcoded_password_default
20+
# B108 : hardcoded_tmp_directory
21+
# B110 : try_except_pass
22+
# B112 : try_except_continue
23+
# B201 : flask_debug_true
24+
# B301 : pickle
25+
# B302 : marshal
26+
# B303 : md5
27+
# B304 : ciphers
28+
# B305 : cipher_modes
29+
# B306 : mktemp_q
30+
# B307 : eval
31+
# B308 : mark_safe
32+
# B309 : httpsconnection
33+
# B310 : urllib_urlopen
34+
# B311 : random
35+
# B312 : telnetlib
36+
# B313 : xml_bad_cElementTree
37+
# B314 : xml_bad_ElementTree
38+
# B315 : xml_bad_expatreader
39+
# B316 : xml_bad_expatbuilder
40+
# B317 : xml_bad_sax
41+
# B318 : xml_bad_minidom
42+
# B319 : xml_bad_pulldom
43+
# B320 : xml_bad_etree
44+
# B321 : ftplib
45+
# B322 : input
46+
# B323 : unverified_context
47+
# B324 : hashlib_new_insecure_functions
48+
# B325 : tempnam
49+
# B401 : import_telnetlib
50+
# B402 : import_ftplib
51+
# B403 : import_pickle
52+
# B404 : import_subprocess
53+
# B405 : import_xml_etree
54+
# B406 : import_xml_sax
55+
# B407 : import_xml_expat
56+
# B408 : import_xml_minidom
57+
# B409 : import_xml_pulldom
58+
# B410 : import_lxml
59+
# B411 : import_xmlrpclib
60+
# B412 : import_httpoxy
61+
# B413 : import_pycrypto
62+
# B501 : request_with_no_cert_validation
63+
# B502 : ssl_with_bad_version
64+
# B503 : ssl_with_bad_defaults
65+
# B504 : ssl_with_no_version
66+
# B505 : weak_cryptographic_key
67+
# B506 : yaml_load
68+
# B507 : ssh_no_host_key_verification
69+
# B601 : paramiko_calls
70+
# B602 : subprocess_popen_with_shell_equals_true
71+
# B603 : subprocess_without_shell_equals_true
72+
# B604 : any_other_function_with_shell_equals_true
73+
# B605 : start_process_with_a_shell
74+
# B606 : start_process_with_no_shell
75+
# B607 : start_process_with_partial_path
76+
# B608 : hardcoded_sql_expressions
77+
# B609 : linux_commands_wildcard_injection
78+
# B610 : django_extra_used
79+
# B611 : django_rawsql_used
80+
# B701 : jinja2_autoescape_false
81+
# B702 : use_of_mako_templates
82+
# B703 : django_mark_safe
83+
84+
# (optional) list included test IDs here, eg '[B101, B406]':
85+
tests:
86+
87+
# (optional) list skipped test IDs here, eg '[B101, B406]':
88+
skips:
89+
- B101
90+
- B105
91+
- B501
92+
93+
### (optional) plugin settings - some test plugins require configuration data
94+
### that may be given here, per-plugin. All bandit test plugins have a built in
95+
### set of sensible defaults and these will be used if no configuration is
96+
### provided. It is not necessary to provide settings for every (or any) plugin
97+
### if the defaults are acceptable.
98+
99+
any_other_function_with_shell_equals_true:
100+
no_shell:
101+
- os.execl
102+
- os.execle
103+
- os.execlp
104+
- os.execlpe
105+
- os.execv
106+
- os.execve
107+
- os.execvp
108+
- os.execvpe
109+
- os.spawnl
110+
- os.spawnle
111+
- os.spawnlp
112+
- os.spawnlpe
113+
- os.spawnv
114+
- os.spawnve
115+
- os.spawnvp
116+
- os.spawnvpe
117+
- os.startfile
118+
shell:
119+
- os.system
120+
- os.popen
121+
- os.popen2
122+
- os.popen3
123+
- os.popen4
124+
- popen2.popen2
125+
- popen2.popen3
126+
- popen2.popen4
127+
- popen2.Popen3
128+
- popen2.Popen4
129+
- commands.getoutput
130+
- commands.getstatusoutput
131+
subprocess:
132+
- subprocess.Popen
133+
- subprocess.call
134+
- subprocess.check_call
135+
- subprocess.check_output
136+
- subprocess.run
137+
hardcoded_tmp_directory:
138+
tmp_dirs:
139+
- /tmp
140+
- /var/tmp
141+
- /dev/shm
142+
linux_commands_wildcard_injection:
143+
no_shell:
144+
- os.execl
145+
- os.execle
146+
- os.execlp
147+
- os.execlpe
148+
- os.execv
149+
- os.execve
150+
- os.execvp
151+
- os.execvpe
152+
- os.spawnl
153+
- os.spawnle
154+
- os.spawnlp
155+
- os.spawnlpe
156+
- os.spawnv
157+
- os.spawnve
158+
- os.spawnvp
159+
- os.spawnvpe
160+
- os.startfile
161+
shell:
162+
- os.system
163+
- os.popen
164+
- os.popen2
165+
- os.popen3
166+
- os.popen4
167+
- popen2.popen2
168+
- popen2.popen3
169+
- popen2.popen4
170+
- popen2.Popen3
171+
- popen2.Popen4
172+
- commands.getoutput
173+
- commands.getstatusoutput
174+
subprocess:
175+
- subprocess.Popen
176+
- subprocess.call
177+
- subprocess.check_call
178+
- subprocess.check_output
179+
- subprocess.run
180+
ssl_with_bad_defaults:
181+
bad_protocol_versions:
182+
- PROTOCOL_SSLv2
183+
- SSLv2_METHOD
184+
- SSLv23_METHOD
185+
- PROTOCOL_SSLv3
186+
- PROTOCOL_TLSv1
187+
- SSLv3_METHOD
188+
- TLSv1_METHOD
189+
ssl_with_bad_version:
190+
bad_protocol_versions:
191+
- PROTOCOL_SSLv2
192+
- SSLv2_METHOD
193+
- SSLv23_METHOD
194+
- PROTOCOL_SSLv3
195+
- PROTOCOL_TLSv1
196+
- SSLv3_METHOD
197+
- TLSv1_METHOD
198+
start_process_with_a_shell:
199+
no_shell:
200+
- os.execl
201+
- os.execle
202+
- os.execlp
203+
- os.execlpe
204+
- os.execv
205+
- os.execve
206+
- os.execvp
207+
- os.execvpe
208+
- os.spawnl
209+
- os.spawnle
210+
- os.spawnlp
211+
- os.spawnlpe
212+
- os.spawnv
213+
- os.spawnve
214+
- os.spawnvp
215+
- os.spawnvpe
216+
- os.startfile
217+
shell:
218+
- os.system
219+
- os.popen
220+
- os.popen2
221+
- os.popen3
222+
- os.popen4
223+
- popen2.popen2
224+
- popen2.popen3
225+
- popen2.popen4
226+
- popen2.Popen3
227+
- popen2.Popen4
228+
- commands.getoutput
229+
- commands.getstatusoutput
230+
subprocess:
231+
- subprocess.Popen
232+
- subprocess.call
233+
- subprocess.check_call
234+
- subprocess.check_output
235+
- subprocess.run
236+
start_process_with_no_shell:
237+
no_shell:
238+
- os.execl
239+
- os.execle
240+
- os.execlp
241+
- os.execlpe
242+
- os.execv
243+
- os.execve
244+
- os.execvp
245+
- os.execvpe
246+
- os.spawnl
247+
- os.spawnle
248+
- os.spawnlp
249+
- os.spawnlpe
250+
- os.spawnv
251+
- os.spawnve
252+
- os.spawnvp
253+
- os.spawnvpe
254+
- os.startfile
255+
shell:
256+
- os.system
257+
- os.popen
258+
- os.popen2
259+
- os.popen3
260+
- os.popen4
261+
- popen2.popen2
262+
- popen2.popen3
263+
- popen2.popen4
264+
- popen2.Popen3
265+
- popen2.Popen4
266+
- commands.getoutput
267+
- commands.getstatusoutput
268+
subprocess:
269+
- subprocess.Popen
270+
- subprocess.call
271+
- subprocess.check_call
272+
- subprocess.check_output
273+
- subprocess.run
274+
start_process_with_partial_path:
275+
no_shell:
276+
- os.execl
277+
- os.execle
278+
- os.execlp
279+
- os.execlpe
280+
- os.execv
281+
- os.execve
282+
- os.execvp
283+
- os.execvpe
284+
- os.spawnl
285+
- os.spawnle
286+
- os.spawnlp
287+
- os.spawnlpe
288+
- os.spawnv
289+
- os.spawnve
290+
- os.spawnvp
291+
- os.spawnvpe
292+
- os.startfile
293+
shell:
294+
- os.system
295+
- os.popen
296+
- os.popen2
297+
- os.popen3
298+
- os.popen4
299+
- popen2.popen2
300+
- popen2.popen3
301+
- popen2.popen4
302+
- popen2.Popen3
303+
- popen2.Popen4
304+
- commands.getoutput
305+
- commands.getstatusoutput
306+
subprocess:
307+
- subprocess.Popen
308+
- subprocess.call
309+
- subprocess.check_call
310+
- subprocess.check_output
311+
- subprocess.run
312+
subprocess_popen_with_shell_equals_true:
313+
no_shell:
314+
- os.execl
315+
- os.execle
316+
- os.execlp
317+
- os.execlpe
318+
- os.execv
319+
- os.execve
320+
- os.execvp
321+
- os.execvpe
322+
- os.spawnl
323+
- os.spawnle
324+
- os.spawnlp
325+
- os.spawnlpe
326+
- os.spawnv
327+
- os.spawnve
328+
- os.spawnvp
329+
- os.spawnvpe
330+
- os.startfile
331+
shell:
332+
- os.system
333+
- os.popen
334+
- os.popen2
335+
- os.popen3
336+
- os.popen4
337+
- popen2.popen2
338+
- popen2.popen3
339+
- popen2.popen4
340+
- popen2.Popen3
341+
- popen2.Popen4
342+
- commands.getoutput
343+
- commands.getstatusoutput
344+
subprocess:
345+
- subprocess.Popen
346+
- subprocess.call
347+
- subprocess.check_call
348+
- subprocess.check_output
349+
- subprocess.run
350+
subprocess_without_shell_equals_true:
351+
no_shell:
352+
- os.execl
353+
- os.execle
354+
- os.execlp
355+
- os.execlpe
356+
- os.execv
357+
- os.execve
358+
- os.execvp
359+
- os.execvpe
360+
- os.spawnl
361+
- os.spawnle
362+
- os.spawnlp
363+
- os.spawnlpe
364+
- os.spawnv
365+
- os.spawnve
366+
- os.spawnvp
367+
- os.spawnvpe
368+
- os.startfile
369+
shell:
370+
- os.system
371+
- os.popen
372+
- os.popen2
373+
- os.popen3
374+
- os.popen4
375+
- popen2.popen2
376+
- popen2.popen3
377+
- popen2.popen4
378+
- popen2.Popen3
379+
- popen2.Popen4
380+
- commands.getoutput
381+
- commands.getstatusoutput
382+
subprocess:
383+
- subprocess.Popen
384+
- subprocess.call
385+
- subprocess.check_call
386+
- subprocess.check_output
387+
- subprocess.run
388+
try_except_continue:
389+
check_typed_exception: false
390+
try_except_pass:
391+
check_typed_exception: false
392+
weak_cryptographic_key:
393+
weak_key_size_dsa_high: 1024
394+
weak_key_size_dsa_medium: 2048
395+
weak_key_size_ec_high: 160
396+
weak_key_size_ec_medium: 224
397+
weak_key_size_rsa_high: 1024
398+
weak_key_size_rsa_medium: 2048

0 commit comments

Comments
 (0)