cycode 3.8.9__tar.gz → 3.8.10.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.8.9 → cycode-3.8.10.dev1}/PKG-INFO +1 -1
- cycode-3.8.10.dev1/cycode/__init__.py +1 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/table_printer.py +3 -1
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/code_snippet_syntax.py +3 -1
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/rich_helpers.py +3 -1
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/string_utils.py +9 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/pyproject.toml +1 -1
- cycode-3.8.9/cycode/__init__.py +0 -1
- {cycode-3.8.9 → cycode-3.8.10.dev1}/LICENCE +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/README.md +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/__main__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/app.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/mcp/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/mcp/mcp_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report_import/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report_import/report_import_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report_import/sbom/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/report_import/sbom/sbom_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/aggregation_report.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/code_scanner.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/commit_range_scanner.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/detection_excluder.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_push/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_push/pre_push_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/remote_url_resolver.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_parameters.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/scan_result.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/cli_types.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/config.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/console.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/consts.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/commit_range_documents.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/documents_walk_ignore.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/sca_file_collector.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/logger.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/main.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/models.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/url_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/config.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/base_token_auth_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/config.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/cycode_oidc_based_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/headers.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/import_sbom_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/logger.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/models.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/scan_client.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/logger.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '3.8.10.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -8,7 +8,7 @@ from cycode.cli.printers.tables.table_models import ColumnInfoBuilder
|
|
|
8
8
|
from cycode.cli.printers.tables.table_printer_base import TablePrinterBase
|
|
9
9
|
from cycode.cli.printers.utils import is_git_diff_based_scan
|
|
10
10
|
from cycode.cli.printers.utils.detection_ordering.common_ordering import sort_and_group_detections_from_scan_result
|
|
11
|
-
from cycode.cli.utils.string_utils import get_position_in_line, obfuscate_text
|
|
11
|
+
from cycode.cli.utils.string_utils import get_position_in_line, obfuscate_text, sanitize_text_for_encoding
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
14
|
from cycode.cli.models import LocalScanResult
|
|
@@ -96,6 +96,8 @@ class TablePrinter(TablePrinterBase):
|
|
|
96
96
|
if not self.show_secret:
|
|
97
97
|
violation = obfuscate_text(violation)
|
|
98
98
|
|
|
99
|
+
violation = sanitize_text_for_encoding(violation)
|
|
100
|
+
|
|
99
101
|
table.add_cell(LINE_NUMBER_COLUMN, str(detection_line))
|
|
100
102
|
table.add_cell(COLUMN_NUMBER_COLUMN, str(detection_column))
|
|
101
103
|
table.add_cell(VIOLATION_LENGTH_COLUMN, f'{violation_length} chars')
|
|
@@ -5,7 +5,7 @@ from rich.syntax import Syntax
|
|
|
5
5
|
from cycode.cli import consts
|
|
6
6
|
from cycode.cli.console import _SYNTAX_HIGHLIGHT_THEME
|
|
7
7
|
from cycode.cli.printers.utils import is_git_diff_based_scan
|
|
8
|
-
from cycode.cli.utils.string_utils import get_position_in_line, obfuscate_text
|
|
8
|
+
from cycode.cli.utils.string_utils import get_position_in_line, obfuscate_text, sanitize_text_for_encoding
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from cycode.cli.models import Document
|
|
@@ -72,6 +72,7 @@ def _get_code_snippet_syntax_from_file(
|
|
|
72
72
|
code_lines_to_render.append(line_content)
|
|
73
73
|
|
|
74
74
|
code_to_render = '\n'.join(code_lines_to_render)
|
|
75
|
+
code_to_render = sanitize_text_for_encoding(code_to_render)
|
|
75
76
|
return _get_syntax_highlighted_code(
|
|
76
77
|
code=code_to_render,
|
|
77
78
|
lexer=Syntax.guess_lexer(document.path, code=code_to_render),
|
|
@@ -94,6 +95,7 @@ def _get_code_snippet_syntax_from_git_diff(
|
|
|
94
95
|
violation = line_content[detection_position_in_line : detection_position_in_line + violation_length]
|
|
95
96
|
line_content = line_content.replace(violation, obfuscate_text(violation))
|
|
96
97
|
|
|
98
|
+
line_content = sanitize_text_for_encoding(line_content)
|
|
97
99
|
return _get_syntax_highlighted_code(
|
|
98
100
|
code=line_content,
|
|
99
101
|
lexer='diff',
|
|
@@ -5,6 +5,7 @@ from rich.markdown import Markdown
|
|
|
5
5
|
from rich.panel import Panel
|
|
6
6
|
|
|
7
7
|
from cycode.cli.console import console
|
|
8
|
+
from cycode.cli.utils.string_utils import sanitize_text_for_encoding
|
|
8
9
|
|
|
9
10
|
if TYPE_CHECKING:
|
|
10
11
|
from rich.console import RenderableType
|
|
@@ -20,8 +21,9 @@ def get_panel(renderable: 'RenderableType', title: str) -> Panel:
|
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
def get_markdown_panel(markdown_text: str, title: str) -> Panel:
|
|
24
|
+
sanitized_text = sanitize_text_for_encoding(markdown_text.strip())
|
|
23
25
|
return get_panel(
|
|
24
|
-
Markdown(
|
|
26
|
+
Markdown(sanitized_text),
|
|
25
27
|
title=title,
|
|
26
28
|
)
|
|
27
29
|
|
|
@@ -65,3 +65,12 @@ def shortcut_dependency_paths(dependency_paths_list: str) -> str:
|
|
|
65
65
|
result += '\n'
|
|
66
66
|
|
|
67
67
|
return result.rstrip().rstrip(',')
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def sanitize_text_for_encoding(text: str) -> str:
|
|
71
|
+
"""Sanitize text by replacing surrogate characters and invalid UTF-8 sequences.
|
|
72
|
+
|
|
73
|
+
This prevents encoding errors when Rich tries to display the content, especially on Windows.
|
|
74
|
+
Surrogate characters (U+D800 to U+DFFF) cannot be encoded to UTF-8 and will cause errors.
|
|
75
|
+
"""
|
|
76
|
+
return text.encode('utf-8', errors='replace').decode('utf-8')
|
cycode-3.8.9/cycode/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '3.8.9' # 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.8.9 → cycode-3.8.10.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
|
|
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.8.9 → cycode-3.8.10.dev1}/cycode/cli/apps/scan/commit_history/commit_history_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
|
{cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.8.9 → cycode-3.8.10.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
|
{cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/files_collector/sca/sbt/restore_sbt_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
|
|
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.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py
RENAMED
|
File without changes
|
{cycode-3.8.9 → cycode-3.8.10.dev1}/cycode/cli/printers/utils/detection_ordering/common_ordering.py
RENAMED
|
File without changes
|
{cycode-3.8.9 → cycode-3.8.10.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
|
|
File without changes
|
|
File without changes
|