cycode 1.10.0__tar.gz → 1.10.1.dev1__tar.gz

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 (111) hide show
  1. {cycode-1.10.0 → cycode-1.10.1.dev1}/PKG-INFO +1 -1
  2. cycode-1.10.1.dev1/cycode/__init__.py +1 -0
  3. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/code_scanner.py +8 -35
  4. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/consts.py +0 -2
  5. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/scan_client.py +0 -9
  6. {cycode-1.10.0 → cycode-1.10.1.dev1}/pyproject.toml +1 -1
  7. cycode-1.10.0/cycode/__init__.py +0 -1
  8. {cycode-1.10.0 → cycode-1.10.1.dev1}/README.md +0 -0
  9. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/__init__.py +0 -0
  10. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/__init__.py +0 -0
  11. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/auth/__init__.py +0 -0
  12. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/auth/auth_command.py +0 -0
  13. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/auth/auth_manager.py +0 -0
  14. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/configure/__init__.py +0 -0
  15. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/configure/configure_command.py +0 -0
  16. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/ignore/__init__.py +0 -0
  17. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/ignore/ignore_command.py +0 -0
  18. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/main_cli.py +0 -0
  19. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/__init__.py +0 -0
  20. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/report_command.py +0 -0
  21. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/__init__.py +0 -0
  22. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/common.py +0 -0
  23. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
  24. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
  25. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
  26. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
  27. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
  28. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
  29. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/__init__.py +0 -0
  30. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
  31. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
  32. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/path/__init__.py +0 -0
  33. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/path/path_command.py +0 -0
  34. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
  35. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
  36. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
  37. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
  38. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/repository/__init__.py +0 -0
  39. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
  40. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
  41. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
  42. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
  43. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/scan/scan_command.py +0 -0
  44. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/version/__init__.py +0 -0
  45. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/commands/version/version_command.py +0 -0
  46. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/config.py +0 -0
  47. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/config.yaml +0 -0
  48. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/exceptions/__init__.py +0 -0
  49. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
  50. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
  51. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
  52. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/__init__.py +0 -0
  53. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/excluder.py +0 -0
  54. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
  55. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
  56. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
  57. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
  58. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
  59. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
  60. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
  61. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
  62. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
  63. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
  64. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
  65. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
  66. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
  67. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/main.py +0 -0
  68. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/models.py +0 -0
  69. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/__init__.py +0 -0
  70. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/console_printer.py +0 -0
  71. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/json_printer.py +0 -0
  72. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/printer_base.py +0 -0
  73. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
  74. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
  75. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/table.py +0 -0
  76. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
  77. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
  78. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
  79. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/printers/text_printer.py +0 -0
  80. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/__init__.py +0 -0
  81. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
  82. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
  83. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
  84. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
  85. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
  86. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/__init__.py +0 -0
  87. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/enum_utils.py +0 -0
  88. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/get_api_client.py +0 -0
  89. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/git_proxy.py +0 -0
  90. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/path_utils.py +0 -0
  91. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/progress_bar.py +0 -0
  92. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/scan_batch.py +0 -0
  93. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/scan_utils.py +0 -0
  94. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/shell_executor.py +0 -0
  95. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/string_utils.py +0 -0
  96. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/task_timer.py +0 -0
  97. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
  98. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/__init__.py +0 -0
  99. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/auth_client.py +0 -0
  100. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/client_creator.py +0 -0
  101. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/config.py +0 -0
  102. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/config.yaml +0 -0
  103. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/config_dev.py +0 -0
  104. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/cycode_client.py +0 -0
  105. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
  106. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
  107. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
  108. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/headers.py +0 -0
  109. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/models.py +0 -0
  110. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/report_client.py +0 -0
  111. {cycode-1.10.0 → cycode-1.10.1.dev1}/cycode/cyclient/scan_config_base.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cycode
3
- Version: 1.10.0
3
+ Version: 1.10.1.dev1
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
@@ -0,0 +1 @@
1
+ __version__ = '1.10.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -317,10 +317,14 @@ def scan_documents(
317
317
  errors, local_scan_results = run_parallel_batched_scan(
318
318
  scan_batch_thread_func, documents_to_scan, progress_bar=progress_bar
319
319
  )
320
- aggregation_report_url = _try_get_aggregation_report_url_if_needed(
321
- scan_parameters, context.obj['client'], context.obj['scan_type']
322
- )
323
- set_aggregation_report_url(context, aggregation_report_url)
320
+
321
+ if len(local_scan_results) > 1:
322
+ # if we used more than one batch, we need to fetch aggregate report url
323
+ aggregation_report_url = _try_get_aggregation_report_url_if_needed(
324
+ scan_parameters, context.obj['client'], context.obj['scan_type']
325
+ )
326
+ set_aggregation_report_url(context, aggregation_report_url)
327
+
324
328
  progress_bar.set_section_length(ScanProgressBarSection.GENERATE_REPORT, 1)
325
329
  progress_bar.update(ScanProgressBarSection.GENERATE_REPORT)
326
330
  progress_bar.stop()
@@ -863,8 +867,6 @@ def _get_scan_result(
863
867
  if not scan_details.detections_count:
864
868
  return init_default_scan_result(cycode_client, scan_id, scan_type, should_get_report)
865
869
 
866
- wait_for_detections_creation(cycode_client, scan_type, scan_id, scan_details.detections_count)
867
-
868
870
  scan_detections = cycode_client.get_scan_detections(scan_type, scan_id)
869
871
 
870
872
  return ZippedFileScanResult(
@@ -899,35 +901,6 @@ def _try_get_report_url_if_needed(
899
901
  logger.debug('Failed to get report URL', exc_info=e)
900
902
 
901
903
 
902
- def wait_for_detections_creation(
903
- cycode_client: 'ScanClient', scan_type: str, scan_id: str, expected_detections_count: int
904
- ) -> None:
905
- logger.debug('Waiting for detections to be created')
906
-
907
- scan_persisted_detections_count = 0
908
- polling_timeout = consts.DETECTIONS_COUNT_VERIFICATION_TIMEOUT_IN_SECONDS
909
- end_polling_time = time.time() + polling_timeout
910
-
911
- while time.time() < end_polling_time:
912
- scan_persisted_detections_count = cycode_client.get_scan_detections_count(scan_type, scan_id)
913
- logger.debug(
914
- 'Excepting %s detections, got %s detections (%s more; %s seconds left)',
915
- expected_detections_count,
916
- scan_persisted_detections_count,
917
- expected_detections_count - scan_persisted_detections_count,
918
- round(end_polling_time - time.time()),
919
- )
920
- if scan_persisted_detections_count == expected_detections_count:
921
- return
922
-
923
- time.sleep(consts.DETECTIONS_COUNT_VERIFICATION_WAIT_INTERVAL_IN_SECONDS)
924
-
925
- logger.debug('%s detections has been created', scan_persisted_detections_count)
926
- raise custom_exceptions.ScanAsyncError(
927
- f'Failed to wait for detections to be created after {polling_timeout} seconds'
928
- )
929
-
930
-
931
904
  def _map_detections_per_file(detections: List[dict]) -> List[DetectionsPerFile]:
932
905
  detections_per_files = {}
933
906
  for detection in detections:
@@ -151,8 +151,6 @@ REPORT_POLLING_TIMEOUT_IN_SECONDS_ENV_VAR_NAME = 'REPORT_POLLING_TIMEOUT_IN_SECO
151
151
  SCAN_POLLING_WAIT_INTERVAL_IN_SECONDS = 5
152
152
  DEFAULT_SCAN_POLLING_TIMEOUT_IN_SECONDS = 3600
153
153
  SCAN_POLLING_TIMEOUT_IN_SECONDS_ENV_VAR_NAME = 'SCAN_POLLING_TIMEOUT_IN_SECONDS'
154
- DETECTIONS_COUNT_VERIFICATION_TIMEOUT_IN_SECONDS = 600
155
- DETECTIONS_COUNT_VERIFICATION_WAIT_INTERVAL_IN_SECONDS = 10
156
154
  DEFAULT_SCA_PRE_COMMIT_TIMEOUT_IN_SECONDS = 600
157
155
  SCA_PRE_COMMIT_TIMEOUT_IN_SECONDS_ENV_VAR_NAME = 'SCA_PRE_COMMIT_TIMEOUT_IN_SECONDS'
158
156
 
@@ -245,15 +245,6 @@ class ScanClient:
245
245
 
246
246
  return detections
247
247
 
248
- def get_scan_detections_count_path(self, scan_type: str) -> str:
249
- return f'{self.get_scan_detections_path(scan_type)}/count'
250
-
251
- def get_scan_detections_count(self, scan_type: str, scan_id: str) -> int:
252
- response = self.scan_cycode_client.get(
253
- url_path=self.get_scan_detections_count_path(scan_type), params={'scan_id': scan_id}
254
- )
255
- return response.json().get('count', 0)
256
-
257
248
  def commit_range_zipped_file_scan(
258
249
  self, scan_type: str, zip_file: InMemoryZip, scan_id: str
259
250
  ) -> models.ZippedFileScanResult:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cycode"
3
- version = "1.10.0" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
3
+ version = "1.10.1.dev1" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
4
4
  description = "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning."
5
5
  keywords=["secret-scan", "cycode", "devops", "token", "secret", "security", "cycode", "code"]
6
6
  authors = ["Cycode <support@cycode.com>"]
@@ -1 +0,0 @@
1
- __version__ = '1.10.0' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
File without changes
File without changes