cycode 3.8.1.dev1__tar.gz → 3.8.2.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.1.dev1 → cycode-3.8.2.dev1}/PKG-INFO +1 -1
- cycode-3.8.2.dev1/cycode/__init__.py +1 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +1 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +1 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +1 -1
- cycode-3.8.2.dev1/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +180 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +1 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +1 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +1 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/sca_file_collector.py +5 -1
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/pyproject.toml +1 -1
- cycode-3.8.1.dev1/cycode/__init__.py +0 -1
- cycode-3.8.1.dev1/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -45
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/LICENCE +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/README.md +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/__main__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/app.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/mcp/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/mcp/mcp_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report_import/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report_import/report_import_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report_import/sbom/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report_import/sbom/sbom_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/aggregation_report.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/code_scanner.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/commit_range_scanner.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/detection_excluder.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_push/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_push/pre_push_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/remote_url_resolver.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_parameters.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/scan_result.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/cli_types.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/config.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/console.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/consts.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/commit_range_documents.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/documents_walk_ignore.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/logger.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/main.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/models.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/code_snippet_syntax.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/rich_helpers.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/config.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/base_token_auth_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/config.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/cycode_oidc_based_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/headers.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/import_sbom_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/logger.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/models.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/scan_client.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/logger.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '3.8.2.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -41,7 +41,7 @@ class RestoreGradleDependencies(BaseRestoreDependencies):
|
|
|
41
41
|
def get_lock_file_name(self) -> str:
|
|
42
42
|
return BUILD_GRADLE_DEP_TREE_FILE_NAME
|
|
43
43
|
|
|
44
|
-
def get_lock_file_names(self) -> str:
|
|
44
|
+
def get_lock_file_names(self) -> list[str]:
|
|
45
45
|
return [self.get_lock_file_name()]
|
|
46
46
|
|
|
47
47
|
def get_working_directory(self, document: Document) -> Optional[str]:
|
|
@@ -34,7 +34,7 @@ class RestoreMavenDependencies(BaseRestoreDependencies):
|
|
|
34
34
|
def get_lock_file_name(self) -> str:
|
|
35
35
|
return join_paths('target', MAVEN_CYCLONE_DEP_TREE_FILE_NAME)
|
|
36
36
|
|
|
37
|
-
def get_lock_file_names(self) -> str:
|
|
37
|
+
def get_lock_file_names(self) -> list[str]:
|
|
38
38
|
return [self.get_lock_file_name()]
|
|
39
39
|
|
|
40
40
|
def try_restore_dependencies(self, document: Document) -> Optional[Document]:
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
import typer
|
|
5
|
+
|
|
6
|
+
from cycode.cli.files_collector.sca.base_restore_dependencies import BaseRestoreDependencies, build_dep_tree_path
|
|
7
|
+
from cycode.cli.models import Document
|
|
8
|
+
from cycode.cli.utils.path_utils import get_file_content
|
|
9
|
+
from cycode.logger import get_logger
|
|
10
|
+
|
|
11
|
+
logger = get_logger('NPM Restore Dependencies')
|
|
12
|
+
|
|
13
|
+
NPM_PROJECT_FILE_EXTENSIONS = ['.json']
|
|
14
|
+
NPM_LOCK_FILE_NAME = 'package-lock.json'
|
|
15
|
+
# Alternative lockfiles that should prevent npm install from running
|
|
16
|
+
ALTERNATIVE_LOCK_FILES = ['yarn.lock', 'pnpm-lock.yaml', 'deno.lock']
|
|
17
|
+
NPM_LOCK_FILE_NAMES = [NPM_LOCK_FILE_NAME, *ALTERNATIVE_LOCK_FILES]
|
|
18
|
+
NPM_MANIFEST_FILE_NAME = 'package.json'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class RestoreNpmDependencies(BaseRestoreDependencies):
|
|
22
|
+
def __init__(self, ctx: typer.Context, is_git_diff: bool, command_timeout: int) -> None:
|
|
23
|
+
super().__init__(ctx, is_git_diff, command_timeout)
|
|
24
|
+
|
|
25
|
+
def is_project(self, document: Document) -> bool:
|
|
26
|
+
return any(document.path.endswith(ext) for ext in NPM_PROJECT_FILE_EXTENSIONS)
|
|
27
|
+
|
|
28
|
+
def _resolve_manifest_directory(self, document: Document) -> Optional[str]:
|
|
29
|
+
"""Resolve the directory containing the manifest file.
|
|
30
|
+
|
|
31
|
+
Uses the same path resolution logic as get_manifest_file_path() to ensure consistency.
|
|
32
|
+
Falls back to absolute_path or document.path if needed.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
Directory path if resolved, None otherwise.
|
|
36
|
+
"""
|
|
37
|
+
manifest_file_path = self.get_manifest_file_path(document)
|
|
38
|
+
manifest_dir = os.path.dirname(manifest_file_path) if manifest_file_path else None
|
|
39
|
+
|
|
40
|
+
# Fallback: if manifest_dir is empty or root, try using absolute_path or document.path
|
|
41
|
+
if not manifest_dir or manifest_dir == os.sep or manifest_dir == '.':
|
|
42
|
+
base_path = document.absolute_path if document.absolute_path else document.path
|
|
43
|
+
if base_path:
|
|
44
|
+
manifest_dir = os.path.dirname(base_path)
|
|
45
|
+
|
|
46
|
+
return manifest_dir
|
|
47
|
+
|
|
48
|
+
def _find_existing_lockfile(self, manifest_dir: str) -> tuple[Optional[str], list[str]]:
|
|
49
|
+
"""Find the first existing lockfile in the manifest directory.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
manifest_dir: Directory to search for lockfiles.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Tuple of (lockfile_path if found, list of checked lockfiles with status).
|
|
56
|
+
"""
|
|
57
|
+
lock_file_paths = [os.path.join(manifest_dir, lock_file_name) for lock_file_name in NPM_LOCK_FILE_NAMES]
|
|
58
|
+
|
|
59
|
+
existing_lock_file = None
|
|
60
|
+
checked_lockfiles = []
|
|
61
|
+
for lock_file_path in lock_file_paths:
|
|
62
|
+
lock_file_name = os.path.basename(lock_file_path)
|
|
63
|
+
exists = os.path.isfile(lock_file_path)
|
|
64
|
+
checked_lockfiles.append(f'{lock_file_name}: {"exists" if exists else "not found"}')
|
|
65
|
+
if exists:
|
|
66
|
+
existing_lock_file = lock_file_path
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
return existing_lock_file, checked_lockfiles
|
|
70
|
+
|
|
71
|
+
def _create_document_from_lockfile(self, document: Document, lockfile_path: str) -> Optional[Document]:
|
|
72
|
+
"""Create a Document from an existing lockfile.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
document: Original document (package.json).
|
|
76
|
+
lockfile_path: Path to the existing lockfile.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
Document with lockfile content if successful, None otherwise.
|
|
80
|
+
"""
|
|
81
|
+
lock_file_name = os.path.basename(lockfile_path)
|
|
82
|
+
logger.info(
|
|
83
|
+
'Skipping npm install: using existing lockfile, %s',
|
|
84
|
+
{'path': document.path, 'lockfile': lock_file_name, 'lockfile_path': lockfile_path},
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
relative_restore_file_path = build_dep_tree_path(document.path, lock_file_name)
|
|
88
|
+
restore_file_content = get_file_content(lockfile_path)
|
|
89
|
+
|
|
90
|
+
if restore_file_content is not None:
|
|
91
|
+
logger.debug(
|
|
92
|
+
'Successfully loaded lockfile content, %s',
|
|
93
|
+
{'path': document.path, 'lockfile': lock_file_name, 'content_size': len(restore_file_content)},
|
|
94
|
+
)
|
|
95
|
+
return Document(relative_restore_file_path, restore_file_content, self.is_git_diff)
|
|
96
|
+
|
|
97
|
+
logger.warning(
|
|
98
|
+
'Lockfile exists but could not read content, %s',
|
|
99
|
+
{'path': document.path, 'lockfile': lock_file_name, 'lockfile_path': lockfile_path},
|
|
100
|
+
)
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
def try_restore_dependencies(self, document: Document) -> Optional[Document]:
|
|
104
|
+
"""Override to prevent npm install when any lockfile exists.
|
|
105
|
+
|
|
106
|
+
The base class uses document.absolute_path which might be None or incorrect.
|
|
107
|
+
We need to use the same path resolution logic as get_manifest_file_path()
|
|
108
|
+
to ensure we check for lockfiles in the correct location.
|
|
109
|
+
|
|
110
|
+
If any lockfile exists (package-lock.json, pnpm-lock.yaml, yarn.lock, deno.lock),
|
|
111
|
+
we use it directly without running npm install to avoid generating invalid lockfiles.
|
|
112
|
+
"""
|
|
113
|
+
# Check if this is a project file first (same as base class caller does)
|
|
114
|
+
if not self.is_project(document):
|
|
115
|
+
logger.debug('Skipping restore: document is not recognized as npm project, %s', {'path': document.path})
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
# Resolve the manifest directory
|
|
119
|
+
manifest_dir = self._resolve_manifest_directory(document)
|
|
120
|
+
if not manifest_dir:
|
|
121
|
+
logger.debug(
|
|
122
|
+
'Cannot determine manifest directory, proceeding with base class restore flow, %s',
|
|
123
|
+
{'path': document.path},
|
|
124
|
+
)
|
|
125
|
+
return super().try_restore_dependencies(document)
|
|
126
|
+
|
|
127
|
+
# Check for existing lockfiles
|
|
128
|
+
logger.debug(
|
|
129
|
+
'Checking for existing lockfiles in directory, %s', {'directory': manifest_dir, 'path': document.path}
|
|
130
|
+
)
|
|
131
|
+
existing_lock_file, checked_lockfiles = self._find_existing_lockfile(manifest_dir)
|
|
132
|
+
|
|
133
|
+
logger.debug(
|
|
134
|
+
'Lockfile check results, %s',
|
|
135
|
+
{'path': document.path, 'checked_lockfiles': ', '.join(checked_lockfiles)},
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
# If any lockfile exists, use it directly without running npm install
|
|
139
|
+
if existing_lock_file:
|
|
140
|
+
return self._create_document_from_lockfile(document, existing_lock_file)
|
|
141
|
+
|
|
142
|
+
# No lockfile exists, proceed with the normal restore flow which will run npm install
|
|
143
|
+
logger.info(
|
|
144
|
+
'No existing lockfile found, proceeding with npm install to generate package-lock.json, %s',
|
|
145
|
+
{'path': document.path, 'directory': manifest_dir, 'checked_lockfiles': ', '.join(checked_lockfiles)},
|
|
146
|
+
)
|
|
147
|
+
return super().try_restore_dependencies(document)
|
|
148
|
+
|
|
149
|
+
def get_commands(self, manifest_file_path: str) -> list[list[str]]:
|
|
150
|
+
return [
|
|
151
|
+
[
|
|
152
|
+
'npm',
|
|
153
|
+
'install',
|
|
154
|
+
'--prefix',
|
|
155
|
+
self.prepare_manifest_file_path_for_command(manifest_file_path),
|
|
156
|
+
'--package-lock-only',
|
|
157
|
+
'--ignore-scripts',
|
|
158
|
+
'--no-audit',
|
|
159
|
+
]
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
def get_restored_lock_file_name(self, restore_file_path: str) -> str:
|
|
163
|
+
return os.path.basename(restore_file_path)
|
|
164
|
+
|
|
165
|
+
def get_lock_file_name(self) -> str:
|
|
166
|
+
return NPM_LOCK_FILE_NAME
|
|
167
|
+
|
|
168
|
+
def get_lock_file_names(self) -> list[str]:
|
|
169
|
+
return NPM_LOCK_FILE_NAMES
|
|
170
|
+
|
|
171
|
+
@staticmethod
|
|
172
|
+
def prepare_manifest_file_path_for_command(manifest_file_path: str) -> str:
|
|
173
|
+
# Remove package.json from the path
|
|
174
|
+
if manifest_file_path.endswith(NPM_MANIFEST_FILE_NAME):
|
|
175
|
+
# Use os.path.dirname to handle both Unix (/) and Windows (\) separators
|
|
176
|
+
# This is cross-platform and handles edge cases correctly
|
|
177
|
+
dir_path = os.path.dirname(manifest_file_path)
|
|
178
|
+
# If dir_path is empty or just '.', return an empty string (package.json in current dir)
|
|
179
|
+
return dir_path if dir_path and dir_path != '.' else ''
|
|
180
|
+
return manifest_file_path
|
{cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/sca_file_collector.py
RENAMED
|
@@ -153,7 +153,11 @@ def _add_dependencies_tree_documents(
|
|
|
153
153
|
continue
|
|
154
154
|
|
|
155
155
|
if restore_dependencies_document.path in documents_to_add:
|
|
156
|
-
|
|
156
|
+
# Lockfile was already collected during file discovery, so we skip adding it again
|
|
157
|
+
logger.debug(
|
|
158
|
+
'Lockfile already exists in scan, skipping duplicate document, %s',
|
|
159
|
+
{'path': restore_dependencies_document.path, 'source': 'restore'},
|
|
160
|
+
)
|
|
157
161
|
else:
|
|
158
162
|
logger.debug('Adding dependencies tree document, %s', restore_dependencies_document.path)
|
|
159
163
|
documents_to_add[restore_dependencies_document.path] = restore_dependencies_document
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '3.8.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
import typer
|
|
4
|
-
|
|
5
|
-
from cycode.cli.files_collector.sca.base_restore_dependencies import BaseRestoreDependencies
|
|
6
|
-
from cycode.cli.models import Document
|
|
7
|
-
|
|
8
|
-
NPM_PROJECT_FILE_EXTENSIONS = ['.json']
|
|
9
|
-
NPM_LOCK_FILE_NAME = 'package-lock.json'
|
|
10
|
-
NPM_LOCK_FILE_NAMES = [NPM_LOCK_FILE_NAME, 'yarn.lock', 'pnpm-lock.yaml', 'deno.lock']
|
|
11
|
-
NPM_MANIFEST_FILE_NAME = 'package.json'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class RestoreNpmDependencies(BaseRestoreDependencies):
|
|
15
|
-
def __init__(self, ctx: typer.Context, is_git_diff: bool, command_timeout: int) -> None:
|
|
16
|
-
super().__init__(ctx, is_git_diff, command_timeout)
|
|
17
|
-
|
|
18
|
-
def is_project(self, document: Document) -> bool:
|
|
19
|
-
return any(document.path.endswith(ext) for ext in NPM_PROJECT_FILE_EXTENSIONS)
|
|
20
|
-
|
|
21
|
-
def get_commands(self, manifest_file_path: str) -> list[list[str]]:
|
|
22
|
-
return [
|
|
23
|
-
[
|
|
24
|
-
'npm',
|
|
25
|
-
'install',
|
|
26
|
-
'--prefix',
|
|
27
|
-
self.prepare_manifest_file_path_for_command(manifest_file_path),
|
|
28
|
-
'--package-lock-only',
|
|
29
|
-
'--ignore-scripts',
|
|
30
|
-
'--no-audit',
|
|
31
|
-
]
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
def get_restored_lock_file_name(self, restore_file_path: str) -> str:
|
|
35
|
-
return os.path.basename(restore_file_path)
|
|
36
|
-
|
|
37
|
-
def get_lock_file_name(self) -> str:
|
|
38
|
-
return NPM_LOCK_FILE_NAME
|
|
39
|
-
|
|
40
|
-
def get_lock_file_names(self) -> str:
|
|
41
|
-
return NPM_LOCK_FILE_NAMES
|
|
42
|
-
|
|
43
|
-
@staticmethod
|
|
44
|
-
def prepare_manifest_file_path_for_command(manifest_file_path: str) -> str:
|
|
45
|
-
return manifest_file_path.replace(os.sep + NPM_MANIFEST_FILE_NAME, '')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.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.8.1.dev1 → cycode-3.8.2.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
|
{cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/report_import/report_import_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
|
{cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.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
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.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.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/commit_range_documents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.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.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/files_collector/sca/base_restore_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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-3.8.1.dev1 → cycode-3.8.2.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
|
|
File without changes
|