cycode 3.1.1.dev2__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.dev2 → cycode-3.1.1.dev3}/PKG-INFO +100 -67
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/README.md +99 -66
- cycode-3.1.1.dev3/cycode/__init__.py +1 -0
- {cycode-3.1.1.dev2 → 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.dev2 → 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.dev2 → 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.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/repository/repository_command.py +5 -4
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +2 -2
- {cycode-3.1.1.dev2 → 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.dev2 → 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.dev2 → 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.dev2/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.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/zip_documents.py +3 -3
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/sca_table_printer.py +1 -1
- {cycode-3.1.1.dev2 → 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.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/code_snippet_syntax.py +1 -1
- {cycode-3.1.1.dev2 → 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.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/scan_client.py +30 -8
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/pyproject.toml +1 -1
- cycode-3.1.1.dev2/cycode/__init__.py +0 -1
- cycode-3.1.1.dev2/cycode/cli/apps/scan/code_scanner.py +0 -1093
- cycode-3.1.1.dev2/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -49
- cycode-3.1.1.dev2/cycode/cli/files_collector/repository_documents.py +0 -146
- cycode-3.1.1.dev2/cycode/cli/printers/utils/__init__.py +0 -8
- cycode-3.1.1.dev2/cycode/cli/utils/scan_utils.py +0 -11
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/LICENCE +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/__main__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/app.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_common.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/auth_manager.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/auth/models.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/configure_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/consts.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/messages.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/configure/prompts.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ignore/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/ignore/ignore_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/report_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/common.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/path/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/path/path_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/repository/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/status/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/status/get_cli_status.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/status/models.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/status/status_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/apps/status/version_command.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/cli_types.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/config.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/console.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_errors.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/__init__.py +0 -0
- /cycode-3.1.1.dev2/cycode/cli/files_collector/excluder.py → /cycode-3.1.1.dev3/cycode/cli/files_collector/file_excluder.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/files_collector/walk_ignore.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/logger.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/main.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/models.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/rich_printer.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_data.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/printers/utils/rich_helpers.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/ignore_utils.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/jwt_utils.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/sentry.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/version_checker.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/config.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/__init__.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/auth_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/client_creator.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/config.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/config_dev.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/headers.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/logger.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/models.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/report_client.py +0 -0
- {cycode-3.1.1.dev2 → cycode-3.1.1.dev3}/cycode/cyclient/scan_config_base.py +0 -0
- {cycode-3.1.1.dev2 → 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
|
|
@@ -127,9 +127,15 @@ To install the Cycode CLI application on your local machine, perform the followi
|
|
|
127
127
|
brew install cycode
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
|
|
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:
|
|
131
131
|
|
|
132
|
-
|
|
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:
|
|
133
139
|
|
|
134
140
|
- [cycode auth](#using-the-auth-command) (**Recommended**)
|
|
135
141
|
- [cycode configure](#using-the-configure-command)
|
|
@@ -246,7 +252,7 @@ export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
|
|
|
246
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.
|
|
247
253
|
|
|
248
254
|
> [!NOTE]
|
|
249
|
-
> pre-commit hook is
|
|
255
|
+
> pre-commit hook is not available for IaC scans.
|
|
250
256
|
|
|
251
257
|
Perform the following steps to install the pre-commit hook:
|
|
252
258
|
|
|
@@ -263,19 +269,19 @@ Perform the following steps to install the pre-commit hook:
|
|
|
263
269
|
```yaml
|
|
264
270
|
repos:
|
|
265
271
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
266
|
-
rev: v3.
|
|
272
|
+
rev: v3.2.0
|
|
267
273
|
hooks:
|
|
268
274
|
- id: cycode
|
|
269
275
|
stages:
|
|
270
276
|
- pre-commit
|
|
271
277
|
```
|
|
272
278
|
|
|
273
|
-
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:
|
|
274
280
|
|
|
275
281
|
```yaml
|
|
276
282
|
repos:
|
|
277
283
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
278
|
-
rev: v3.
|
|
284
|
+
rev: v3.2.0
|
|
279
285
|
hooks:
|
|
280
286
|
- id: cycode
|
|
281
287
|
stages:
|
|
@@ -283,6 +289,9 @@ Perform the following steps to install the pre-commit hook:
|
|
|
283
289
|
- id: cycode-sca
|
|
284
290
|
stages:
|
|
285
291
|
- pre-commit
|
|
292
|
+
- id: cycode-sast
|
|
293
|
+
stages:
|
|
294
|
+
- pre-commit
|
|
286
295
|
```
|
|
287
296
|
|
|
288
297
|
5. Install Cycode’s hook:
|
|
@@ -309,14 +318,17 @@ Perform the following steps to install the pre-commit hook:
|
|
|
309
318
|
|
|
310
319
|
The following are the options and commands available with the Cycode CLI application:
|
|
311
320
|
|
|
312
|
-
| Option
|
|
313
|
-
|
|
314
|
-
| `-v`, `--verbose`
|
|
315
|
-
| `--no-progress-meter`
|
|
316
|
-
| `--no-update-notifier`
|
|
317
|
-
| `-o`, `--output [text\|json\|table]`
|
|
318
|
-
| `--
|
|
319
|
-
| `--
|
|
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. |
|
|
320
332
|
|
|
321
333
|
| Command | Description |
|
|
322
334
|
|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -336,8 +348,6 @@ The Cycode CLI application offers several types of scans so that you can choose
|
|
|
336
348
|
| Option | Description |
|
|
337
349
|
|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
338
350
|
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`. |
|
|
339
|
-
| `--client-secret TEXT` | Specify a Cycode client secret for this specific scan execution. |
|
|
340
|
-
| `--client-id TEXT` | Specify a Cycode client ID for this specific scan execution. |
|
|
341
351
|
| `--show-secret BOOLEAN` | Show secrets in plain text. See [Show/Hide Secrets](#showhide-secrets) section for more details. |
|
|
342
352
|
| `--soft-fail BOOLEAN` | Run scan without failing, always return a non-error status code. See [Soft Fail](#soft-fail) section for more details. |
|
|
343
353
|
| `--severity-threshold [INFO\|LOW\|MEDIUM\|HIGH\|CRITICAL]` | Show only violations at the specified level or higher. |
|
|
@@ -541,15 +551,7 @@ If no issues are found, the scan ends with the following success message:
|
|
|
541
551
|
|
|
542
552
|
`Good job! No issues were found!!! 👏👏👏`
|
|
543
553
|
|
|
544
|
-
If an issue is found, a
|
|
545
|
-
|
|
546
|
-
```bash
|
|
547
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
548
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
549
|
-
0 | @@ -0,0 +1 @@
|
|
550
|
-
1 | +my_password = 'h3l***********350'
|
|
551
|
-
2 |
|
|
552
|
-
```
|
|
554
|
+
If an issue is found, a violation card appears upon completion instead.
|
|
553
555
|
|
|
554
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.
|
|
555
557
|
|
|
@@ -565,15 +567,7 @@ In the following example, a Path Scan is executed against the `cli` subdirectory
|
|
|
565
567
|
|
|
566
568
|
`cycode scan --show-secret path ./cli`
|
|
567
569
|
|
|
568
|
-
The result would then not be obfuscated
|
|
569
|
-
|
|
570
|
-
```bash
|
|
571
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
572
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
573
|
-
0 | @@ -0,0 +1 @@
|
|
574
|
-
1 | +my_password = 'h3110w0r1d!@#$350'
|
|
575
|
-
2 |
|
|
576
|
-
```
|
|
570
|
+
The result would then not be obfuscated.
|
|
577
571
|
|
|
578
572
|
### Soft Fail
|
|
579
573
|
|
|
@@ -589,41 +583,92 @@ Scan results are assigned with a value of exit code `1` when issues are found in
|
|
|
589
583
|
#### Secrets Result Example
|
|
590
584
|
|
|
591
585
|
```bash
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
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
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
597
601
|
```
|
|
598
602
|
|
|
599
603
|
#### IaC Result Example
|
|
600
604
|
|
|
601
605
|
```bash
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
607
623
|
```
|
|
608
624
|
|
|
609
625
|
#### SCA Result Example
|
|
610
626
|
|
|
611
627
|
```bash
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
617
648
|
```
|
|
618
649
|
|
|
619
650
|
#### SAST Result Example
|
|
620
651
|
|
|
621
652
|
```bash
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
627
672
|
```
|
|
628
673
|
|
|
629
674
|
### Company’s Custom Remediation Guidelines
|
|
@@ -650,18 +695,6 @@ The following are the options available for the `cycode ignore` command:
|
|
|
650
695
|
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`). The default value is `secret`. |
|
|
651
696
|
| `-g, --global` | Add an ignore rule and update it in the global `.cycode` config file. |
|
|
652
697
|
|
|
653
|
-
In the following example, a pre-commit scan runs and finds the following:
|
|
654
|
-
|
|
655
|
-
```bash
|
|
656
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
657
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
658
|
-
0 | @@ -0,0 +1 @@
|
|
659
|
-
1 | +my_password = 'h3l***********350'
|
|
660
|
-
2 |
|
|
661
|
-
```
|
|
662
|
-
|
|
663
|
-
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.
|
|
664
|
-
|
|
665
698
|
### Ignoring a Secret Value
|
|
666
699
|
|
|
667
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:
|
|
@@ -86,9 +86,15 @@ To install the Cycode CLI application on your local machine, perform the followi
|
|
|
86
86
|
brew install cycode
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
- 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:
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
```bash
|
|
92
|
+
cd /path/to/downloaded/cycode-cli
|
|
93
|
+
chmod +x cycode
|
|
94
|
+
./cycode
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. Authenticate CLI. There are three methods to set the Cycode client ID and client secret:
|
|
92
98
|
|
|
93
99
|
- [cycode auth](#using-the-auth-command) (**Recommended**)
|
|
94
100
|
- [cycode configure](#using-the-configure-command)
|
|
@@ -205,7 +211,7 @@ export CYCODE_CLIENT_SECRET={your Cycode Secret Key}
|
|
|
205
211
|
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.
|
|
206
212
|
|
|
207
213
|
> [!NOTE]
|
|
208
|
-
> pre-commit hook is
|
|
214
|
+
> pre-commit hook is not available for IaC scans.
|
|
209
215
|
|
|
210
216
|
Perform the following steps to install the pre-commit hook:
|
|
211
217
|
|
|
@@ -222,19 +228,19 @@ Perform the following steps to install the pre-commit hook:
|
|
|
222
228
|
```yaml
|
|
223
229
|
repos:
|
|
224
230
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
225
|
-
rev: v3.
|
|
231
|
+
rev: v3.2.0
|
|
226
232
|
hooks:
|
|
227
233
|
- id: cycode
|
|
228
234
|
stages:
|
|
229
235
|
- pre-commit
|
|
230
236
|
```
|
|
231
237
|
|
|
232
|
-
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
|
|
238
|
+
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:
|
|
233
239
|
|
|
234
240
|
```yaml
|
|
235
241
|
repos:
|
|
236
242
|
- repo: https://github.com/cycodehq/cycode-cli
|
|
237
|
-
rev: v3.
|
|
243
|
+
rev: v3.2.0
|
|
238
244
|
hooks:
|
|
239
245
|
- id: cycode
|
|
240
246
|
stages:
|
|
@@ -242,6 +248,9 @@ Perform the following steps to install the pre-commit hook:
|
|
|
242
248
|
- id: cycode-sca
|
|
243
249
|
stages:
|
|
244
250
|
- pre-commit
|
|
251
|
+
- id: cycode-sast
|
|
252
|
+
stages:
|
|
253
|
+
- pre-commit
|
|
245
254
|
```
|
|
246
255
|
|
|
247
256
|
5. Install Cycode’s hook:
|
|
@@ -268,14 +277,17 @@ Perform the following steps to install the pre-commit hook:
|
|
|
268
277
|
|
|
269
278
|
The following are the options and commands available with the Cycode CLI application:
|
|
270
279
|
|
|
271
|
-
| Option
|
|
272
|
-
|
|
273
|
-
| `-v`, `--verbose`
|
|
274
|
-
| `--no-progress-meter`
|
|
275
|
-
| `--no-update-notifier`
|
|
276
|
-
| `-o`, `--output [text\|json\|table]`
|
|
277
|
-
| `--
|
|
278
|
-
| `--
|
|
280
|
+
| Option | Description |
|
|
281
|
+
|-------------------------------------------------------------------|------------------------------------------------------------------------------------|
|
|
282
|
+
| `-v`, `--verbose` | Show detailed logs. |
|
|
283
|
+
| `--no-progress-meter` | Do not show the progress meter. |
|
|
284
|
+
| `--no-update-notifier` | Do not check CLI for updates. |
|
|
285
|
+
| `-o`, `--output [rich\|text\|json\|table]` | Specify the output type. The default is `rich`. |
|
|
286
|
+
| `--client-id TEXT` | Specify a Cycode client ID for this specific scan execution. |
|
|
287
|
+
| `--client-secret TEXT` | Specify a Cycode client secret for this specific scan execution. |
|
|
288
|
+
| `--install-completion` | Install completion for the current shell.. |
|
|
289
|
+
| `--show-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Show completion for the specified shell, to copy it or customize the installation. |
|
|
290
|
+
| `-h`, `--help` | Show options for given command. |
|
|
279
291
|
|
|
280
292
|
| Command | Description |
|
|
281
293
|
|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -295,8 +307,6 @@ The Cycode CLI application offers several types of scans so that you can choose
|
|
|
295
307
|
| Option | Description |
|
|
296
308
|
|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
297
309
|
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`), the default is `secret`. |
|
|
298
|
-
| `--client-secret TEXT` | Specify a Cycode client secret for this specific scan execution. |
|
|
299
|
-
| `--client-id TEXT` | Specify a Cycode client ID for this specific scan execution. |
|
|
300
310
|
| `--show-secret BOOLEAN` | Show secrets in plain text. See [Show/Hide Secrets](#showhide-secrets) section for more details. |
|
|
301
311
|
| `--soft-fail BOOLEAN` | Run scan without failing, always return a non-error status code. See [Soft Fail](#soft-fail) section for more details. |
|
|
302
312
|
| `--severity-threshold [INFO\|LOW\|MEDIUM\|HIGH\|CRITICAL]` | Show only violations at the specified level or higher. |
|
|
@@ -500,15 +510,7 @@ If no issues are found, the scan ends with the following success message:
|
|
|
500
510
|
|
|
501
511
|
`Good job! No issues were found!!! 👏👏👏`
|
|
502
512
|
|
|
503
|
-
If an issue is found, a
|
|
504
|
-
|
|
505
|
-
```bash
|
|
506
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
507
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
508
|
-
0 | @@ -0,0 +1 @@
|
|
509
|
-
1 | +my_password = 'h3l***********350'
|
|
510
|
-
2 |
|
|
511
|
-
```
|
|
513
|
+
If an issue is found, a violation card appears upon completion instead.
|
|
512
514
|
|
|
513
515
|
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.
|
|
514
516
|
|
|
@@ -524,15 +526,7 @@ In the following example, a Path Scan is executed against the `cli` subdirectory
|
|
|
524
526
|
|
|
525
527
|
`cycode scan --show-secret path ./cli`
|
|
526
528
|
|
|
527
|
-
The result would then not be obfuscated
|
|
528
|
-
|
|
529
|
-
```bash
|
|
530
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
531
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
532
|
-
0 | @@ -0,0 +1 @@
|
|
533
|
-
1 | +my_password = 'h3110w0r1d!@#$350'
|
|
534
|
-
2 |
|
|
535
|
-
```
|
|
529
|
+
The result would then not be obfuscated.
|
|
536
530
|
|
|
537
531
|
### Soft Fail
|
|
538
532
|
|
|
@@ -548,41 +542,92 @@ Scan results are assigned with a value of exit code `1` when issues are found in
|
|
|
548
542
|
#### Secrets Result Example
|
|
549
543
|
|
|
550
544
|
```bash
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
545
|
+
╭─────────────────────────────────────────────────────────────── Hardcoded generic-password is used ───────────────────────────────────────────────────────────────╮
|
|
546
|
+
│ Violation 12 of 12 │
|
|
547
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
548
|
+
│ │ Severity 🟠 MEDIUM │ │ 34 }; │ │
|
|
549
|
+
│ │ In file /Users/cycodemacuser/NodeGoat/test/s │ │ 35 │ │
|
|
550
|
+
│ │ ecurity/profile-test.js │ │ 36 var sutUserName = "user1"; │ │
|
|
551
|
+
│ │ Secret SHA b4ea3116d868b7c982ee6812cce61727856b │ │ ❱ 37 var sutUserPassword = "Us*****23"; │ │
|
|
552
|
+
│ │ 802b3063cd5aebe7d796988552e0 │ │ 38 │ │
|
|
553
|
+
│ │ Rule ID 68b6a876-4890-4e62-9531-0e687223579f │ │ 39 chrome.setDefaultService(service); │ │
|
|
554
|
+
│ ╰────────────────────────────────────────────────────╯ │ 40 │ │
|
|
555
|
+
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
556
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
557
|
+
│ │ A generic secret or password is an authentication token used to access a computer or application and is assigned to a password variable. │ │
|
|
558
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
559
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
556
560
|
```
|
|
557
561
|
|
|
558
562
|
#### IaC Result Example
|
|
559
563
|
|
|
560
564
|
```bash
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
565
|
+
╭──────────── Enable Content Encoding through the attribute 'MinimumCompressionSize'. This value should be greater than -1 and smaller than 10485760. ─────────────╮
|
|
566
|
+
│ Violation 45 of 110 │
|
|
567
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
568
|
+
│ │ Severity 🟠 MEDIUM │ │ 20 BinaryMediaTypes: │ │
|
|
569
|
+
│ │ In file ...ads-copy/iac/cft/api-gateway/ap │ │ 21 - !Ref binaryMediaType1 │ │
|
|
570
|
+
│ │ i-gateway-rest-api/deploy.yml │ │ 22 - !Ref binaryMediaType2 │ │
|
|
571
|
+
│ │ IaC Provider CloudFormation │ │ ❱ 23 MinimumCompressionSize: -1 │ │
|
|
572
|
+
│ │ Rule ID 33c4b90c-3270-4337-a075-d3109c141b │ │ 24 EndpointConfiguration: │ │
|
|
573
|
+
│ │ 53 │ │ 25 Types: │ │
|
|
574
|
+
│ ╰────────────────────────────────────────────────────╯ │ 26 - EDGE │ │
|
|
575
|
+
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
576
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
577
|
+
│ │ This policy validates the proper configuration of content encoding in AWS API Gateway. Specifically, the policy checks for the attribute │ │
|
|
578
|
+
│ │ 'minimum_compression_size' in API Gateway REST APIs. Correct configuration of this attribute is important for enabling content encoding of API responses for │ │
|
|
579
|
+
│ │ improved API performance and reduced payload sizes. │ │
|
|
580
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
581
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
566
582
|
```
|
|
567
583
|
|
|
568
584
|
#### SCA Result Example
|
|
569
585
|
|
|
570
586
|
```bash
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
587
|
+
╭─────────────────────────────────────────────────────── [CVE-2019-10795] Prototype Pollution in undefsafe ────────────────────────────────────────────────────────╮
|
|
588
|
+
│ Violation 172 of 195 │
|
|
589
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
590
|
+
│ │ Severity 🟠 MEDIUM │ │ 26758 "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", │ │
|
|
591
|
+
│ │ In file /Users/cycodemacuser/Node │ │ 26759 "dev": true │ │
|
|
592
|
+
│ │ Goat/package-lock.json │ │ 26760 }, │ │
|
|
593
|
+
│ │ CVEs CVE-2019-10795 │ │ ❱ 26761 "undefsafe": { │ │
|
|
594
|
+
│ │ Package undefsafe │ │ 26762 "version": "2.0.2", │ │
|
|
595
|
+
│ │ Version 2.0.2 │ │ 26763 "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", │ │
|
|
596
|
+
│ │ First patched version Not fixed │ │ 26764 "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", │ │
|
|
597
|
+
│ │ Dependency path nodemon 1.19.1 -> │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
598
|
+
│ │ undefsafe 2.0.2 │ │
|
|
599
|
+
│ │ Rule ID 9c6a8911-e071-4616-86db-4 │ │
|
|
600
|
+
│ │ 943f2e1df81 │ │
|
|
601
|
+
│ ╰────────────────────────────────────────────────────╯ │
|
|
602
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
603
|
+
│ │ 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 │ │
|
|
604
|
+
│ │ a __proto__ payload. │ │
|
|
605
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
606
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
576
607
|
```
|
|
577
608
|
|
|
578
609
|
#### SAST Result Example
|
|
579
610
|
|
|
580
611
|
```bash
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
612
|
+
╭───────────────────────────────────────────── [CWE-208: Observable Timing Discrepancy] Observable Timing Discrepancy ─────────────────────────────────────────────╮
|
|
613
|
+
│ Violation 24 of 49 │
|
|
614
|
+
│ ╭─ 🔍 Details ───────────────────────────────────────╮ ╭─ 💻 Code Snippet ─────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
615
|
+
│ │ Severity 🟠 MEDIUM │ │ 173 " including numbers, lowercase and uppercase letters."; │ │
|
|
616
|
+
│ │ In file /Users/cycodemacuser/NodeGoat/app │ │ 174 return false; │ │
|
|
617
|
+
│ │ /routes/session.js │ │ 175 } │ │
|
|
618
|
+
│ │ CWE CWE-208 │ │ ❱ 176 if (password !== verify) { │ │
|
|
619
|
+
│ │ Subcategory Security │ │ 177 errors.verifyError = "Password must match"; │ │
|
|
620
|
+
│ │ Language js │ │ 178 return false; │ │
|
|
621
|
+
│ │ Security Tool Bearer (Powered by Cycode) │ │ 179 } │ │
|
|
622
|
+
│ │ Rule ID 19fbca07-a8e7-4fa6-92ac-a36d15509 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
623
|
+
│ │ fa9 │ │
|
|
624
|
+
│ ╰────────────────────────────────────────────────────╯ │
|
|
625
|
+
│ ╭─ 📝 Summary ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
|
|
626
|
+
│ │ Observable Timing Discrepancy occurs when the time it takes for certain operations to complete can be measured and observed by attackers. This vulnerability │ │
|
|
627
|
+
│ │ is particularly concerning when operations involve sensitive information, such as password checks or secret comparisons. If attackers can analyze how long │ │
|
|
628
|
+
│ │ these operations take, they might be able to deduce confidential details, putting your data at risk. │ │
|
|
629
|
+
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
|
630
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
586
631
|
```
|
|
587
632
|
|
|
588
633
|
### Company’s Custom Remediation Guidelines
|
|
@@ -609,18 +654,6 @@ The following are the options available for the `cycode ignore` command:
|
|
|
609
654
|
| `-t, --scan-type [secret\|iac\|sca\|sast]` | Specify the scan you wish to execute (`secret`/`iac`/`sca`/`sast`). The default value is `secret`. |
|
|
610
655
|
| `-g, --global` | Add an ignore rule and update it in the global `.cycode` config file. |
|
|
611
656
|
|
|
612
|
-
In the following example, a pre-commit scan runs and finds the following:
|
|
613
|
-
|
|
614
|
-
```bash
|
|
615
|
-
⛔ Found issue of type: generic-password (rule ID: ce3a4de0-9dfc-448b-a004-c538cf8b4710) in file: config/my_config.py
|
|
616
|
-
Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0 ⛔
|
|
617
|
-
0 | @@ -0,0 +1 @@
|
|
618
|
-
1 | +my_password = 'h3l***********350'
|
|
619
|
-
2 |
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
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.
|
|
623
|
-
|
|
624
657
|
### Ignoring a Secret Value
|
|
625
658
|
|
|
626
659
|
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:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '3.1.1.dev3' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -8,7 +8,7 @@ from cycode.cli import consts
|
|
|
8
8
|
from cycode.cli.apps.report.sbom.common import create_sbom_report, send_report_feedback
|
|
9
9
|
from cycode.cli.exceptions.handle_report_sbom_errors import handle_report_exception
|
|
10
10
|
from cycode.cli.files_collector.path_documents import get_relevant_documents
|
|
11
|
-
from cycode.cli.files_collector.sca.
|
|
11
|
+
from cycode.cli.files_collector.sca.sca_file_collector import add_sca_dependencies_tree_documents_if_needed
|
|
12
12
|
from cycode.cli.files_collector.zip_documents import zip_documents
|
|
13
13
|
from cycode.cli.utils.get_api_client import get_report_cycode_client
|
|
14
14
|
from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
|
|
@@ -41,7 +41,7 @@ def path_command(
|
|
|
41
41
|
)
|
|
42
42
|
# TODO(MarshalX): combine perform_pre_scan_documents_actions with get_relevant_document.
|
|
43
43
|
# unhardcode usage of context in perform_pre_scan_documents_actions
|
|
44
|
-
|
|
44
|
+
add_sca_dependencies_tree_documents_if_needed(ctx, consts.SCA_SCAN_TYPE, documents)
|
|
45
45
|
|
|
46
46
|
zipped_documents = zip_documents(consts.SCA_SCAN_TYPE, documents)
|
|
47
47
|
report_execution = client.request_sbom_report_execution(report_parameters, zip_file=zipped_documents)
|