cycode 3.1.1.dev3__tar.gz → 3.1.1.dev4__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.1.1.dev3 → cycode-3.1.1.dev4}/PKG-INFO +4 -1
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/README.md +3 -0
- cycode-3.1.1.dev4/cycode/__init__.py +1 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/code_scanner.py +2 -32
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/commit_range_scanner.py +8 -1
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_result.py +31 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/code_snippet_syntax.py +19 -16
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/pyproject.toml +1 -1
- cycode-3.1.1.dev3/cycode/__init__.py +0 -1
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/LICENCE +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/__main__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/app.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/aggregation_report.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/detection_excluder.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/remote_url_resolver.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/scan_parameters.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/cli_types.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/config.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/console.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/consts.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/commit_range_documents.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/sca_file_collector.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/logger.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/main.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/models.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/rich_helpers.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/config.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/config.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/headers.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/logger.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/models.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/scan_client.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/logger.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cycode
|
|
3
|
-
Version: 3.1.1.
|
|
3
|
+
Version: 3.1.1.dev4
|
|
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
|
|
@@ -509,6 +509,9 @@ _How to generate a Terraform plan from Terraform configuration file?_
|
|
|
509
509
|
|
|
510
510
|
### Commit History Scan
|
|
511
511
|
|
|
512
|
+
> [!NOTE]
|
|
513
|
+
> Secrets scanning analyzes all commits in the repository history because secrets introduced and later removed can still be leaked or exposed. SCA and SAST scanning focus only on the latest code state and the changes between branches or pull requests. Full commit history scanning is not performed for SCA and SAST.
|
|
514
|
+
|
|
512
515
|
A commit history scan is limited to a local repository’s previous commits, focused on finding any secrets within the commit history, instead of examining the repository’s current state.
|
|
513
516
|
|
|
514
517
|
To execute a commit history scan, execute the following:
|
|
@@ -468,6 +468,9 @@ _How to generate a Terraform plan from Terraform configuration file?_
|
|
|
468
468
|
|
|
469
469
|
### Commit History Scan
|
|
470
470
|
|
|
471
|
+
> [!NOTE]
|
|
472
|
+
> Secrets scanning analyzes all commits in the repository history because secrets introduced and later removed can still be leaked or exposed. SCA and SAST scanning focus only on the latest code state and the changes between branches or pull requests. Full commit history scanning is not performed for SCA and SAST.
|
|
473
|
+
|
|
471
474
|
A commit history scan is limited to a local repository’s previous commits, focused on finding any secrets within the commit history, instead of examining the repository’s current state.
|
|
472
475
|
|
|
473
476
|
To execute a commit history scan, execute the following:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '3.1.1.dev4' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -9,6 +9,7 @@ from cycode.cli.apps.scan.aggregation_report import try_set_aggregation_report_u
|
|
|
9
9
|
from cycode.cli.apps.scan.scan_parameters import get_scan_parameters
|
|
10
10
|
from cycode.cli.apps.scan.scan_result import (
|
|
11
11
|
create_local_scan_result,
|
|
12
|
+
enrich_scan_result_with_data_from_detection_rules,
|
|
12
13
|
get_scan_result,
|
|
13
14
|
get_sync_scan_result,
|
|
14
15
|
print_local_scan_results,
|
|
@@ -77,37 +78,6 @@ def _should_use_sync_flow(command_scan_type: str, scan_type: str, sync_option: b
|
|
|
77
78
|
return True
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
def _enrich_scan_result_with_data_from_detection_rules(
|
|
81
|
-
cycode_client: 'ScanClient', scan_result: ZippedFileScanResult
|
|
82
|
-
) -> None:
|
|
83
|
-
detection_rule_ids = set()
|
|
84
|
-
for detections_per_file in scan_result.detections_per_file:
|
|
85
|
-
for detection in detections_per_file.detections:
|
|
86
|
-
detection_rule_ids.add(detection.detection_rule_id)
|
|
87
|
-
|
|
88
|
-
detection_rules = cycode_client.get_detection_rules(detection_rule_ids)
|
|
89
|
-
detection_rules_by_id = {detection_rule.detection_rule_id: detection_rule for detection_rule in detection_rules}
|
|
90
|
-
|
|
91
|
-
for detections_per_file in scan_result.detections_per_file:
|
|
92
|
-
for detection in detections_per_file.detections:
|
|
93
|
-
detection_rule = detection_rules_by_id.get(detection.detection_rule_id)
|
|
94
|
-
if not detection_rule:
|
|
95
|
-
# we want to make sure that BE returned it. better to not map data instead of failed scan
|
|
96
|
-
continue
|
|
97
|
-
|
|
98
|
-
if not detection.severity and detection_rule.classification_data:
|
|
99
|
-
# it's fine to take the first one, because:
|
|
100
|
-
# - for "secrets" and "iac" there is only one classification rule per-detection rule
|
|
101
|
-
# - for "sca" and "sast" we get severity from detection service
|
|
102
|
-
detection.severity = detection_rule.classification_data[0].severity
|
|
103
|
-
|
|
104
|
-
# detection_details never was typed properly. so not a problem for now
|
|
105
|
-
detection.detection_details['custom_remediation_guidelines'] = detection_rule.custom_remediation_guidelines
|
|
106
|
-
detection.detection_details['remediation_guidelines'] = detection_rule.remediation_guidelines
|
|
107
|
-
detection.detection_details['description'] = detection_rule.description
|
|
108
|
-
detection.detection_details['policy_display_name'] = detection_rule.display_name
|
|
109
|
-
|
|
110
|
-
|
|
111
81
|
def _get_scan_documents_thread_func(
|
|
112
82
|
ctx: typer.Context, is_git_diff: bool, is_commit_range: bool, scan_parameters: dict
|
|
113
83
|
) -> Callable[[list[Document]], tuple[str, CliError, LocalScanResult]]:
|
|
@@ -140,7 +110,7 @@ def _get_scan_documents_thread_func(
|
|
|
140
110
|
should_use_sync_flow,
|
|
141
111
|
)
|
|
142
112
|
|
|
143
|
-
|
|
113
|
+
enrich_scan_result_with_data_from_detection_rules(cycode_client, scan_result)
|
|
144
114
|
|
|
145
115
|
local_scan_result = create_local_scan_result(
|
|
146
116
|
scan_result, batch, command_scan_type, scan_type, severity_threshold
|
|
@@ -13,6 +13,7 @@ from cycode.cli.apps.scan.code_scanner import (
|
|
|
13
13
|
from cycode.cli.apps.scan.scan_parameters import get_scan_parameters
|
|
14
14
|
from cycode.cli.apps.scan.scan_result import (
|
|
15
15
|
create_local_scan_result,
|
|
16
|
+
enrich_scan_result_with_data_from_detection_rules,
|
|
16
17
|
init_default_scan_result,
|
|
17
18
|
print_local_scan_results,
|
|
18
19
|
)
|
|
@@ -120,12 +121,18 @@ def _scan_commit_range_documents(
|
|
|
120
121
|
scan_parameters,
|
|
121
122
|
timeout,
|
|
122
123
|
)
|
|
124
|
+
enrich_scan_result_with_data_from_detection_rules(cycode_client, scan_result)
|
|
123
125
|
|
|
124
126
|
progress_bar.update(ScanProgressBarSection.SCAN)
|
|
125
127
|
progress_bar.set_section_length(ScanProgressBarSection.GENERATE_REPORT, 1)
|
|
126
128
|
|
|
129
|
+
documents_to_scan = to_documents_to_scan
|
|
130
|
+
if scan_type == consts.SAST_SCAN_TYPE:
|
|
131
|
+
# actually for SAST from_documents_to_scan is full files and to_documents_to_scan is diff files
|
|
132
|
+
documents_to_scan = from_documents_to_scan
|
|
133
|
+
|
|
127
134
|
local_scan_result = create_local_scan_result(
|
|
128
|
-
scan_result,
|
|
135
|
+
scan_result, documents_to_scan, scan_command_type, scan_type, severity_threshold
|
|
129
136
|
)
|
|
130
137
|
set_issue_detected_by_scan_results(ctx, [local_scan_result])
|
|
131
138
|
|
|
@@ -179,3 +179,34 @@ def print_local_scan_results(
|
|
|
179
179
|
printer = ctx.obj.get('console_printer')
|
|
180
180
|
printer.update_ctx(ctx)
|
|
181
181
|
printer.print_scan_results(local_scan_results, errors)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def enrich_scan_result_with_data_from_detection_rules(
|
|
185
|
+
cycode_client: 'ScanClient', scan_result: ZippedFileScanResult
|
|
186
|
+
) -> None:
|
|
187
|
+
detection_rule_ids = set()
|
|
188
|
+
for detections_per_file in scan_result.detections_per_file:
|
|
189
|
+
for detection in detections_per_file.detections:
|
|
190
|
+
detection_rule_ids.add(detection.detection_rule_id)
|
|
191
|
+
|
|
192
|
+
detection_rules = cycode_client.get_detection_rules(detection_rule_ids)
|
|
193
|
+
detection_rules_by_id = {detection_rule.detection_rule_id: detection_rule for detection_rule in detection_rules}
|
|
194
|
+
|
|
195
|
+
for detections_per_file in scan_result.detections_per_file:
|
|
196
|
+
for detection in detections_per_file.detections:
|
|
197
|
+
detection_rule = detection_rules_by_id.get(detection.detection_rule_id)
|
|
198
|
+
if not detection_rule:
|
|
199
|
+
# we want to make sure that BE returned it. better to not map data instead of failed scan
|
|
200
|
+
continue
|
|
201
|
+
|
|
202
|
+
if not detection.severity and detection_rule.classification_data:
|
|
203
|
+
# it's fine to take the first one, because:
|
|
204
|
+
# - for "secrets" and "iac" there is only one classification rule per-detection rule
|
|
205
|
+
# - for "sca" and "sast" we get severity from detection service
|
|
206
|
+
detection.severity = detection_rule.classification_data[0].severity
|
|
207
|
+
|
|
208
|
+
# detection_details never was typed properly. so not a problem for now
|
|
209
|
+
detection.detection_details['custom_remediation_guidelines'] = detection_rule.custom_remediation_guidelines
|
|
210
|
+
detection.detection_details['remediation_guidelines'] = detection_rule.remediation_guidelines
|
|
211
|
+
detection.detection_details['description'] = detection_rule.description
|
|
212
|
+
detection.detection_details['policy_display_name'] = detection_rule.display_name
|
|
@@ -25,6 +25,20 @@ def get_detection_line(scan_type: str, detection: 'Detection') -> int:
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
def _get_syntax_highlighted_code(code: str, lexer: str, start_line: int, detection_line: int) -> Syntax:
|
|
29
|
+
return Syntax(
|
|
30
|
+
theme=_SYNTAX_HIGHLIGHT_THEME,
|
|
31
|
+
code=code,
|
|
32
|
+
lexer=lexer,
|
|
33
|
+
line_numbers=True,
|
|
34
|
+
word_wrap=True,
|
|
35
|
+
dedent=True,
|
|
36
|
+
tab_size=2,
|
|
37
|
+
start_line=start_line + 1,
|
|
38
|
+
highlight_lines={detection_line + 1},
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
28
42
|
def _get_code_snippet_syntax_from_file(
|
|
29
43
|
scan_type: str,
|
|
30
44
|
detection: 'Detection',
|
|
@@ -58,18 +72,11 @@ def _get_code_snippet_syntax_from_file(
|
|
|
58
72
|
code_lines_to_render.append(line_content)
|
|
59
73
|
|
|
60
74
|
code_to_render = '\n'.join(code_lines_to_render)
|
|
61
|
-
return
|
|
62
|
-
theme=_SYNTAX_HIGHLIGHT_THEME,
|
|
75
|
+
return _get_syntax_highlighted_code(
|
|
63
76
|
code=code_to_render,
|
|
64
77
|
lexer=Syntax.guess_lexer(document.path, code=code_to_render),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
dedent=True,
|
|
68
|
-
tab_size=2,
|
|
69
|
-
start_line=start_line_index + 1,
|
|
70
|
-
highlight_lines={
|
|
71
|
-
detection_line + 1,
|
|
72
|
-
},
|
|
78
|
+
start_line=start_line_index,
|
|
79
|
+
detection_line=detection_line,
|
|
73
80
|
)
|
|
74
81
|
|
|
75
82
|
|
|
@@ -87,15 +94,11 @@ def _get_code_snippet_syntax_from_git_diff(
|
|
|
87
94
|
violation = line_content[detection_position_in_line : detection_position_in_line + violation_length]
|
|
88
95
|
line_content = line_content.replace(violation, obfuscate_text(violation))
|
|
89
96
|
|
|
90
|
-
return
|
|
91
|
-
theme=_SYNTAX_HIGHLIGHT_THEME,
|
|
97
|
+
return _get_syntax_highlighted_code(
|
|
92
98
|
code=line_content,
|
|
93
99
|
lexer='diff',
|
|
94
|
-
line_numbers=True,
|
|
95
100
|
start_line=detection_line,
|
|
96
|
-
|
|
97
|
-
tab_size=2,
|
|
98
|
-
highlight_lines={detection_line + 1},
|
|
101
|
+
detection_line=detection_line,
|
|
99
102
|
)
|
|
100
103
|
|
|
101
104
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "3.1.1.
|
|
3
|
+
version = "3.1.1.dev4" # 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.1.1.dev3' # 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
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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.1.1.dev3 → cycode-3.1.1.dev4}/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.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/commit_range_documents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/files_collector/sca/base_restore_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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.1.1.dev3 → cycode-3.1.1.dev4}/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
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/cycode/cli/printers/utils/detection_ordering/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.1.1.dev3 → cycode-3.1.1.dev4}/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
|