eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityDefaults.py

changeset 7614
646742c260bd
child 7615
ca2949b1a29a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityDefaults.py	Tue Jun 09 20:10:59 2020 +0200
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2020 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing the default values for some check modules.
+"""
+
+SecurityDefaults = {
+    "hardcoded_tmp_directories": ["/tmp", "/var/tmp", "/dev/shm", "~/tmp"],
+    "insecure_hashes": ['md4', 'md5', 'sha', 'sha1'],
+    "shell_injection_subprocess": [
+        'subprocess.Popen',
+        'subprocess.call',
+        'subprocess.check_call',
+        'subprocess.check_output',
+        'subprocess.run'],
+    "shell_injection_shell": [
+        'os.system',
+        'os.popen',
+        'os.popen2',
+        'os.popen3',
+        'os.popen4',
+        'popen2.popen2',
+        'popen2.popen3',
+        'popen2.popen4',
+        'popen2.Popen3',
+        'popen2.Popen4',
+        'commands.getoutput',
+        'commands.getstatusoutput'],
+    "shell_injection_noshell": [
+        'os.execl',
+        'os.execle',
+        'os.execlp',
+        'os.execlpe',
+        'os.execv',
+        'os.execve',
+        'os.execvp',
+        'os.execvpe',
+        'os.spawnl',
+        'os.spawnle',
+        'os.spawnlp',
+        'os.spawnlpe',
+        'os.spawnv',
+        'os.spawnve',
+        'os.spawnvp',
+        'os.spawnvpe',
+        'os.startfile'],
+}

eric ide

mercurial