|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2020 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the default values for some check modules. |
|
8 """ |
|
9 |
|
10 SecurityDefaults = { |
|
11 "hardcoded_tmp_directories": ["/tmp", "/var/tmp", "/dev/shm", "~/tmp"], |
|
12 "insecure_hashes": ['md4', 'md5', 'sha', 'sha1'], |
|
13 "shell_injection_subprocess": [ |
|
14 'subprocess.Popen', |
|
15 'subprocess.call', |
|
16 'subprocess.check_call', |
|
17 'subprocess.check_output', |
|
18 'subprocess.run'], |
|
19 "shell_injection_shell": [ |
|
20 'os.system', |
|
21 'os.popen', |
|
22 'os.popen2', |
|
23 'os.popen3', |
|
24 'os.popen4', |
|
25 'popen2.popen2', |
|
26 'popen2.popen3', |
|
27 'popen2.popen4', |
|
28 'popen2.Popen3', |
|
29 'popen2.Popen4', |
|
30 'commands.getoutput', |
|
31 'commands.getstatusoutput'], |
|
32 "shell_injection_noshell": [ |
|
33 'os.execl', |
|
34 'os.execle', |
|
35 'os.execlp', |
|
36 'os.execlpe', |
|
37 'os.execv', |
|
38 'os.execve', |
|
39 'os.execvp', |
|
40 'os.execvpe', |
|
41 'os.spawnl', |
|
42 'os.spawnle', |
|
43 'os.spawnlp', |
|
44 'os.spawnlpe', |
|
45 'os.spawnv', |
|
46 'os.spawnve', |
|
47 'os.spawnvp', |
|
48 'os.spawnvpe', |
|
49 'os.startfile'], |
|
50 } |