cycode 1.7.1.dev9__py3-none-any.whl → 1.7.2.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.
cycode/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.7.1.dev9' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
1
+ __version__ = '1.7.2.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
cycode/cli/main.py CHANGED
@@ -1,4 +1,11 @@
1
+ from multiprocessing import freeze_support
2
+
1
3
  from cycode.cli.commands.main_cli import main_cli
2
4
 
3
5
  if __name__ == '__main__':
6
+ # DO NOT REMOVE OR MOVE THIS LINE
7
+ # this is required to support multiprocessing in executables files packaged with PyInstaller
8
+ # see https://pyinstaller.org/en/latest/common-issues-and-pitfalls.html#multi-processing
9
+ freeze_support()
10
+
4
11
  main_cli()
cycode/cli/models.py CHANGED
@@ -2,6 +2,7 @@ from dataclasses import dataclass
2
2
  from enum import Enum
3
3
  from typing import Dict, List, NamedTuple, Optional, Type
4
4
 
5
+ from cycode.cyclient import logger
5
6
  from cycode.cyclient.models import Detection
6
7
 
7
8
 
@@ -42,6 +43,14 @@ class Severity(Enum):
42
43
 
43
44
  return Severity[name].value
44
45
 
46
+ @staticmethod
47
+ def get_member_weight(name: str) -> any:
48
+ weight = Severity.try_get_value(name)
49
+ if weight is None:
50
+ logger.debug(f'missing severity in enum: {name}')
51
+ return -2
52
+ return weight
53
+
45
54
 
46
55
  class CliError(NamedTuple):
47
56
  code: str
@@ -74,7 +74,7 @@ class ScaTablePrinter(TablePrinterBase):
74
74
  @staticmethod
75
75
  def __severity_sort_key(detection: Detection) -> int:
76
76
  severity = detection.detection_details.get('advisory_severity')
77
- return Severity.try_get_value(severity)
77
+ return Severity.get_member_weight(severity)
78
78
 
79
79
  def _sort_detections_by_severity(self, detections: List[Detection]) -> List[Detection]:
80
80
  return sorted(detections, key=self.__severity_sort_key, reverse=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cycode
3
- Version: 1.7.1.dev9
3
+ Version: 1.7.2.dev2
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  Home-page: https://github.com/cycodehq/cycode-cli
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- cycode/__init__.py,sha256=n0R65lgIWi6TtngI_GgcOrl-9KC_XwfRaVd-ZIufbQ4,114
1
+ cycode/__init__.py,sha256=pJ0FRIbgM_qdaMaPQc-BMGDuo0spSrbL2TtxAdeWR0U,114
2
2
  cycode/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  cycode/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cycode/cli/commands/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -59,14 +59,14 @@ cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py,sha256=KpzP-
59
59
  cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py,sha256=k2giuUaJnYAD6LaN04jOqOMT-JB1mP8moyC369XvL7o,3119
60
60
  cycode/cli/files_collector/sca/sca_code_scanner.py,sha256=5pWrMiiGhYDHck9_DCOkFt4_690Y5huIA69Tg1DtYJc,6398
61
61
  cycode/cli/files_collector/zip_documents.py,sha256=N9ox2XV6y7zdVb7bdYHUxpBykrtU7_qmlHnq_AbcwRs,1522
62
- cycode/cli/main.py,sha256=CclLAeHGno2IGgwZEGy3CTEvT_eNx0E59xKZXlNav8s,93
63
- cycode/cli/models.py,sha256=Pvm7KCT131P9gtQ_6XipRuJtTvjYte8mfeVCRH6sfz0,1845
62
+ cycode/cli/main.py,sha256=TWZxfs7nu-zSm1YU4H801T_u16xeV3S-gZcb4gSSD24,387
63
+ cycode/cli/models.py,sha256=WFdVmyTtzT7xBvcWyJPnbXPaAWHOrBrGk_bo7_2iUIM,2123
64
64
  cycode/cli/printers/__init__.py,sha256=ALwAXSZy2lNXWC3NfCIxf8K0F6eFrbZa9PLZwPINi5E,93
65
65
  cycode/cli/printers/console_printer.py,sha256=cNYVTZyusQd0iLoBam5hjOJJAvL3dmMiWHXvI5XJdJ4,2078
66
66
  cycode/cli/printers/json_printer.py,sha256=pw0EZuFSzRYulzsWyKZahyggLEbTJA_XSWdQZWNJIaE,1973
67
67
  cycode/cli/printers/printer_base.py,sha256=tzHVhHghgxFAu1u080UDlvi9RA9-71FG2X0FI4M-MaE,786
68
68
  cycode/cli/printers/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
- cycode/cli/printers/tables/sca_table_printer.py,sha256=jYGZYx1IQOnH5Evk0F-TsvlbuZ0mngk-rOEg_v_H1_Q,8031
69
+ cycode/cli/printers/tables/sca_table_printer.py,sha256=xkywlW_StKUsybVgPkdOZZBeq7uO3676bg4_eqjjcgQ,8035
70
70
  cycode/cli/printers/tables/table.py,sha256=drpHWm49gdraCY_ruYNbLmUuVgYXJvH8v_qLJCsv8_0,2281
71
71
  cycode/cli/printers/tables/table_models.py,sha256=8YkzoSTws2XOTM2PCUqSX099LGWYMh1pIVSmwIv63Ag,480
72
72
  cycode/cli/printers/tables/table_printer.py,sha256=hpRpKCEAwdlNVagBBi6Gb8D-N7QU_pDdNOO3b1I8VVU,5471
@@ -102,7 +102,7 @@ cycode/cyclient/models.py,sha256=T4u_GImzVmX4LmYIwcBrRAkQHEPyIAOLHaJYI63Xzas,122
102
102
  cycode/cyclient/report_client.py,sha256=sNLOm64oaONz-TUBs6fpFfbb7RfxALPS6YBqadMo2-8,3971
103
103
  cycode/cyclient/scan_client.py,sha256=egFt4mXSTQoWZliXwcTbPbrm4FlzS0wH01ULBgijNo0,10705
104
104
  cycode/cyclient/scan_config_base.py,sha256=Amlo2wE0opqhwPy1COQtD--bTOserehZM8EVxl3ZyAo,1296
105
- cycode-1.7.1.dev9.dist-info/METADATA,sha256=sIehCKb-FUr3bmdUnJBrts7mEcEBquzweoEhsueCBN4,45120
106
- cycode-1.7.1.dev9.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
107
- cycode-1.7.1.dev9.dist-info/entry_points.txt,sha256=GKZlS6LtUdABDPd7-o9bwNSI5gYQnyA3qGrFFQKt3Vc,51
108
- cycode-1.7.1.dev9.dist-info/RECORD,,
105
+ cycode-1.7.2.dev2.dist-info/METADATA,sha256=_-Or4dhV1wKP8-Yyyg0CYO3RBhU9L6abi_oojxlfSuQ,45120
106
+ cycode-1.7.2.dev2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
107
+ cycode-1.7.2.dev2.dist-info/entry_points.txt,sha256=GKZlS6LtUdABDPd7-o9bwNSI5gYQnyA3qGrFFQKt3Vc,51
108
+ cycode-1.7.2.dev2.dist-info/RECORD,,