checkmate5 5.1.0.dev1__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.
Files changed (56) hide show
  1. checkmate/settings/defaults.py +0 -28
  2. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/METADATA +1 -1
  3. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/RECORD +7 -56
  4. checkmate/contrib/plugins/all/opengrep/__init__.py +0 -0
  5. checkmate/contrib/plugins/all/opengrep/analyzer.py +0 -150
  6. checkmate/contrib/plugins/all/opengrep/issues_data.py +0 -5
  7. checkmate/contrib/plugins/all/opengrep/opengrep_manylinux_x86 +0 -0
  8. checkmate/contrib/plugins/all/opengrep/setup.py +0 -13
  9. checkmate/contrib/plugins/cve/__init__.py +0 -0
  10. checkmate/contrib/plugins/cve/text4shell/__init__.py +0 -0
  11. checkmate/contrib/plugins/cve/text4shell/analyzer.py +0 -64
  12. checkmate/contrib/plugins/cve/text4shell/issues_data.py +0 -8
  13. checkmate/contrib/plugins/cve/text4shell/setup.py +0 -13
  14. checkmate/contrib/plugins/golang/__init__.py +0 -0
  15. checkmate/contrib/plugins/golang/gostaticcheck/__init__.py +0 -0
  16. checkmate/contrib/plugins/golang/gostaticcheck/analyzer.py +0 -94
  17. checkmate/contrib/plugins/golang/gostaticcheck/issues_data.py +0 -1246
  18. checkmate/contrib/plugins/golang/gostaticcheck/setup.py +0 -13
  19. checkmate/contrib/plugins/iac/__init__.py +0 -0
  20. checkmate/contrib/plugins/iac/kubescape/__init__.py +0 -0
  21. checkmate/contrib/plugins/iac/kubescape/analyzer.py +0 -115
  22. checkmate/contrib/plugins/iac/kubescape/issues_data.py +0 -636
  23. checkmate/contrib/plugins/iac/kubescape/setup.py +0 -14
  24. checkmate/contrib/plugins/iac/tfsec/__init__.py +0 -0
  25. checkmate/contrib/plugins/iac/tfsec/analyzer.py +0 -92
  26. checkmate/contrib/plugins/iac/tfsec/issues_data.py +0 -1917
  27. checkmate/contrib/plugins/iac/tfsec/setup.py +0 -13
  28. checkmate/contrib/plugins/java/__init__.py +0 -0
  29. checkmate/contrib/plugins/java/semgrepjava/__init__.py +0 -0
  30. checkmate/contrib/plugins/java/semgrepjava/analyzer.py +0 -96
  31. checkmate/contrib/plugins/java/semgrepjava/issues_data.py +0 -5
  32. checkmate/contrib/plugins/java/semgrepjava/setup.py +0 -13
  33. checkmate/contrib/plugins/javascript/__init__.py +0 -0
  34. checkmate/contrib/plugins/javascript/semgrepeslint/__init__.py +0 -0
  35. checkmate/contrib/plugins/javascript/semgrepeslint/analyzer.py +0 -95
  36. checkmate/contrib/plugins/javascript/semgrepeslint/issues_data.py +0 -6
  37. checkmate/contrib/plugins/javascript/semgrepeslint/setup.py +0 -13
  38. checkmate/contrib/plugins/perl/__init__.py +0 -0
  39. checkmate/contrib/plugins/perl/graudit/__init__.py +0 -0
  40. checkmate/contrib/plugins/perl/graudit/analyzer.py +0 -70
  41. checkmate/contrib/plugins/perl/graudit/issues_data.py +0 -8
  42. checkmate/contrib/plugins/perl/graudit/setup.py +0 -13
  43. checkmate/contrib/plugins/python/__init__.py +0 -0
  44. checkmate/contrib/plugins/python/bandit/__init__.py +0 -0
  45. checkmate/contrib/plugins/python/bandit/analyzer.py +0 -74
  46. checkmate/contrib/plugins/python/bandit/issues_data.py +0 -426
  47. checkmate/contrib/plugins/python/bandit/setup.py +0 -13
  48. checkmate/contrib/plugins/ruby/__init__.py +0 -0
  49. checkmate/contrib/plugins/ruby/brakeman/__init__.py +0 -0
  50. checkmate/contrib/plugins/ruby/brakeman/analyzer.py +0 -96
  51. checkmate/contrib/plugins/ruby/brakeman/issues_data.py +0 -518
  52. checkmate/contrib/plugins/ruby/brakeman/setup.py +0 -13
  53. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/WHEEL +0 -0
  54. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/entry_points.txt +0 -0
  55. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/licenses/LICENSE.txt +0 -0
  56. {checkmate5-5.1.0.dev1.dist-info → checkmate5-5.1.0.dev2.dist-info}/top_level.txt +0 -0
@@ -1,92 +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 TfsecAnalyzer(BaseAnalyzer):
16
-
17
- def __init__(self, *args, **kwargs):
18
- super(TfsecAnalyzer, self).__init__(*args, **kwargs)
19
- try:
20
- result = subprocess.check_output(
21
- ["tfsec", "--version"],stderr=subprocess.DEVNULL).strip()
22
- except subprocess.CalledProcessError:
23
- logger.error(
24
- "Cannot initialize tfsec analyzer: Executable is missing, please install it.")
25
- raise
26
-
27
- def summarize(self, items):
28
- pass
29
-
30
- def analyze(self, file_revision):
31
- issues = []
32
- tmpdir = "/tmp/"+file_revision.project.pk
33
-
34
- if not os.path.exists(os.path.dirname(tmpdir+"/"+file_revision.path)):
35
- try:
36
- os.makedirs(os.path.dirname(tmpdir+"/"+file_revision.path))
37
- except OSError as exc: # Guard against race condition
38
- if exc.errno != errno.EEXIST:
39
- raise
40
-
41
- result = subprocess.check_output(["rsync -r . "+tmpdir+" --exclude .git"],shell=True).strip()
42
-
43
- f = open(tmpdir+"/"+file_revision.path, "wb")
44
-
45
- fout = tempfile.NamedTemporaryFile(suffix=".json", delete=False)
46
- result = {}
47
- try:
48
- with f:
49
- try:
50
- f.write(file_revision.get_file_content())
51
- except UnicodeDecodeError:
52
- pass
53
- try:
54
- result = subprocess.check_output(["tfsec",
55
- "-f",
56
- "json",
57
- tmpdir],
58
- stderr=subprocess.DEVNULL).strip()
59
- except subprocess.CalledProcessError as e:
60
- if e.returncode == 1:
61
- result = e.output
62
- pass
63
- elif e.returncode == 3:
64
- result = []
65
- pass
66
- else:
67
- #print((e.returncode))
68
- result = e.output
69
- pass
70
-
71
- try:
72
- json_result = json.loads(result)
73
-
74
- for issue in json_result['results']:
75
-
76
- line = issue['location']['start_line']
77
- location = (((line, None),
78
- (line, None)),)
79
-
80
- issues.append({
81
- 'code': issue['rule_id'],
82
- 'location': location,
83
- 'data': issue['rule_description'],
84
- 'file': file_revision.path,
85
- 'line': line,
86
- 'fingerprint': self.get_fingerprint_from_code(file_revision, location, extra_data=issue['rule_description'])
87
- })
88
- except:
89
- pass
90
-
91
- finally:
92
- return {'issues': issues}