cycode 3.3.1.dev7__tar.gz → 3.4.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.
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/PKG-INFO +1 -1
- cycode-3.4.1.dev1/cycode/__init__.py +1 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/remote_url_resolver.py +34 -5
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_parameters.py +5 -15
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/pyproject.toml +1 -1
- cycode-3.3.1.dev7/cycode/__init__.py +0 -1
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/LICENCE +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/README.md +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/__main__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/app.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/mcp/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/mcp/mcp_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/aggregation_report.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/code_scanner.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/commit_range_scanner.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/detection_excluder.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/scan_result.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/cli_types.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/config.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/console.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/consts.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/commit_range_documents.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/sca_file_collector.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/logger.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/main.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/models.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/code_snippet_syntax.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/rich_helpers.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/config.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/config.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/headers.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/logger.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/models.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/scan_client.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/logger.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '3.4.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -99,17 +99,46 @@ def _try_to_get_plastic_remote_url(path: str) -> Optional[str]:
|
|
|
99
99
|
|
|
100
100
|
def _try_get_git_remote_url(path: str) -> Optional[str]:
|
|
101
101
|
try:
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
repo = git_proxy.get_repo(path, search_parent_directories=True)
|
|
103
|
+
remote_url = repo.remotes[0].config_reader.get('url')
|
|
104
|
+
logger.debug('Found Git remote URL, %s', {'remote_url': remote_url, 'repo_path': repo.working_dir})
|
|
104
105
|
return remote_url
|
|
105
|
-
except Exception:
|
|
106
|
-
logger.debug('Failed to get Git remote URL. Probably not a Git repository')
|
|
106
|
+
except Exception as e:
|
|
107
|
+
logger.debug('Failed to get Git remote URL. Probably not a Git repository', exc_info=e)
|
|
107
108
|
return None
|
|
108
109
|
|
|
109
110
|
|
|
110
|
-
def
|
|
111
|
+
def _try_get_any_remote_url(path: str) -> Optional[str]:
|
|
111
112
|
remote_url = _try_get_git_remote_url(path)
|
|
112
113
|
if not remote_url:
|
|
113
114
|
remote_url = _try_to_get_plastic_remote_url(path)
|
|
114
115
|
|
|
115
116
|
return remote_url
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def get_remote_url_scan_parameter(paths: tuple[str, ...]) -> Optional[str]:
|
|
120
|
+
remote_urls = set()
|
|
121
|
+
for path in paths:
|
|
122
|
+
# FIXME(MarshalX): perf issue. This looping will produce:
|
|
123
|
+
# - len(paths) Git subprocess calls in the worst case
|
|
124
|
+
# - len(paths)*2 Plastic SCM subprocess calls
|
|
125
|
+
remote_url = _try_get_any_remote_url(path)
|
|
126
|
+
if remote_url:
|
|
127
|
+
remote_urls.add(remote_url)
|
|
128
|
+
|
|
129
|
+
if len(remote_urls) == 1:
|
|
130
|
+
# we are resolving remote_url only if all paths belong to the same repo (identical remote URLs),
|
|
131
|
+
# otherwise, the behavior is undefined
|
|
132
|
+
remote_url = remote_urls.pop()
|
|
133
|
+
|
|
134
|
+
logger.debug(
|
|
135
|
+
'Single remote URL found. Scan will be associated with organization, %s', {'remote_url': remote_url}
|
|
136
|
+
)
|
|
137
|
+
return remote_url
|
|
138
|
+
|
|
139
|
+
logger.debug(
|
|
140
|
+
'Multiple different remote URLs found. Scan will not be associated with organization, %s',
|
|
141
|
+
{'remote_urls': remote_urls},
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
return None
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from typing import Optional
|
|
3
2
|
|
|
4
3
|
import typer
|
|
5
4
|
|
|
6
|
-
from cycode.cli.apps.scan.remote_url_resolver import
|
|
5
|
+
from cycode.cli.apps.scan.remote_url_resolver import get_remote_url_scan_parameter
|
|
7
6
|
from cycode.cli.utils.scan_utils import generate_unique_scan_id
|
|
8
7
|
from cycode.logger import get_logger
|
|
9
8
|
|
|
@@ -29,18 +28,9 @@ def get_scan_parameters(ctx: typer.Context, paths: Optional[tuple[str, ...]] = N
|
|
|
29
28
|
|
|
30
29
|
scan_parameters['paths'] = paths
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if not os.path.isdir(paths[0]):
|
|
37
|
-
logger.debug('Path is not a directory, going to ignore remote url')
|
|
38
|
-
return scan_parameters
|
|
39
|
-
|
|
40
|
-
remote_url = try_get_any_remote_url(paths[0])
|
|
41
|
-
if remote_url:
|
|
42
|
-
# TODO(MarshalX): remove hardcode in context
|
|
43
|
-
ctx.obj['remote_url'] = remote_url
|
|
44
|
-
scan_parameters['remote_url'] = remote_url
|
|
31
|
+
remote_url = get_remote_url_scan_parameter(paths)
|
|
32
|
+
# TODO(MarshalX): remove hardcode in context
|
|
33
|
+
ctx.obj['remote_url'] = remote_url
|
|
34
|
+
scan_parameters['remote_url'] = remote_url
|
|
45
35
|
|
|
46
36
|
return scan_parameters
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.4.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__ = '3.3.1.dev7' # 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
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/ai_remediation/ai_remediation_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
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/apps/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
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/exceptions/handle_ai_remediation_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/commit_range_documents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/go/restore_go_dependencies.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
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/files_collector/sca/sca_file_collector.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
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.3.1.dev7 → cycode-3.4.1.dev1}/cycode/cli/printers/utils/detection_ordering/sca_ordering.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
|