-
Notifications
You must be signed in to change notification settings - Fork 7
/
bandit.yaml
79 lines (69 loc) · 2.65 KB
/
bandit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# optional: after how many files to update progress
#show_progress_every: 100
# optional: plugins directory name
#plugins_dir: 'plugins'
# optional: plugins discovery name pattern
plugin_name_pattern: '*.py'
# optional: terminal escape sequences to display colors
#output_colors:
# DEFAULT: '\033[0m'
# HEADER: '\033[95m'
# INFO: '\033[94m'
# WARN: '\033[93m'
# ERROR: '\033[91m'
# optional: log format string
#log_format: "[%(module)s]\t%(levelname)s\t%(message)s"
profiles:
ShellInjection:
include:
- subprocess_popen_with_shell_equals_true
- any_other_function_with_shell_equals_true
exclude:
SqlInjection:
include:
- hardcoded_sql_expressions
blacklist_functions:
bad_name_sets:
- pickle:
qualname: pickle.loads, pickle.dumps
message: "Pickle library appears to be in use, possible security issue."
- md5:
qualname: hashlib.md5
message: "Use of insecure MD5 hash function."
- subprocess_popen:
qualname: subprocess.Popen
message: "Use of possibly insecure system call function (subprocess.Popen)."
- subprocess_call:
qualname: subprocess.call
message: "Use of possibly insecure system call function (subprocess.call)."
- os_exec:
qualname: os.exec, os.spawn
params: l, le, lp, lpe, v, ve, vp, vpe
message: "Use of possibly insecure system call function (os.exec or os.spawn)."
- os_popen:
qualname: os.popen
message: "Use of insecure / deprecated system call function (os.popen)."
- os_startfile_q:
qualname: os.startfile
message: "Use of insecure system function (os.startfile)."
- mktemp_q:
qualname: tempfile.mktemp
message: "Use of insecure and deprecated function (mktemp)."
- eval:
name: eval
message: "Use of possibly insecure function - consider using safer ast.literal_eval."
- mark_safe:
name: mark_safe
message: "Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed."
blacklist_imports:
bad_import_sets:
- telnet:
import: telnetlib
level: ERROR
message: "Telnet is considered insecure. Use SSH or some other encrypted protocol."
- info_libs:
import: pickle, subprocess, Crypto
level: INFO
message: "Consider possible security implications associated with {module} module."
hardcoded_password:
word_list: "wordlist/default-passwords"