cycode 1.9.1.dev1__tar.gz → 1.9.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.
Files changed (109) hide show
  1. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/PKG-INFO +10 -5
  2. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/README.md +9 -4
  3. cycode-1.9.1.dev3/cycode/__init__.py +1 -0
  4. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/json_printer.py +15 -3
  5. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/pyproject.toml +1 -1
  6. cycode-1.9.1.dev1/cycode/__init__.py +0 -1
  7. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/__init__.py +0 -0
  8. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/__init__.py +0 -0
  9. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/auth/__init__.py +0 -0
  10. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/auth/auth_command.py +0 -0
  11. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/auth/auth_manager.py +0 -0
  12. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/configure/__init__.py +0 -0
  13. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/configure/configure_command.py +0 -0
  14. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/ignore/__init__.py +0 -0
  15. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/ignore/ignore_command.py +0 -0
  16. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/main_cli.py +0 -0
  17. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/__init__.py +0 -0
  18. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/report_command.py +0 -0
  19. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/__init__.py +0 -0
  20. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/common.py +0 -0
  21. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
  22. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
  23. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
  24. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
  25. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
  26. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
  27. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/__init__.py +0 -0
  28. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/code_scanner.py +0 -0
  29. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
  30. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
  31. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/path/__init__.py +0 -0
  32. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/path/path_command.py +0 -0
  33. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
  34. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
  35. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
  36. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
  37. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/repository/__init__.py +0 -0
  38. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
  39. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
  40. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
  41. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
  42. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/scan/scan_command.py +0 -0
  43. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/version/__init__.py +0 -0
  44. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/commands/version/version_command.py +0 -0
  45. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/config.py +0 -0
  46. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/config.yaml +0 -0
  47. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/consts.py +0 -0
  48. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/exceptions/__init__.py +0 -0
  49. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/exceptions/custom_exceptions.py +0 -0
  50. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
  51. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
  52. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/__init__.py +0 -0
  53. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/excluder.py +0 -0
  54. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/iac/__init__.py +0 -0
  55. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
  56. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/models/__init__.py +0 -0
  57. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
  58. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/path_documents.py +0 -0
  59. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/repository_documents.py +0 -0
  60. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/__init__.py +0 -0
  61. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
  62. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
  63. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
  64. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
  65. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
  66. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/files_collector/zip_documents.py +0 -0
  67. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/main.py +0 -0
  68. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/models.py +0 -0
  69. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/__init__.py +0 -0
  70. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/console_printer.py +0 -0
  71. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/printer_base.py +0 -0
  72. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/__init__.py +0 -0
  73. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
  74. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/table.py +0 -0
  75. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/table_models.py +0 -0
  76. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/table_printer.py +0 -0
  77. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/tables/table_printer_base.py +0 -0
  78. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/printers/text_printer.py +0 -0
  79. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/__init__.py +0 -0
  80. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/base_file_manager.py +0 -0
  81. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/config_file_manager.py +0 -0
  82. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/configuration_manager.py +0 -0
  83. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/credentials_manager.py +0 -0
  84. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/user_settings/jwt_creator.py +0 -0
  85. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/__init__.py +0 -0
  86. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/enum_utils.py +0 -0
  87. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/get_api_client.py +0 -0
  88. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/path_utils.py +0 -0
  89. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/progress_bar.py +0 -0
  90. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/scan_batch.py +0 -0
  91. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/scan_utils.py +0 -0
  92. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/shell_executor.py +0 -0
  93. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/string_utils.py +0 -0
  94. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/task_timer.py +0 -0
  95. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cli/utils/yaml_utils.py +0 -0
  96. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/__init__.py +0 -0
  97. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/auth_client.py +0 -0
  98. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/client_creator.py +0 -0
  99. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/config.py +0 -0
  100. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/config.yaml +0 -0
  101. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/config_dev.py +0 -0
  102. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/cycode_client.py +0 -0
  103. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/cycode_client_base.py +0 -0
  104. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/cycode_dev_based_client.py +0 -0
  105. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/cycode_token_based_client.py +0 -0
  106. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/models.py +0 -0
  107. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/report_client.py +0 -0
  108. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/scan_client.py +0 -0
  109. {cycode-1.9.1.dev1 → cycode-1.9.1.dev3}/cycode/cyclient/scan_config_base.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cycode
3
- Version: 1.9.1.dev1
3
+ Version: 1.9.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
@@ -76,6 +76,7 @@ This guide will guide you through both installation and usage.
76
76
  2. [IaC Result Example](#iac-result-example)
77
77
  3. [SCA Result Example](#sca-result-example)
78
78
  4. [SAST Result Example](#sast-result-example)
79
+ 4. [Company’s Custom Remediation Guidelines](#companys-custom-remediation-guidelines)
79
80
  3. [Ignoring Scan Results](#ignoring-scan-results)
80
81
  1. [Ignoring a Secret Value](#ignoring-a-secret-value)
81
82
  2. [Ignoring a Secret SHA Value](#ignoring-a-secret-sha-value)
@@ -106,9 +107,10 @@ To install the Cycode CLI application on your local machine, perform the followi
106
107
 
107
108
  1. Open your command line or terminal application.
108
109
 
109
- 2. Execute the following command:
110
+ 2. Execute one of the following commands:
110
111
 
111
- `pip3 install cycode`
112
+ - `pip3 install cycode` - to install from PyPI
113
+ - `brew install cycode` - to install from Homebrew
112
114
 
113
115
  3. Navigate to the top directory of the local repository you wish to scan.
114
116
 
@@ -362,14 +364,13 @@ When using this option, the scan results from this scan will appear in the knowl
362
364
  ### Report Option
363
365
 
364
366
  > [!NOTE]
365
- > This option is only available to SCA and Secret scans.
367
+ > This option is not available to IaC scans.
366
368
 
367
369
  To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in the Repository scan to Cycode, add the argument `--report` to the scan command.
368
370
 
369
371
  `cycode scan -t sca --report repository ~/home/git/codebase`
370
372
  `cycode scan -t secret --report repository ~/home/git/codebase`
371
373
 
372
-
373
374
  or:
374
375
 
375
376
  `cycode scan --scan-type sca --report repository ~/home/git/codebase`
@@ -597,6 +598,10 @@ Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0
597
598
  4 | print(res.content)
598
599
  ```
599
600
 
601
+ ### Company’s Custom Remediation Guidelines
602
+
603
+ If your company has set custom remediation guidelines in the relevant policy via the Cycode portal, you'll see a field for “Company Guidelines” that contains the remediation guidelines you added. Note that if you haven't added any company guideline, this field will not appear in the CLI tool.
604
+
600
605
  ## Ignoring Scan Results
601
606
 
602
607
  Ignore rules can be added to ignore specific secret values, specific SHA512 values, specific paths, and specific Cycode secret and IaC rule IDs. This will cause the scan to not alert these values. The ignore rules are written and saved locally in the `./.cycode/config.yaml` file.
@@ -38,6 +38,7 @@ This guide will guide you through both installation and usage.
38
38
  2. [IaC Result Example](#iac-result-example)
39
39
  3. [SCA Result Example](#sca-result-example)
40
40
  4. [SAST Result Example](#sast-result-example)
41
+ 4. [Company’s Custom Remediation Guidelines](#companys-custom-remediation-guidelines)
41
42
  3. [Ignoring Scan Results](#ignoring-scan-results)
42
43
  1. [Ignoring a Secret Value](#ignoring-a-secret-value)
43
44
  2. [Ignoring a Secret SHA Value](#ignoring-a-secret-sha-value)
@@ -68,9 +69,10 @@ To install the Cycode CLI application on your local machine, perform the followi
68
69
 
69
70
  1. Open your command line or terminal application.
70
71
 
71
- 2. Execute the following command:
72
+ 2. Execute one of the following commands:
72
73
 
73
- `pip3 install cycode`
74
+ - `pip3 install cycode` - to install from PyPI
75
+ - `brew install cycode` - to install from Homebrew
74
76
 
75
77
  3. Navigate to the top directory of the local repository you wish to scan.
76
78
 
@@ -324,14 +326,13 @@ When using this option, the scan results from this scan will appear in the knowl
324
326
  ### Report Option
325
327
 
326
328
  > [!NOTE]
327
- > This option is only available to SCA and Secret scans.
329
+ > This option is not available to IaC scans.
328
330
 
329
331
  To push scan results tied to the [SCA policies](https://docs.cycode.com/docs/sca-policies) found in the Repository scan to Cycode, add the argument `--report` to the scan command.
330
332
 
331
333
  `cycode scan -t sca --report repository ~/home/git/codebase`
332
334
  `cycode scan -t secret --report repository ~/home/git/codebase`
333
335
 
334
-
335
336
  or:
336
337
 
337
338
  `cycode scan --scan-type sca --report repository ~/home/git/codebase`
@@ -559,6 +560,10 @@ Secret SHA: a44081db3296c84b82d12a35c446a3cba19411dddfa0380134c75f7b3973bff0
559
560
  4 | print(res.content)
560
561
  ```
561
562
 
563
+ ### Company’s Custom Remediation Guidelines
564
+
565
+ If your company has set custom remediation guidelines in the relevant policy via the Cycode portal, you'll see a field for “Company Guidelines” that contains the remediation guidelines you added. Note that if you haven't added any company guideline, this field will not appear in the CLI tool.
566
+
562
567
  ## Ignoring Scan Results
563
568
 
564
569
  Ignore rules can be added to ignore specific secret values, specific SHA512 values, specific paths, and specific Cycode secret and IaC rule IDs. This will cause the scan to not alert these values. The ignore rules are written and saved locally in the `./.cycode/config.yaml` file.
@@ -0,0 +1 @@
1
+ __version__ = '1.9.1.dev3' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -25,8 +25,16 @@ class JsonPrinter(PrinterBase):
25
25
  def print_scan_results(
26
26
  self, local_scan_results: List['LocalScanResult'], errors: Optional[Dict[str, 'CliError']] = None
27
27
  ) -> None:
28
+ scan_ids = []
29
+ report_urls = []
28
30
  detections = []
31
+
29
32
  for local_scan_result in local_scan_results:
33
+ scan_ids.append(local_scan_result.scan_id)
34
+
35
+ if local_scan_result.report_url:
36
+ report_urls.append(local_scan_result.report_url)
37
+
30
38
  for document_detections in local_scan_result.document_detections:
31
39
  detections.extend(document_detections.detections)
32
40
 
@@ -37,12 +45,16 @@ class JsonPrinter(PrinterBase):
37
45
  # FIXME(MarshalX): we don't care about scan IDs in JSON output due to clumsy JSON root structure
38
46
  inlined_errors = [err._asdict() for err in errors.values()]
39
47
 
40
- click.echo(self._get_json_scan_result(detections_dict, inlined_errors))
48
+ click.echo(self._get_json_scan_result(scan_ids, detections_dict, report_urls, inlined_errors))
41
49
 
42
- def _get_json_scan_result(self, detections: dict, errors: List[dict]) -> str:
50
+ def _get_json_scan_result(
51
+ self, scan_ids: List[str], detections: dict, report_urls: List[str], errors: List[dict]
52
+ ) -> str:
43
53
  result = {
44
- 'scan_id': 'DEPRECATED', # FIXME(MarshalX): we need change JSON struct to support multiple scan results
54
+ 'scan_id': 'DEPRECATED', # backward compatibility
55
+ 'scan_ids': scan_ids,
45
56
  'detections': detections,
57
+ 'report_urls': report_urls,
46
58
  'errors': errors,
47
59
  }
48
60
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cycode"
3
- version = "1.9.1.dev1" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
3
+ version = "1.9.1.dev3" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
4
4
  description = "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning."
5
5
  keywords=["secret-scan", "cycode", "devops", "token", "secret", "security", "cycode", "code"]
6
6
  authors = ["Cycode <support@cycode.com>"]
@@ -1 +0,0 @@
1
- __version__ = '1.9.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag