cycode 3.1.1.dev1__tar.gz → 3.1.1.dev3__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.dev1 → cycode-3.1.1.dev3}/PKG-INFO +120 -84
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/README.md +119 -83
- cycode-3.1.1.dev3/cycode/__init__.py +1 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/path/path_command.py +2 -2
- cycode-3.1.1.dev3/cycode/cli/apps/scan/aggregation_report.py +42 -0
- cycode-3.1.1.dev3/cycode/cli/apps/scan/code_scanner.py +336 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/commit_history/commit_history_command.py +2 -2
- cycode-3.1.1.dev3/cycode/cli/apps/scan/commit_range_scanner.py +311 -0
- cycode-3.1.1.dev3/cycode/cli/apps/scan/detection_excluder.py +153 -0
- cycode-3.1.1.dev3/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +21 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +18 -17
- cycode-3.1.1.dev3/cycode/cli/apps/scan/remote_url_resolver.py +115 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/repository/repository_command.py +5 -4
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +2 -2
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_command.py +1 -1
- cycode-3.1.1.dev3/cycode/cli/apps/scan/scan_parameters.py +46 -0
- cycode-3.1.1.dev3/cycode/cli/apps/scan/scan_result.py +181 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/consts.py +3 -1
- cycode-3.1.1.dev3/cycode/cli/files_collector/commit_range_documents.py +289 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/path_documents.py +1 -1
- cycode-3.1.1.dev3/cycode/cli/files_collector/repository_documents.py +26 -0
- cycode-3.1.1.dev1/cycode/cli/files_collector/sca/sca_code_scanner.py → cycode-3.1.1.dev3/cycode/cli/files_collector/sca/sca_file_collector.py +59 -65
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/zip_documents.py +3 -3
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/sca_table_printer.py +1 -1
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table_printer.py +1 -1
- cycode-3.1.1.dev3/cycode/cli/printers/utils/__init__.py +5 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/code_snippet_syntax.py +1 -1
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/path_utils.py +8 -0
- cycode-3.1.1.dev3/cycode/cli/utils/scan_utils.py +29 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/scan_client.py +30 -8
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/pyproject.toml +1 -1
- cycode-3.1.1.dev1/cycode/__init__.py +0 -1
- cycode-3.1.1.dev1/cycode/cli/apps/scan/code_scanner.py +0 -1093
- cycode-3.1.1.dev1/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -49
- cycode-3.1.1.dev1/cycode/cli/files_collector/repository_documents.py +0 -146
- cycode-3.1.1.dev1/cycode/cli/printers/utils/__init__.py +0 -8
- cycode-3.1.1.dev1/cycode/cli/utils/scan_utils.py +0 -11
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/LICENCE +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/__main__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/app.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/cli_types.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/config.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/console.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/__init__.py +0 -0
- /cycode-3.1.1.dev1/cycode/cli/files_collector/excluder.py → /cycode-3.1.1.dev3/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/logger.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/main.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/models.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/rich_helpers.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/config.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/config.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/headers.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/logger.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/models.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.1.1.dev1 → cycode-3.1.1.dev3}/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.dev3
|
|
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
|
|
@@ -91,7 +91,8 @@ This guide walks you through both installation and usage.
|
|
|
91
91
|
6. [Ignoring via a config file](#ignoring-via-a-config-file)
|
|
92
92
|
5. [Report command](#report-command)
|
|
93
93
|
1. [Generating SBOM Report](#generating-sbom-report)
|
|
94
|
-
6. [
|
|
94
|
+
6. [Scan logs](#scan-logs)
|
|
95
|
+
7. [Syntax Help](#syntax-help)
|
|
95
96
|
|
|
96
97
|
# Prerequisites
|
|
97
98
|
|
|
@@ -126,9 +127,15 @@ To install the Cycode CLI application on your local machine, perform the followi
|
|
|
126
127
|
brew install cycode
|
|
127
128
|
```
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
- To install from [GitHub Releases](https://github.com/cycodehq/cycode-cli/releases) navigate and download executable for your operating system and architecture, then run the following command:
|
|
130
131
|
|
|
131
|
-
|
|
132
|
+
```bash
|
|
133
|
+
cd /path/to/downloaded/cycode-cli
|
|
134
|
+
chmod +x cycode
|
|
135
|
+
./cycode
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
3. Authenticate CLI. There are three methods to set the Cycode client ID and client secret:
|
|
132
139
|
|
|
133
140
|
- [cycode auth](#using-the-auth-command) (**Recommended**)
|
|
134
141
|
- [cycode configure](#using-the-configure-command)
|
|
@@ -245,7 +252,7 @@ export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
|
|
|
245
252
|
Cycode’s pre-commit hook can be set up within your local repository so that the Cycode CLI application will identify any issues with your code automatically before you commit it to your codebase.
|
|
246
253
|
|
|
247
254
|
> [!NOTE]
|
|
248
|
-
> pre-commit hook is
|
|
255
|
+
> pre-commit hook is not available for IaC scans.
|
|
249
256
|
|
|
250
257
|
Perform the following steps to install the pre-commit hook:
|
|
251
258
|
|
|
@@ -262,19 +269,19 @@ Perform the following steps to install the pre-commit hook:
|
|
|
262
269
|
```yaml
|
|
263
270
|
repos:
|
|
264
271
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
265
|
-
rev: v3.
|
|
272
|
+
rev: v3.2.0
|
|
266
273
|
hooks:
|
|
267
274
|
- id: cycode
|
|
268
275
|
stages:
|
|
269
276
|
- pre-commit
|
|
270
277
|
```
|
|
271
278
|
|
|
272
|
-
4. Modify the created file for your specific needs. Use hook ID `cycode` to enable scan for Secrets. Use hook ID `cycode-sca` to enable SCA scan. If you want to enable
|
|
279
|
+
4. Modify the created file for your specific needs. Use hook ID `cycode` to enable scan for Secrets. Use hook ID `cycode-sca` to enable SCA scan. Use hook ID `cycode-sast` to enable SAST scan. If you want to enable all scanning types, use this configuration:
|
|
273
280
|
|
|
274
281
|
```yaml
|
|
275
282
|
repos:
|
|
276
283
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
277
|
-
rev: v3.
|
|
284
|
+
rev: v3.2.0
|
|
278
285
|
hooks:
|
|
279
286
|
- id: cycode
|
|
280
287
|
stages:
|
|
@@ -282,6 +289,9 @@ Perform the following steps to install the pre-commit hook:
|
|
|
282
289
|
- id: cycode-sca
|
|
283
290
|
stages:
|
|
284
291
|
- pre-commit
|
|
292
|
+
- id: cycode-sast
|
|
293
|
+
stages:
|
|
294
|
+
- pre-commit
|
|
285
295
|
```
|
|
286
296
|
|
|
287
297
|
5. Install Cycode’s hook:
|
|
@@ -308,14 +318,17 @@ Perform the following steps to install the pre-commit hook:
|
|
|
308
318
|
|
|
309
319
|
The following are the options and commands available with the Cycode CLI application:
|
|
310
320
|
|
|
311
|
-
| Option
|
|
312
|
-
|
|
313
|
-
| `-v`, `--verbose`
|
|
314
|
-
| `--no-progress-meter`
|
|
315
|
-
| `--no-update-notifier`
|
|
316
|
-
| `-o`, `--output [text\|json\|table]`
|
|
317
|
-
| `--
|
|
318
|
-
| `--
|
|
321
|
+
| Option | Description |
|
|
322
|
+
|-------------------------------------------------------------------|------------------------------------------------------------------------------------|
|
|
323
|
+
| `-v`, `--verbose` | Show detailed logs. |
|
|
324
|
+
| `--no-progress-meter` | Do not show the progress meter. |
|
|
325
|
+
| `--no-update-notifier` | Do not check CLI for updates. |
|
|
326
|
+
| `-o`, `--output [rich\|text\|json\|table]` | Specify the output type. The default is `rich`. |
|
|
327
|
+
| `--client-id TEXT` | Specify a Cycode client ID for this specific scan execution. |
|
|
328
|
+
| `--client-secret TEXT` | Specify a Cycode client secret for this specific scan execution. |
|
|
329
|
+
| `--install-completion` | Install completion for the current shell.. |
|
|
330
|
+
| `--show-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Show completion for the specified shell, to copy it or customize the installation. |
|
|
331
|
+
| `-h`, `--help` | Show options for given command. |
|
|
319
332
|
|
|
320
333
|
| Command | Description |
|
|
321
334
|
|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -332,20 +345,18 @@ The following are the options and commands available with the Cycode CLI applica
|
|
|
332
345
|
|
|
333
346
|
The Cycode CLI application offers several types of scans so that you can choose the option that best fits your case. The following are the current options and commands available:
|
|
334
347
|
|
|
335
|
-
| Option | Description
|
|
336
|
-
|
|
337
|
-
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`.
|
|
338
|
-
| `--
|
|
339
|
-
| `--
|
|
340
|
-
| `--
|
|
341
|
-
| `--
|
|
342
|
-
| `--
|
|
343
|
-
| `--
|
|
344
|
-
| `--
|
|
345
|
-
| `--
|
|
346
|
-
| `--
|
|
347
|
-
| `--gradle-all-sub-projects` | When specified, Cycode will run gradle restore command for all sub projects. Should run from root project directory ONLY! |
|
|
348
|
-
| `--help` | Show options for given command. |
|
|
348
|
+
| Option | Description |
|
|
349
|
+
|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
350
|
+
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`. |
|
|
351
|
+
| `--show-secret BOOLEAN` | Show secrets in plain text. See [Show/Hide Secrets](#showhide-secrets) section for more details. |
|
|
352
|
+
| `--soft-fail BOOLEAN` | Run scan without failing, always return a non-error status code. See [Soft Fail](#soft-fail) section for more details. |
|
|
353
|
+
| `--severity-threshold [INFO\|LOW\|MEDIUM\|HIGH\|CRITICAL]` | Show only violations at the specified level or higher. |
|
|
354
|
+
| `--sca-scan` | Specify the SCA scan you wish to execute (`package-vulnerabilities`/`license-compliance`). The default is both. |
|
|
355
|
+
| `--monitor` | When specified, the scan results will be recorded in Cycode. |
|
|
356
|
+
| `--cycode-report` | When specified, displays a link to the scan report in the Cycode platform in the console output. |
|
|
357
|
+
| `--no-restore` | When specified, Cycode will not run restore command. Will scan direct dependencies ONLY! |
|
|
358
|
+
| `--gradle-all-sub-projects` | When specified, Cycode will run gradle restore command for all sub projects. Should run from root project directory ONLY! |
|
|
359
|
+
| `--help` | Show options for given command. |
|
|
349
360
|
|
|
350
361
|
| Command | Description |
|
|
351
362
|
|----------------------------------------|-----------------------------------------------------------------|
|
|
@@ -369,16 +380,14 @@ The following command will scan the repository for policy violations that have s
|
|
|
369
380
|
> [!NOTE]
|
|
370
381
|
> This option is only available to SCA scans.
|
|
371
382
|
|
|
372
|
-
To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in an SCA type scan to Cycode
|
|
383
|
+
To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in an SCA type scan to Cycode, add the argument `--monitor` to the scan command.
|
|
373
384
|
|
|
374
385
|
Consider the following example. The following command will scan the repository for SCA policy violations and push them to Cycode:
|
|
375
386
|
|
|
376
387
|
`cycode scan -t sca --monitor repository ~/home/git/codebase`
|
|
377
388
|
|
|
378
|
-
When using this option, the scan results
|
|
389
|
+
When using this option, the scan results will appear in Cycode.
|
|
379
390
|
|
|
380
|
-
> [!WARNING]
|
|
381
|
-
> You must be an `owner` or an `admin` in Cycode to view the knowledge graph page.
|
|
382
391
|
|
|
383
392
|
#### Cycode Report Option
|
|
384
393
|
|
|
@@ -542,15 +551,7 @@ If no issues are found, the scan ends with the following success message:
|
|
|
542
551
|
|
|
543
552
|
`Good job! No issues were found!!! 👏👏👏`
|
|
544
553
|
|
|
545
|
-
If an issue is found, a
|
|
546
|
-
|
|
547
|
-
```bash
|
|
548
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
549
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
550
|
-
0 | @@ -0,0 +1 @@
|
|
551
|
-
1 | +my_password = 'h3l***********350'
|
|
552
|
-
2 |
|
|
553
|
-
```
|
|
554
|
+
If an issue is found, a violation card appears upon completion instead.
|
|
554
555
|
|
|
555
556
|
If an issue is found, review the file in question for the specific line highlighted by the result message. Implement any changes required to resolve the issue, then execute the scan again.
|
|
556
557
|
|
|
@@ -566,15 +567,7 @@ In the following example, a Path Scan is executed against the `cli` subdirectory
|
|
|
566
567
|
|
|
567
568
|
`cycode scan --show-secret path ./cli`
|
|
568
569
|
|
|
569
|
-
The result would then not be obfuscated
|
|
570
|
-
|
|
571
|
-
```bash
|
|
572
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
573
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
574
|
-
0 | @@ -0,0 +1 @@
|
|
575
|
-
1 | +my_password = 'h3110w0r1d!@#$350'
|
|
576
|
-
2 |
|
|
577
|
-
```
|
|
570
|
+
The result would then not be obfuscated.
|
|
578
571
|
|
|
579
572
|
### Soft Fail
|
|
580
573
|
|
|
@@ -590,41 +583,92 @@ Scan results are assigned with a value of exit code `1` when issues are found in
|
|
|
590
583
|
#### Secrets Result Example
|
|
591
584
|
|
|
592
585
|
```bash
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
586
|
+
╭─────────────────────────────────────────────────────────────── Hardcoded generic-password is used ───────────────────────────────────────────────────────────────╮
|
|
587
|
+
│ Violation 12 of 12 │
|
|
588
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
589
|
+
│ │ Severity 🟠 MEDIUM │ │ 34 }; │ │
|
|
590
|
+
│ │ In file /Users/cycodemacuser/NodeGoat/test/s │ │ 35 │ │
|
|
591
|
+
│ │ ecurity/profile-test.js │ │ 36 var sutUserName = "user1"; │ │
|
|
592
|
+
│ │ Secret SHA b4ea3116d868b7c982ee6812cce61727856b │ │ ❱ 37 var sutUserPassword = "Us*****23"; │ │
|
|
593
|
+
│ │ 802b3063cd5aebe7d796988552e0 │ │ 38 │ │
|
|
594
|
+
│ │ Rule ID 68b6a876-4890-4e62-9531-0e687223579f │ │ 39 chrome.setDefaultService(service); │ │
|
|
595
|
+
│ ╰────────────────────────────────────────────────────╯ │ 40 │ │
|
|
596
|
+
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
597
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
598
|
+
│ │ A generic secret or password is an authentication token used to access a computer or application and is assigned to a password variable. │ │
|
|
599
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
600
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
598
601
|
```
|
|
599
602
|
|
|
600
603
|
#### IaC Result Example
|
|
601
604
|
|
|
602
605
|
```bash
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
╭──────────── Enable Content Encoding through the attribute 'MinimumCompressionSize'. This value should be greater than -1 and smaller than 10485760. ─────────────╮
|
|
607
|
+
│ Violation 45 of 110 │
|
|
608
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
609
|
+
│ │ Severity 🟠 MEDIUM │ │ 20 BinaryMediaTypes: │ │
|
|
610
|
+
│ │ In file ...ads-copy/iac/cft/api-gateway/ap │ │ 21 - !Ref binaryMediaType1 │ │
|
|
611
|
+
│ │ i-gateway-rest-api/deploy.yml │ │ 22 - !Ref binaryMediaType2 │ │
|
|
612
|
+
│ │ IaC Provider CloudFormation │ │ ❱ 23 MinimumCompressionSize: -1 │ │
|
|
613
|
+
│ │ Rule ID 33c4b90c-3270-4337-a075-d3109c141b │ │ 24 EndpointConfiguration: │ │
|
|
614
|
+
│ │ 53 │ │ 25 Types: │ │
|
|
615
|
+
│ ╰────────────────────────────────────────────────────╯ │ 26 - EDGE │ │
|
|
616
|
+
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
617
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
618
|
+
│ │ This policy validates the proper configuration of content encoding in AWS API Gateway. Specifically, the policy checks for the attribute │ │
|
|
619
|
+
│ │ 'minimum_compression_size' in API Gateway REST APIs. Correct configuration of this attribute is important for enabling content encoding of API responses for │ │
|
|
620
|
+
│ │ improved API performance and reduced payload sizes. │ │
|
|
621
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
622
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
608
623
|
```
|
|
609
624
|
|
|
610
625
|
#### SCA Result Example
|
|
611
626
|
|
|
612
627
|
```bash
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
628
|
+
╭─────────────────────────────────────────────────────── [CVE-2019-10795] Prototype Pollution in undefsafe ────────────────────────────────────────────────────────╮
|
|
629
|
+
│ Violation 172 of 195 │
|
|
630
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
631
|
+
│ │ Severity 🟠 MEDIUM │ │ 26758 "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", │ │
|
|
632
|
+
│ │ In file /Users/cycodemacuser/Node │ │ 26759 "dev": true │ │
|
|
633
|
+
│ │ Goat/package-lock.json │ │ 26760 }, │ │
|
|
634
|
+
│ │ CVEs CVE-2019-10795 │ │ ❱ 26761 "undefsafe": { │ │
|
|
635
|
+
│ │ Package undefsafe │ │ 26762 "version": "2.0.2", │ │
|
|
636
|
+
│ │ Version 2.0.2 │ │ 26763 "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", │ │
|
|
637
|
+
│ │ First patched version Not fixed │ │ 26764 "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", │ │
|
|
638
|
+
│ │ Dependency path nodemon 1.19.1 -> │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
639
|
+
│ │ undefsafe 2.0.2 │ │
|
|
640
|
+
│ │ Rule ID 9c6a8911-e071-4616-86db-4 │ │
|
|
641
|
+
│ │ 943f2e1df81 │ │
|
|
642
|
+
│ ╰────────────────────────────────────────────────────╯ │
|
|
643
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
644
|
+
│ │ undefsafe before 2.0.3 is vulnerable to Prototype Pollution. The 'a' function could be tricked into adding or modifying properties of Object.prototype using │ │
|
|
645
|
+
│ │ a __proto__ payload. │ │
|
|
646
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
647
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
618
648
|
```
|
|
619
649
|
|
|
620
650
|
#### SAST Result Example
|
|
621
651
|
|
|
622
652
|
```bash
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
653
|
+
╭───────────────────────────────────────────── [CWE-208: Observable Timing Discrepancy] Observable Timing Discrepancy ─────────────────────────────────────────────╮
|
|
654
|
+
│ Violation 24 of 49 │
|
|
655
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
656
|
+
│ │ Severity 🟠 MEDIUM │ │ 173 " including numbers, lowercase and uppercase letters."; │ │
|
|
657
|
+
│ │ In file /Users/cycodemacuser/NodeGoat/app │ │ 174 return false; │ │
|
|
658
|
+
│ │ /routes/session.js │ │ 175 } │ │
|
|
659
|
+
│ │ CWE CWE-208 │ │ ❱ 176 if (password !== verify) { │ │
|
|
660
|
+
│ │ Subcategory Security │ │ 177 errors.verifyError = "Password must match"; │ │
|
|
661
|
+
│ │ Language js │ │ 178 return false; │ │
|
|
662
|
+
│ │ Security Tool Bearer (Powered by Cycode) │ │ 179 } │ │
|
|
663
|
+
│ │ Rule ID 19fbca07-a8e7-4fa6-92ac-a36d15509 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
664
|
+
│ │ fa9 │ │
|
|
665
|
+
│ ╰────────────────────────────────────────────────────╯ │
|
|
666
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
667
|
+
│ │ Observable Timing Discrepancy occurs when the time it takes for certain operations to complete can be measured and observed by attackers. This vulnerability │ │
|
|
668
|
+
│ │ is particularly concerning when operations involve sensitive information, such as password checks or secret comparisons. If attackers can analyze how long │ │
|
|
669
|
+
│ │ these operations take, they might be able to deduce confidential details, putting your data at risk. │ │
|
|
670
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
671
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
628
672
|
```
|
|
629
673
|
|
|
630
674
|
### Company’s Custom Remediation Guidelines
|
|
@@ -651,18 +695,6 @@ The following are the options available for the `cycode ignore` command:
|
|
|
651
695
|
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`). The default value is `secret`. |
|
|
652
696
|
| `-g, --global` | Add an ignore rule and update it in the global `.cycode` config file. |
|
|
653
697
|
|
|
654
|
-
In the following example, a pre-commit scan runs and finds the following:
|
|
655
|
-
|
|
656
|
-
```bash
|
|
657
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
658
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
659
|
-
0 | @@ -0,0 +1 @@
|
|
660
|
-
1 | +my_password = 'h3l***********350'
|
|
661
|
-
2 |
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
If this is a value that is not a valid secret, then use the `cycode ignore` command to ignore the secret by its value, SHA value, specific path, or rule ID. If this is an IaC scan, then you can ignore that result by its path or rule ID.
|
|
665
|
-
|
|
666
698
|
### Ignoring a Secret Value
|
|
667
699
|
|
|
668
700
|
To ignore a specific secret value, you will need to use the `--by-value` flag. This will ignore the given secret value from all future scans. Use the following command to add a secret value to be ignored:
|
|
@@ -879,6 +911,10 @@ To create an SBOM report for a path:\
|
|
|
879
911
|
For example:\
|
|
880
912
|
`cycode report sbom --format spdx-2.3 --include-vulnerabilities --include-dev-dependencies path /path/to/local/project`
|
|
881
913
|
|
|
914
|
+
# Scan Logs
|
|
915
|
+
|
|
916
|
+
All CLI scan are logged in Cycode. The logs can be found under Settings > CLI Logs.
|
|
917
|
+
|
|
882
918
|
# Syntax Help
|
|
883
919
|
|
|
884
920
|
You may add the `--help` argument to any command at any time to see a help message that will display available options and their syntax.
|