checkmate5 4.3.0.dev2__py3-none-any.whl → 5.1.0.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checkmate/settings/defaults.py +1 -36
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/METADATA +1 -1
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/RECORD +7 -56
- checkmate/contrib/plugins/all/opengrep/__init__.py +0 -0
- checkmate/contrib/plugins/all/opengrep/analyzer.py +0 -150
- checkmate/contrib/plugins/all/opengrep/issues_data.py +0 -5
- checkmate/contrib/plugins/all/opengrep/opengrep_manylinux_x86 +0 -0
- checkmate/contrib/plugins/all/opengrep/setup.py +0 -13
- checkmate/contrib/plugins/cve/__init__.py +0 -0
- checkmate/contrib/plugins/cve/text4shell/__init__.py +0 -0
- checkmate/contrib/plugins/cve/text4shell/analyzer.py +0 -64
- checkmate/contrib/plugins/cve/text4shell/issues_data.py +0 -8
- checkmate/contrib/plugins/cve/text4shell/setup.py +0 -13
- checkmate/contrib/plugins/golang/__init__.py +0 -0
- checkmate/contrib/plugins/golang/gostaticcheck/__init__.py +0 -0
- checkmate/contrib/plugins/golang/gostaticcheck/analyzer.py +0 -94
- checkmate/contrib/plugins/golang/gostaticcheck/issues_data.py +0 -1246
- checkmate/contrib/plugins/golang/gostaticcheck/setup.py +0 -13
- checkmate/contrib/plugins/iac/__init__.py +0 -0
- checkmate/contrib/plugins/iac/kubescape/__init__.py +0 -0
- checkmate/contrib/plugins/iac/kubescape/analyzer.py +0 -115
- checkmate/contrib/plugins/iac/kubescape/issues_data.py +0 -636
- checkmate/contrib/plugins/iac/kubescape/setup.py +0 -14
- checkmate/contrib/plugins/iac/tfsec/__init__.py +0 -0
- checkmate/contrib/plugins/iac/tfsec/analyzer.py +0 -92
- checkmate/contrib/plugins/iac/tfsec/issues_data.py +0 -1917
- checkmate/contrib/plugins/iac/tfsec/setup.py +0 -13
- checkmate/contrib/plugins/java/__init__.py +0 -0
- checkmate/contrib/plugins/java/semgrepjava/__init__.py +0 -0
- checkmate/contrib/plugins/java/semgrepjava/analyzer.py +0 -96
- checkmate/contrib/plugins/java/semgrepjava/issues_data.py +0 -5
- checkmate/contrib/plugins/java/semgrepjava/setup.py +0 -13
- checkmate/contrib/plugins/javascript/__init__.py +0 -0
- checkmate/contrib/plugins/javascript/semgrepeslint/__init__.py +0 -0
- checkmate/contrib/plugins/javascript/semgrepeslint/analyzer.py +0 -95
- checkmate/contrib/plugins/javascript/semgrepeslint/issues_data.py +0 -6
- checkmate/contrib/plugins/javascript/semgrepeslint/setup.py +0 -13
- checkmate/contrib/plugins/perl/__init__.py +0 -0
- checkmate/contrib/plugins/perl/graudit/__init__.py +0 -0
- checkmate/contrib/plugins/perl/graudit/analyzer.py +0 -70
- checkmate/contrib/plugins/perl/graudit/issues_data.py +0 -8
- checkmate/contrib/plugins/perl/graudit/setup.py +0 -13
- checkmate/contrib/plugins/python/__init__.py +0 -0
- checkmate/contrib/plugins/python/bandit/__init__.py +0 -0
- checkmate/contrib/plugins/python/bandit/analyzer.py +0 -74
- checkmate/contrib/plugins/python/bandit/issues_data.py +0 -426
- checkmate/contrib/plugins/python/bandit/setup.py +0 -13
- checkmate/contrib/plugins/ruby/__init__.py +0 -0
- checkmate/contrib/plugins/ruby/brakeman/__init__.py +0 -0
- checkmate/contrib/plugins/ruby/brakeman/analyzer.py +0 -96
- checkmate/contrib/plugins/ruby/brakeman/issues_data.py +0 -518
- checkmate/contrib/plugins/ruby/brakeman/setup.py +0 -13
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/WHEEL +0 -0
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/entry_points.txt +0 -0
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/licenses/LICENSE.txt +0 -0
- {checkmate5-4.3.0.dev2.dist-info → checkmate5-5.1.0.dev2.dist-info}/top_level.txt +0 -0
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
issues_data = {
|
|
5
|
-
"B101": {
|
|
6
|
-
"severity": "1",
|
|
7
|
-
"description": "Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.",
|
|
8
|
-
"categories": ["security"],
|
|
9
|
-
"title": "assert used"
|
|
10
|
-
},
|
|
11
|
-
"B104": {
|
|
12
|
-
"severity": "2",
|
|
13
|
-
"description": "Possible binding to all interfaces.",
|
|
14
|
-
"categories": ["security"],
|
|
15
|
-
"title": "hardcoded bind all interfaces"
|
|
16
|
-
},
|
|
17
|
-
"B305": {
|
|
18
|
-
"severity": "2",
|
|
19
|
-
"description": "Use of insecure cipher mode cryptography.hazmat.primitives.ciphers.modes.ECB.",
|
|
20
|
-
"categories": ["security"],
|
|
21
|
-
"title": "blacklist"
|
|
22
|
-
},
|
|
23
|
-
"B413": {
|
|
24
|
-
"severity": "3",
|
|
25
|
-
"description": "The pyCrypto library and its module RSA are no longer actively maintained and have been deprecated. Consider using pyca/cryptography library.",
|
|
26
|
-
"categories": ["security"],
|
|
27
|
-
"title": "blacklist"
|
|
28
|
-
},
|
|
29
|
-
"B414": {
|
|
30
|
-
"severity": "3",
|
|
31
|
-
"description": "The pycryptodome library is not considered a secure alternative to pycrypto.Consider using pyca/cryptography library.",
|
|
32
|
-
"categories": ["security"],
|
|
33
|
-
"title": "blacklist"
|
|
34
|
-
},
|
|
35
|
-
"B304": {
|
|
36
|
-
"severity": "3",
|
|
37
|
-
"description": "Use of insecure cipher cryptography.hazmat.primitives.ciphers.algorithms.IDEA. Replace with a known secure cipher such as AES.",
|
|
38
|
-
"categories": ["security"],
|
|
39
|
-
"title": "blacklist"
|
|
40
|
-
},
|
|
41
|
-
"B303": {
|
|
42
|
-
"severity": "2",
|
|
43
|
-
"description": "Use of insecure MD2, MD4, MD5, or SHA1 hash function.",
|
|
44
|
-
"categories": ["security"],
|
|
45
|
-
"title": "blacklist"
|
|
46
|
-
},
|
|
47
|
-
"B610": {
|
|
48
|
-
"severity": "2",
|
|
49
|
-
"description": "Use of extra potential SQL attack vector.",
|
|
50
|
-
"categories": ["security"],
|
|
51
|
-
"title": "django extra used"
|
|
52
|
-
},
|
|
53
|
-
"B611": {
|
|
54
|
-
"severity": "2",
|
|
55
|
-
"description": "Use of RawSQL potential SQL attack vector.",
|
|
56
|
-
"categories": ["security"],
|
|
57
|
-
"title": "django rawsql used"
|
|
58
|
-
},
|
|
59
|
-
"B307": {
|
|
60
|
-
"severity": "2",
|
|
61
|
-
"description": "Use of possibly insecure function - consider using safer ast.literal eval.",
|
|
62
|
-
"categories": ["security"],
|
|
63
|
-
"title": "blacklist"
|
|
64
|
-
},
|
|
65
|
-
"B102": {
|
|
66
|
-
"severity": "2",
|
|
67
|
-
"description": "Use of exec detected.",
|
|
68
|
-
"categories": ["security"],
|
|
69
|
-
"title": "exec used"
|
|
70
|
-
},
|
|
71
|
-
"B201": {
|
|
72
|
-
"severity": "3",
|
|
73
|
-
"description": "A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code.",
|
|
74
|
-
"categories": ["security"],
|
|
75
|
-
"title": "flask debug true"
|
|
76
|
-
},
|
|
77
|
-
"B402": {
|
|
78
|
-
"severity": "3",
|
|
79
|
-
"description": "A FTP-related module is being imported. FTP is considered insecure. Use SSH/SFTP/SCP or some other encrypted protocol.",
|
|
80
|
-
"categories": ["security"],
|
|
81
|
-
"title": "blacklist"
|
|
82
|
-
},
|
|
83
|
-
"B321": {
|
|
84
|
-
"severity": "3",
|
|
85
|
-
"description": "FTP-related functions are being called. FTP is considered insecure. Use SSH/SFTP/SCP or some other encrypted protocol.",
|
|
86
|
-
"categories": ["security"],
|
|
87
|
-
"title": "blacklist"
|
|
88
|
-
},
|
|
89
|
-
"B107": {
|
|
90
|
-
"severity": "1",
|
|
91
|
-
"description": "Possible hardcoded password: 'blerg'",
|
|
92
|
-
"categories": ["security"],
|
|
93
|
-
"title": "hardcoded password default"
|
|
94
|
-
},
|
|
95
|
-
"B105": {
|
|
96
|
-
"severity": "1",
|
|
97
|
-
"description": "Possible hardcoded password: 'blerg'",
|
|
98
|
-
"categories": ["security"],
|
|
99
|
-
"title": "hardcoded password string"
|
|
100
|
-
},
|
|
101
|
-
"B106": {
|
|
102
|
-
"severity": "1",
|
|
103
|
-
"description": "Possible hardcoded password: 'blerg'",
|
|
104
|
-
"categories": ["security"],
|
|
105
|
-
"title": "hardcoded password funcarg"
|
|
106
|
-
},
|
|
107
|
-
"B108": {
|
|
108
|
-
"severity": "2",
|
|
109
|
-
"description": "Probable insecure usage of temp file/directory.",
|
|
110
|
-
"categories": ["security"],
|
|
111
|
-
"title": "hardcoded tmp directory"
|
|
112
|
-
},
|
|
113
|
-
"B324": {
|
|
114
|
-
"severity": "2",
|
|
115
|
-
"description": "Use of insecure MD4 or MD5 hash function.",
|
|
116
|
-
"categories": ["security"],
|
|
117
|
-
"title": "hashlib new"
|
|
118
|
-
},
|
|
119
|
-
"B309": {
|
|
120
|
-
"severity": "2",
|
|
121
|
-
"description": "Use of HTTPSConnection on older versions of Python prior to 2.7.9 and 3.4.3 do not provide security, see https://wiki.openstack.org/wiki/OSSN/OSSN-0033",
|
|
122
|
-
"categories": ["security"],
|
|
123
|
-
"title": "blacklist"
|
|
124
|
-
},
|
|
125
|
-
"B412": {
|
|
126
|
-
"severity": "3",
|
|
127
|
-
"description": "Consider possible security implications associated with twisted.web.twcgi.CGIScript module.",
|
|
128
|
-
"categories": ["security"],
|
|
129
|
-
"title": "blacklist"
|
|
130
|
-
},
|
|
131
|
-
"B404": {
|
|
132
|
-
"severity": "1",
|
|
133
|
-
"description": "Consider possible security implications associated with subprocess module.",
|
|
134
|
-
"categories": ["security"],
|
|
135
|
-
"title": "blacklist"
|
|
136
|
-
},
|
|
137
|
-
"B403": {
|
|
138
|
-
"severity": "1",
|
|
139
|
-
"description": "Consider possible security implications associated with pickle module.",
|
|
140
|
-
"categories": ["security"],
|
|
141
|
-
"title": "blacklist"
|
|
142
|
-
},
|
|
143
|
-
"B602": {
|
|
144
|
-
"severity": "1",
|
|
145
|
-
"description": "subprocess call with shell=True seems safe, but may be changed in the future, consider rewriting without shell",
|
|
146
|
-
"categories": ["security"],
|
|
147
|
-
"title": "subprocess popen with shell equals true"
|
|
148
|
-
},
|
|
149
|
-
"B301": {
|
|
150
|
-
"severity": "2",
|
|
151
|
-
"description": "Pickle library appears to be in use, possible security issue.",
|
|
152
|
-
"categories": ["security"],
|
|
153
|
-
"title": "blacklist"
|
|
154
|
-
},
|
|
155
|
-
"B322": {
|
|
156
|
-
"severity": "3",
|
|
157
|
-
"description": "The input method in Python 2 will read from standard input, evaluate and run the resulting string as python source code. This is similar, though in many ways worse, then using eval. On Python 2, use raw input instead, input is safe in Python 3.",
|
|
158
|
-
"categories": ["security"],
|
|
159
|
-
"title": "blacklist"
|
|
160
|
-
},
|
|
161
|
-
"B701": {
|
|
162
|
-
"severity": "3",
|
|
163
|
-
"description": "Using jinja2 templates with autoescape=False is dangerous and can lead to XSS. Ensure autoescape=True or use the select autoescape function to mitigate XSS vulnerabilities.",
|
|
164
|
-
"categories": ["security"],
|
|
165
|
-
"title": "jinja2 autoescape false"
|
|
166
|
-
},
|
|
167
|
-
"B702": {
|
|
168
|
-
"severity": "2",
|
|
169
|
-
"description": "Mako templates allow HTML/JS rendering by default and are inherently open to XSS attacks. Ensure variables in all templates are properly sanitized via the 'n', 'h' or 'x' flags (depending on context). For example, to HTML escape the variable 'data' do ${ data |h }.",
|
|
170
|
-
"categories": ["security"],
|
|
171
|
-
"title": "use of mako templates"
|
|
172
|
-
},
|
|
173
|
-
"B308": {
|
|
174
|
-
"severity": "2",
|
|
175
|
-
"description": "Use of mark safe() may expose cross-site scripting vulnerabilities and should be reviewed.",
|
|
176
|
-
"categories": ["security"],
|
|
177
|
-
"title": "blacklist"
|
|
178
|
-
},
|
|
179
|
-
"B703": {
|
|
180
|
-
"severity": "2",
|
|
181
|
-
"description": "Potential XSS on mark safe function.",
|
|
182
|
-
"categories": ["security"],
|
|
183
|
-
"title": "django mark safe"
|
|
184
|
-
},
|
|
185
|
-
"B302": {
|
|
186
|
-
"severity": "2",
|
|
187
|
-
"description": "Deserialization with the marshal module is possibly dangerous.",
|
|
188
|
-
"categories": ["security"],
|
|
189
|
-
"title": "blacklist"
|
|
190
|
-
},
|
|
191
|
-
"B306": {
|
|
192
|
-
"severity": "2",
|
|
193
|
-
"description": "Use of insecure and deprecated function (mktemp).",
|
|
194
|
-
"categories": ["security"],
|
|
195
|
-
"title": "blacklist"
|
|
196
|
-
},
|
|
197
|
-
"B506": {
|
|
198
|
-
"severity": "2",
|
|
199
|
-
"description": "Use of unsafe yaml load. Allows instantiation of arbitrary objects. Consider yaml.safe load().",
|
|
200
|
-
"categories": ["security"],
|
|
201
|
-
"title": "yaml load"
|
|
202
|
-
},
|
|
203
|
-
"B317": {
|
|
204
|
-
"severity": "2",
|
|
205
|
-
"description": "Using xml.sax.make parser to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.sax.make parser with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
206
|
-
"categories": ["security"],
|
|
207
|
-
"title": "blacklist"
|
|
208
|
-
},
|
|
209
|
-
"B103": {
|
|
210
|
-
"severity": "3",
|
|
211
|
-
"description": "Chmod setting a permissive mask 0777 on file (key file).",
|
|
212
|
-
"categories": ["security"],
|
|
213
|
-
"title": "set bad file permissions"
|
|
214
|
-
},
|
|
215
|
-
"B606": {
|
|
216
|
-
"severity": "1",
|
|
217
|
-
"description": "Starting a process without a shell.",
|
|
218
|
-
"categories": ["security"],
|
|
219
|
-
"title": "start process with no shell"
|
|
220
|
-
},
|
|
221
|
-
"B605": {
|
|
222
|
-
"severity": "1",
|
|
223
|
-
"description": "Starting a process with a shell: Seems safe, but may be changed in the future, consider rewriting without shell",
|
|
224
|
-
"categories": ["security"],
|
|
225
|
-
"title": "start process with a shell"
|
|
226
|
-
},
|
|
227
|
-
"B601": {
|
|
228
|
-
"severity": "2",
|
|
229
|
-
"description": "Possible shell injection via Paramiko call, check inputs are properly sanitized.",
|
|
230
|
-
"categories": ["security"],
|
|
231
|
-
"title": "paramiko calls"
|
|
232
|
-
},
|
|
233
|
-
"B603": {
|
|
234
|
-
"severity": "1",
|
|
235
|
-
"description": "subprocess call - check for execution of untrusted input.",
|
|
236
|
-
"categories": ["security"],
|
|
237
|
-
"title": "subprocess without shell equals true"
|
|
238
|
-
},
|
|
239
|
-
"B607": {
|
|
240
|
-
"severity": "1",
|
|
241
|
-
"description": "Starting a process with a partial executable path",
|
|
242
|
-
"categories": ["security"],
|
|
243
|
-
"title": "start process with partial path"
|
|
244
|
-
},
|
|
245
|
-
"B311": {
|
|
246
|
-
"severity": "1",
|
|
247
|
-
"description": "Standard pseudo-random generators are not suitable for security/cryptographic purposes.",
|
|
248
|
-
"categories": ["security"],
|
|
249
|
-
"title": "blacklist"
|
|
250
|
-
},
|
|
251
|
-
"B501": {
|
|
252
|
-
"severity": "3",
|
|
253
|
-
"description": "Requests call with verify=False disabling SSL certificate checks, security issue.",
|
|
254
|
-
"categories": ["security"],
|
|
255
|
-
"title": "request with no cert validation"
|
|
256
|
-
},
|
|
257
|
-
"B608": {
|
|
258
|
-
"severity": "2",
|
|
259
|
-
"description": "Possible SQL injection vector through string-based query construction.",
|
|
260
|
-
"categories": ["security"],
|
|
261
|
-
"title": "hardcoded sql expressions"
|
|
262
|
-
},
|
|
263
|
-
"B502": {
|
|
264
|
-
"severity": "2",
|
|
265
|
-
"description": "Function call with insecure SSL/TLS protocol identified, possible security issue.",
|
|
266
|
-
"categories": ["security"],
|
|
267
|
-
"title": "ssl with bad version"
|
|
268
|
-
},
|
|
269
|
-
"B504": {
|
|
270
|
-
"severity": "1",
|
|
271
|
-
"description": "ssl.wrap socket call with no SSL/TLS protocol version specified, the default SSLv23 could be insecure, possible security issue.",
|
|
272
|
-
"categories": ["security"],
|
|
273
|
-
"title": "ssl with no version"
|
|
274
|
-
},
|
|
275
|
-
"B503": {
|
|
276
|
-
"severity": "2",
|
|
277
|
-
"description": "Function definition identified with insecure SSL/TLS protocol version by default, possible security issue.",
|
|
278
|
-
"categories": ["security"],
|
|
279
|
-
"title": "ssl with bad defaults"
|
|
280
|
-
},
|
|
281
|
-
"B604": {
|
|
282
|
-
"severity": "2",
|
|
283
|
-
"description": "Function call with shell=True parameter identified, possible security issue.",
|
|
284
|
-
"categories": ["security"],
|
|
285
|
-
"title": "any other function with shell equals true"
|
|
286
|
-
},
|
|
287
|
-
"B401": {
|
|
288
|
-
"severity": "3",
|
|
289
|
-
"description": "A telnet-related module is being imported. Telnet is considered insecure. Use SSH or some other encrypted protocol.",
|
|
290
|
-
"categories": ["security"],
|
|
291
|
-
"title": "blacklist"
|
|
292
|
-
},
|
|
293
|
-
"B312": {
|
|
294
|
-
"severity": "3",
|
|
295
|
-
"description": "Telnet-related functions are being called. Telnet is considered insecure. Use SSH or some other encrypted protocol.",
|
|
296
|
-
"categories": ["security"],
|
|
297
|
-
"title": "blacklist"
|
|
298
|
-
},
|
|
299
|
-
"B325": {
|
|
300
|
-
"severity": "2",
|
|
301
|
-
"description": "Use of os.tempnam() and os.tmpnam() is vulnerable to symlink attacks. Consider using tmpfile() instead.",
|
|
302
|
-
"categories": ["security"],
|
|
303
|
-
"title": "blacklist"
|
|
304
|
-
},
|
|
305
|
-
"B112": {
|
|
306
|
-
"severity": "1",
|
|
307
|
-
"description": "Try, Except, Continue detected.",
|
|
308
|
-
"categories": ["security"],
|
|
309
|
-
"title": "try except continue"
|
|
310
|
-
},
|
|
311
|
-
"B110": {
|
|
312
|
-
"severity": "1",
|
|
313
|
-
"description": "Try, Except, Pass detected.",
|
|
314
|
-
"categories": ["security"],
|
|
315
|
-
"title": "try except pass"
|
|
316
|
-
},
|
|
317
|
-
"B323": {
|
|
318
|
-
"severity": "2",
|
|
319
|
-
"description": "By default, Python will create a secure, verified ssl context for use in such classes as HTTPSConnection. However, it still allows using an insecure context via the create unverified context that reverts to the previous behavior that does not validate certificates or perform hostname checks.",
|
|
320
|
-
"categories": ["security"],
|
|
321
|
-
"title": "blacklist"
|
|
322
|
-
},
|
|
323
|
-
"B310": {
|
|
324
|
-
"severity": "2",
|
|
325
|
-
"description": "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.",
|
|
326
|
-
"categories": ["security"],
|
|
327
|
-
"title": "blacklist"
|
|
328
|
-
},
|
|
329
|
-
"B505": {
|
|
330
|
-
"severity": "3",
|
|
331
|
-
"description": "RSA key sizes below 1024 bits are considered breakable. ",
|
|
332
|
-
"categories": ["security"],
|
|
333
|
-
"title": "weak cryptographic key"
|
|
334
|
-
},
|
|
335
|
-
"B609": {
|
|
336
|
-
"severity": "3",
|
|
337
|
-
"description": "Possible wildcard injection in call: subprocess.Popen",
|
|
338
|
-
"categories": ["security"],
|
|
339
|
-
"title": "linux commands wildcard injection"
|
|
340
|
-
},
|
|
341
|
-
"B405": {
|
|
342
|
-
"severity": "1",
|
|
343
|
-
"description": "Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse stdlib() is called.",
|
|
344
|
-
"categories": ["security"],
|
|
345
|
-
"title": "blacklist"
|
|
346
|
-
},
|
|
347
|
-
"B313": {
|
|
348
|
-
"severity": "2",
|
|
349
|
-
"description": "Using xml.etree.cElementTree.XMLParser to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.cElementTree.XMLParser with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
350
|
-
"categories": ["security"],
|
|
351
|
-
"title": "blacklist"
|
|
352
|
-
},
|
|
353
|
-
"B314": {
|
|
354
|
-
"severity": "2",
|
|
355
|
-
"description": "Using xml.etree.ElementTree.XMLParser to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.XMLParser with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
356
|
-
"categories": ["security"],
|
|
357
|
-
"title": "blacklist"
|
|
358
|
-
},
|
|
359
|
-
"B407": {
|
|
360
|
-
"severity": "1",
|
|
361
|
-
"description": "Using xml.dom.expatbuilder to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.dom.expatbuilder with the equivalent defusedxml package, or make sure defusedxml.defuse stdlib() is called.",
|
|
362
|
-
"categories": ["security"],
|
|
363
|
-
"title": "blacklist"
|
|
364
|
-
},
|
|
365
|
-
"B316": {
|
|
366
|
-
"severity": "2",
|
|
367
|
-
"description": "Using xml.dom.expatbuilder.parseString to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.dom.expatbuilder.parseString with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
368
|
-
"categories": ["security"],
|
|
369
|
-
"title": "blacklist"
|
|
370
|
-
},
|
|
371
|
-
"B406": {
|
|
372
|
-
"severity": "1",
|
|
373
|
-
"description": "Using sax to parse untrusted XML data is known to be vulnerable to XML attacks. Replace sax with the equivalent defusedxml package, or make sure defusedxml.defuse stdlib() is called.",
|
|
374
|
-
"categories": ["security"],
|
|
375
|
-
"title": "blacklist"
|
|
376
|
-
},
|
|
377
|
-
"B315": {
|
|
378
|
-
"severity": "2",
|
|
379
|
-
"description": "Using xml.sax.expatreader.create parser to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.sax.expatreader.create parser with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
380
|
-
"categories": ["security"],
|
|
381
|
-
"title": "blacklist"
|
|
382
|
-
},
|
|
383
|
-
"B410": {
|
|
384
|
-
"severity": "1",
|
|
385
|
-
"description": "Using etree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace etree with the equivalent defusedxml package.",
|
|
386
|
-
"categories": ["security"],
|
|
387
|
-
"title": "blacklist"
|
|
388
|
-
},
|
|
389
|
-
"B320": {
|
|
390
|
-
"severity": "2",
|
|
391
|
-
"description": "Using lxml.etree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.fromstring with its defusedxml equivalent function.",
|
|
392
|
-
"categories": ["security"],
|
|
393
|
-
"title": "blacklist"
|
|
394
|
-
},
|
|
395
|
-
"B408": {
|
|
396
|
-
"severity": "1",
|
|
397
|
-
"description": "Using parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace parse with the equivalent defusedxml package, or make sure defusedxml.defuse stdlib() is called.",
|
|
398
|
-
"categories": ["security"],
|
|
399
|
-
"title": "blacklist"
|
|
400
|
-
},
|
|
401
|
-
"B318": {
|
|
402
|
-
"severity": "2",
|
|
403
|
-
"description": "Using xml.dom.minidom.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.dom.minidom.parse with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
404
|
-
"categories": ["security"],
|
|
405
|
-
"title": "blacklist"
|
|
406
|
-
},
|
|
407
|
-
"B409": {
|
|
408
|
-
"severity": "1",
|
|
409
|
-
"description": "Using parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace parse with the equivalent defusedxml package, or make sure defusedxml.defuse stdlib() is called.",
|
|
410
|
-
"categories": ["security"],
|
|
411
|
-
"title": "blacklist"
|
|
412
|
-
},
|
|
413
|
-
"B319": {
|
|
414
|
-
"severity": "2",
|
|
415
|
-
"description": "Using xml.dom.pulldom.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.dom.pulldom.parse with its defusedxml equivalent function or make sure defusedxml.defuse stdlib() is called",
|
|
416
|
-
"categories": ["security"],
|
|
417
|
-
"title": "blacklist"
|
|
418
|
-
},
|
|
419
|
-
"B411": {
|
|
420
|
-
"severity": "3",
|
|
421
|
-
"description": "Using xmlrpclib to parse untrusted XML data is known to be vulnerable to XML attacks. Use defused.xmlrpc.monkey patch() function to monkey-patch xmlrpclib and mitigate XML vulnerabilities.",
|
|
422
|
-
"categories": ["security"],
|
|
423
|
-
"title": "blacklist"
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
from checkmate.lib.analysis.base import BaseAnalyzer
|
|
5
|
-
|
|
6
|
-
import logging
|
|
7
|
-
import os
|
|
8
|
-
import tempfile
|
|
9
|
-
import json
|
|
10
|
-
import subprocess
|
|
11
|
-
|
|
12
|
-
logger = logging.getLogger(__name__)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class BrakemanAnalyzer(BaseAnalyzer):
|
|
16
|
-
|
|
17
|
-
def __init__(self, *args, **kwargs):
|
|
18
|
-
super(BrakemanAnalyzer, self).__init__(*args, **kwargs)
|
|
19
|
-
try:
|
|
20
|
-
result = subprocess.check_output(["brakeman", "--version"],stderr=subprocess.DEVNULL).strip()
|
|
21
|
-
except subprocess.CalledProcessError:
|
|
22
|
-
logger.error(
|
|
23
|
-
"Cannot initialize Brakeman analyzer: Executable is missing, please install it.")
|
|
24
|
-
raise
|
|
25
|
-
|
|
26
|
-
def summarize(self, items):
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
def analyze(self, file_revision):
|
|
30
|
-
issues = []
|
|
31
|
-
tmpdir = "/tmp/"+file_revision.project.pk
|
|
32
|
-
|
|
33
|
-
if not os.path.exists(os.path.dirname(tmpdir+"/"+file_revision.path)):
|
|
34
|
-
try:
|
|
35
|
-
os.makedirs(os.path.dirname(tmpdir+"/"+file_revision.path))
|
|
36
|
-
except OSError as exc: # Guard against race condition
|
|
37
|
-
if exc.errno != errno.EEXIST:
|
|
38
|
-
raise
|
|
39
|
-
result = subprocess.check_output(["rsync -r . "+tmpdir+" --exclude .git"],shell=True).strip()
|
|
40
|
-
|
|
41
|
-
f = open(tmpdir+"/"+file_revision.path, "wb")
|
|
42
|
-
|
|
43
|
-
fout = tempfile.NamedTemporaryFile(suffix=".json", delete=False)
|
|
44
|
-
result = {}
|
|
45
|
-
try:
|
|
46
|
-
with f:
|
|
47
|
-
try:
|
|
48
|
-
f.write(file_revision.get_file_content())
|
|
49
|
-
except UnicodeDecodeError:
|
|
50
|
-
pass
|
|
51
|
-
try:
|
|
52
|
-
result = subprocess.check_output(["brakeman",
|
|
53
|
-
"-q",
|
|
54
|
-
"--path",
|
|
55
|
-
tmpdir,
|
|
56
|
-
"-o",
|
|
57
|
-
fout.name],
|
|
58
|
-
stderr=subprocess.DEVNULL).strip()
|
|
59
|
-
except subprocess.CalledProcessError as e:
|
|
60
|
-
if e.returncode == 2:
|
|
61
|
-
result = e.output
|
|
62
|
-
elif e.returncode == 3:
|
|
63
|
-
pass
|
|
64
|
-
elif e.returncode == 4:
|
|
65
|
-
pass
|
|
66
|
-
else:
|
|
67
|
-
raise
|
|
68
|
-
|
|
69
|
-
with open(fout.name, "r") as f:
|
|
70
|
-
try:
|
|
71
|
-
result = json.load(f)
|
|
72
|
-
except ValueError as e:
|
|
73
|
-
result['warnings'] = []
|
|
74
|
-
pass
|
|
75
|
-
json_result = result
|
|
76
|
-
|
|
77
|
-
for issue in json_result['warnings']:
|
|
78
|
-
|
|
79
|
-
location = (((issue['line'], None),
|
|
80
|
-
(issue['line'], None)),)
|
|
81
|
-
|
|
82
|
-
if ".rb" in file_revision.path and file_revision.path in issue['file']:
|
|
83
|
-
issues.append({
|
|
84
|
-
'code': issue['check_name'],
|
|
85
|
-
'warning_type': issue['warning_type'],
|
|
86
|
-
'location': location,
|
|
87
|
-
'data': issue['message'],
|
|
88
|
-
'file': file_revision.path,
|
|
89
|
-
'line': issue['line'],
|
|
90
|
-
'fingerprint': self.get_fingerprint_from_code(file_revision, location, extra_data=issue['message'])
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
finally:
|
|
94
|
-
# os.unlink(f.name)
|
|
95
|
-
pass
|
|
96
|
-
return {'issues': issues}
|