cycode 1.10.8__tar.gz → 1.10.8.dev2__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.
- {cycode-1.10.8 → cycode-1.10.8.dev2}/PKG-INFO +1 -1
- cycode-1.10.8.dev2/cycode/__init__.py +1 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/code_scanner.py +26 -45
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/iac/tf_content_generator.py +2 -14
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/models.py +0 -2
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/scan_client.py +5 -10
- {cycode-1.10.8 → cycode-1.10.8.dev2}/pyproject.toml +1 -1
- cycode-1.10.8/cycode/__init__.py +0 -1
- {cycode-1.10.8 → cycode-1.10.8.dev2}/README.md +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/auth/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/auth/auth_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/auth/auth_manager.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/configure/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/configure/configure_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/ignore/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/ignore/ignore_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/main_cli.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/report_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/common.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/path/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/path/path_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/repository/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/scan_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/version/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/version/version_command.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/config.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/config.yaml +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/consts.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/excluder.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/main.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/sentry.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/__init__.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/auth_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/client_creator.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/config.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/config.yaml +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/config_dev.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/headers.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/models.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/report_client.py +0 -0
- {cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cyclient/scan_config_base.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.10.8.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -487,7 +487,7 @@ def perform_scan(
|
|
|
487
487
|
return perform_scan_sync(cycode_client, zipped_documents, scan_type, scan_parameters)
|
|
488
488
|
|
|
489
489
|
if scan_type in (consts.SCA_SCAN_TYPE, consts.SAST_SCAN_TYPE) or should_use_scan_service:
|
|
490
|
-
return perform_scan_async(cycode_client, zipped_documents, scan_type, scan_parameters
|
|
490
|
+
return perform_scan_async(cycode_client, zipped_documents, scan_type, scan_parameters)
|
|
491
491
|
|
|
492
492
|
if is_commit_range:
|
|
493
493
|
return cycode_client.commit_range_zipped_file_scan(scan_type, zipped_documents, scan_id)
|
|
@@ -500,11 +500,8 @@ def perform_scan_async(
|
|
|
500
500
|
zipped_documents: 'InMemoryZip',
|
|
501
501
|
scan_type: str,
|
|
502
502
|
scan_parameters: dict,
|
|
503
|
-
is_commit_range: bool,
|
|
504
503
|
) -> ZippedFileScanResult:
|
|
505
|
-
scan_async_result = cycode_client.zipped_file_scan_async(
|
|
506
|
-
zipped_documents, scan_type, scan_parameters, is_commit_range=is_commit_range
|
|
507
|
-
)
|
|
504
|
+
scan_async_result = cycode_client.zipped_file_scan_async(zipped_documents, scan_type, scan_parameters)
|
|
508
505
|
logger.debug('Async scan request has been triggered successfully, %s', {'scan_id': scan_async_result.scan_id})
|
|
509
506
|
|
|
510
507
|
return poll_scan_results(
|
|
@@ -525,7 +522,7 @@ def perform_scan_sync(
|
|
|
525
522
|
logger.debug('Sync scan request has been triggered successfully, %s', {'scan_id': scan_results.id})
|
|
526
523
|
return ZippedFileScanResult(
|
|
527
524
|
did_detect=True,
|
|
528
|
-
detections_per_file=
|
|
525
|
+
detections_per_file=_map_detections_per_file(scan_results.detection_messages),
|
|
529
526
|
scan_id=scan_results.id,
|
|
530
527
|
)
|
|
531
528
|
|
|
@@ -870,11 +867,11 @@ def _get_scan_result(
|
|
|
870
867
|
if not scan_details.detections_count:
|
|
871
868
|
return init_default_scan_result(cycode_client, scan_id, scan_type, should_get_report)
|
|
872
869
|
|
|
873
|
-
|
|
870
|
+
scan_detections = cycode_client.get_scan_detections(scan_type, scan_id)
|
|
874
871
|
|
|
875
872
|
return ZippedFileScanResult(
|
|
876
873
|
did_detect=True,
|
|
877
|
-
detections_per_file=
|
|
874
|
+
detections_per_file=_map_detections_per_file(scan_detections),
|
|
878
875
|
scan_id=scan_id,
|
|
879
876
|
report_url=_try_get_report_url_if_needed(cycode_client, should_get_report, scan_id, scan_type),
|
|
880
877
|
)
|
|
@@ -904,58 +901,42 @@ def _try_get_report_url_if_needed(
|
|
|
904
901
|
logger.debug('Failed to get report URL', exc_info=e)
|
|
905
902
|
|
|
906
903
|
|
|
907
|
-
def
|
|
908
|
-
"""Converts list of detections (async flow) to list of DetectionsPerFile objects (sync flow).
|
|
909
|
-
|
|
910
|
-
Args:
|
|
911
|
-
raw_detections: List of detections as is returned from the server.
|
|
912
|
-
|
|
913
|
-
Note:
|
|
914
|
-
This method fakes server response structure
|
|
915
|
-
to be able to use the same logic for both async and sync scans.
|
|
916
|
-
|
|
917
|
-
Note:
|
|
918
|
-
Aggregation is performed by file name and commit ID (if available)
|
|
919
|
-
"""
|
|
904
|
+
def _map_detections_per_file(detections: List[dict]) -> List[DetectionsPerFile]:
|
|
920
905
|
detections_per_files = {}
|
|
921
|
-
for
|
|
906
|
+
for detection in detections:
|
|
922
907
|
try:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
if group_by_key in detections_per_files:
|
|
932
|
-
detections_per_files[group_by_key].append(detection)
|
|
908
|
+
detection['message'] = detection['correlation_message']
|
|
909
|
+
file_name = _get_file_name_from_detection(detection)
|
|
910
|
+
if file_name is None:
|
|
911
|
+
logger.debug('File name is missing from detection with ID %s', detection.get('id'))
|
|
912
|
+
continue
|
|
913
|
+
if detections_per_files.get(file_name) is None:
|
|
914
|
+
detections_per_files[file_name] = [DetectionSchema().load(detection)]
|
|
933
915
|
else:
|
|
934
|
-
detections_per_files[
|
|
916
|
+
detections_per_files[file_name].append(DetectionSchema().load(detection))
|
|
935
917
|
except Exception as e:
|
|
936
918
|
logger.debug('Failed to parse detection', exc_info=e)
|
|
937
919
|
continue
|
|
938
920
|
|
|
939
921
|
return [
|
|
940
|
-
DetectionsPerFile(file_name=file_name, detections=file_detections
|
|
941
|
-
for
|
|
922
|
+
DetectionsPerFile(file_name=file_name, detections=file_detections)
|
|
923
|
+
for file_name, file_detections in detections_per_files.items()
|
|
942
924
|
]
|
|
943
925
|
|
|
944
926
|
|
|
945
|
-
def _get_file_name_from_detection(
|
|
946
|
-
|
|
927
|
+
def _get_file_name_from_detection(detection: dict) -> str:
|
|
928
|
+
if detection.get('category') == 'SAST':
|
|
929
|
+
return detection['detection_details']['file_path']
|
|
947
930
|
|
|
948
|
-
if category == '
|
|
949
|
-
return
|
|
950
|
-
if category == 'SecretDetection':
|
|
951
|
-
return _get_secret_file_name_from_detection(raw_detection)
|
|
931
|
+
if detection.get('category') == 'SecretDetection':
|
|
932
|
+
return _get_secret_file_name_from_detection(detection)
|
|
952
933
|
|
|
953
|
-
return
|
|
934
|
+
return detection['detection_details']['file_name']
|
|
954
935
|
|
|
955
936
|
|
|
956
|
-
def _get_secret_file_name_from_detection(
|
|
957
|
-
file_path: str =
|
|
958
|
-
file_name: str =
|
|
937
|
+
def _get_secret_file_name_from_detection(detection: dict) -> str:
|
|
938
|
+
file_path: str = detection['detection_details']['file_path']
|
|
939
|
+
file_name: str = detection['detection_details']['file_name']
|
|
959
940
|
return os.path.join(file_path, file_name)
|
|
960
941
|
|
|
961
942
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import time
|
|
3
|
+
import uuid
|
|
3
4
|
from typing import List
|
|
4
5
|
|
|
5
6
|
from cycode.cli import consts
|
|
@@ -43,7 +44,7 @@ def _generate_tf_content(resource_changes: List[ResourceChange]) -> str:
|
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
def _generate_resource_content(resource_change: ResourceChange) -> str:
|
|
46
|
-
resource_content = f'resource "{resource_change.resource_type}" "{
|
|
47
|
+
resource_content = f'resource "{resource_change.resource_type}" "{resource_change.name}-{uuid.uuid4()}" {{\n'
|
|
47
48
|
if resource_change.values is not None:
|
|
48
49
|
for key, value in resource_change.values.items():
|
|
49
50
|
resource_content += f' {key} = {json.dumps(value)}\n'
|
|
@@ -51,17 +52,6 @@ def _generate_resource_content(resource_change: ResourceChange) -> str:
|
|
|
51
52
|
return resource_content
|
|
52
53
|
|
|
53
54
|
|
|
54
|
-
def _get_resource_name(resource_change: ResourceChange) -> str:
|
|
55
|
-
parts = [resource_change.module_address, resource_change.name]
|
|
56
|
-
|
|
57
|
-
if resource_change.index is not None:
|
|
58
|
-
parts.append(str(resource_change.index))
|
|
59
|
-
|
|
60
|
-
valid_parts = [part for part in parts if part]
|
|
61
|
-
|
|
62
|
-
return '.'.join(valid_parts)
|
|
63
|
-
|
|
64
|
-
|
|
65
55
|
def _extract_resources(tfplan: str, filename: str) -> List[ResourceChange]:
|
|
66
56
|
tfplan_json = load_json(tfplan)
|
|
67
57
|
resources: List[ResourceChange] = []
|
|
@@ -70,10 +60,8 @@ def _extract_resources(tfplan: str, filename: str) -> List[ResourceChange]:
|
|
|
70
60
|
for resource_change in resource_changes:
|
|
71
61
|
resources.append(
|
|
72
62
|
ResourceChange(
|
|
73
|
-
module_address=resource_change.get('module_address'),
|
|
74
63
|
resource_type=resource_change['type'],
|
|
75
64
|
name=resource_change['name'],
|
|
76
|
-
index=resource_change.get('index'),
|
|
77
65
|
actions=resource_change['change']['actions'],
|
|
78
66
|
values=resource_change['change']['after'],
|
|
79
67
|
)
|
|
@@ -126,16 +126,11 @@ class ScanClient:
|
|
|
126
126
|
scan_type: str,
|
|
127
127
|
scan_parameters: dict,
|
|
128
128
|
is_git_diff: bool = False,
|
|
129
|
-
is_commit_range: bool = False,
|
|
130
129
|
) -> models.ScanInitializationResponse:
|
|
131
130
|
files = {'file': ('multiple_files_scan.zip', zip_file.read())}
|
|
132
131
|
response = self.scan_cycode_client.post(
|
|
133
132
|
url_path=self.get_zipped_file_scan_async_url_path(scan_type),
|
|
134
|
-
data={
|
|
135
|
-
'is_git_diff': is_git_diff,
|
|
136
|
-
'scan_parameters': json.dumps(scan_parameters),
|
|
137
|
-
'is_commit_range': is_commit_range,
|
|
138
|
-
},
|
|
133
|
+
data={'is_git_diff': is_git_diff, 'scan_parameters': json.dumps(scan_parameters)},
|
|
139
134
|
files=files,
|
|
140
135
|
)
|
|
141
136
|
return models.ScanInitializationResponseSchema().load(response.json())
|
|
@@ -225,12 +220,12 @@ class ScanClient:
|
|
|
225
220
|
def get_scan_detections_list_path(self, scan_type: str) -> str:
|
|
226
221
|
return f'{self.get_scan_detections_path(scan_type)}{self.get_scan_detections_list_path_suffix(scan_type)}'
|
|
227
222
|
|
|
228
|
-
def
|
|
223
|
+
def get_scan_detections(self, scan_type: str, scan_id: str) -> List[dict]:
|
|
229
224
|
params = {'scan_id': scan_id}
|
|
230
225
|
|
|
231
226
|
page_size = 200
|
|
232
227
|
|
|
233
|
-
|
|
228
|
+
detections = []
|
|
234
229
|
|
|
235
230
|
page_number = 0
|
|
236
231
|
last_response_size = 0
|
|
@@ -243,12 +238,12 @@ class ScanClient:
|
|
|
243
238
|
params=params,
|
|
244
239
|
hide_response_content_log=self._hide_response_log,
|
|
245
240
|
).json()
|
|
246
|
-
|
|
241
|
+
detections.extend(response)
|
|
247
242
|
|
|
248
243
|
page_number += 1
|
|
249
244
|
last_response_size = len(response)
|
|
250
245
|
|
|
251
|
-
return
|
|
246
|
+
return detections
|
|
252
247
|
|
|
253
248
|
def commit_range_zipped_file_scan(
|
|
254
249
|
self, scan_type: str, zip_file: InMemoryZip, scan_id: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "1.10.8" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
3
|
+
version = "1.10.8.dev2" # 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>"]
|
cycode-1.10.8/cycode/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.10.8' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/report/sbom/repository_url/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.10.8 → cycode-1.10.8.dev2}/cycode/cli/commands/scan/repository/repository_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|