cycode 3.20.0__tar.gz → 3.20.1.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. {cycode-3.20.0 → cycode-3.20.1.dev1}/PKG-INFO +63 -17
  2. {cycode-3.20.0 → cycode-3.20.1.dev1}/README.md +61 -16
  3. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/__init__.py +1 -1
  4. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/consts.py +1 -0
  5. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/custom_exceptions.py +14 -3
  6. cycode-3.20.1.dev1/cycode/cli/utils/trust_store.py +66 -0
  7. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cycode_client_base.py +9 -4
  8. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/scan_client.py +4 -1
  9. {cycode-3.20.0 → cycode-3.20.1.dev1}/pyproject.toml +2 -1
  10. {cycode-3.20.0 → cycode-3.20.1.dev1}/LICENCE +0 -0
  11. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/__main__.py +0 -0
  12. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/__init__.py +0 -0
  13. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/app.py +0 -0
  14. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/__init__.py +0 -0
  15. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/activation_manager.py +0 -0
  16. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/__init__.py +0 -0
  17. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/command_utils.py +0 -0
  18. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/consts.py +0 -0
  19. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/hooks_manager.py +0 -0
  20. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/__init__.py +0 -0
  21. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/_plugin_utils.py +0 -0
  22. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/base.py +0 -0
  23. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/claude_code.py +0 -0
  24. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/codex.py +0 -0
  25. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/copilot.py +0 -0
  26. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/ides/cursor.py +0 -0
  27. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/install_command.py +0 -0
  28. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/__init__.py +0 -0
  29. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/consts.py +0 -0
  30. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/handlers.py +0 -0
  31. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/payload.py +0 -0
  32. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/policy.py +0 -0
  33. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/scan_command.py +0 -0
  34. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/types.py +0 -0
  35. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/scan/utils.py +0 -0
  36. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/session_start_command.py +0 -0
  37. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/status_command.py +0 -0
  38. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_guardrails/uninstall_command.py +0 -0
  39. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
  40. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
  41. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
  42. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
  43. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/api/__init__.py +0 -0
  44. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/api/api_command.py +0 -0
  45. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/api/openapi_spec.py +0 -0
  46. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/auth/__init__.py +0 -0
  47. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/auth/auth_command.py +0 -0
  48. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/auth/auth_common.py +0 -0
  49. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/auth/auth_manager.py +0 -0
  50. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/auth/models.py +0 -0
  51. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/configure/__init__.py +0 -0
  52. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/configure/configure_command.py +0 -0
  53. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/configure/consts.py +0 -0
  54. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/configure/messages.py +0 -0
  55. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/configure/prompts.py +0 -0
  56. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ignore/__init__.py +0 -0
  57. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/ignore/ignore_command.py +0 -0
  58. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/mcp/__init__.py +0 -0
  59. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/mcp/mcp_command.py +0 -0
  60. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/__init__.py +0 -0
  61. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/report_command.py +0 -0
  62. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/__init__.py +0 -0
  63. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/common.py +0 -0
  64. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
  65. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
  66. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
  67. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
  68. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
  69. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
  70. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report_import/__init__.py +0 -0
  71. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report_import/report_import_command.py +0 -0
  72. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report_import/sbom/__init__.py +0 -0
  73. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/report_import/sbom/sbom_command.py +0 -0
  74. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/sca_options.py +0 -0
  75. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/__init__.py +0 -0
  76. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/aggregation_report.py +0 -0
  77. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/code_scanner.py +0 -0
  78. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
  79. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
  80. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/commit_range_scanner.py +0 -0
  81. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/detection_excluder.py +0 -0
  82. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/path/__init__.py +0 -0
  83. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/path/path_command.py +0 -0
  84. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
  85. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
  86. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_push/__init__.py +0 -0
  87. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_push/pre_push_command.py +0 -0
  88. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
  89. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
  90. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/remote_url_resolver.py +0 -0
  91. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/repository/__init__.py +0 -0
  92. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
  93. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
  94. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
  95. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
  96. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_command.py +0 -0
  97. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_parameters.py +0 -0
  98. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/scan/scan_result.py +0 -0
  99. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/status/__init__.py +0 -0
  100. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/status/get_cli_status.py +0 -0
  101. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/status/models.py +0 -0
  102. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/status/status_command.py +0 -0
  103. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/apps/status/version_command.py +0 -0
  104. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/cli_types.py +0 -0
  105. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/config.py +0 -0
  106. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/console.py +0 -0
  107. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/__init__.py +0 -0
  108. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
  109. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
  110. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/handle_errors.py +0 -0
  111. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
  112. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
  113. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/__init__.py +0 -0
  114. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/commit_range_documents.py +0 -0
  115. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/documents_walk_ignore.py +0 -0
  116. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/file_excluder.py +0 -0
  117. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
  118. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
  119. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
  120. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
  121. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
  122. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
  123. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
  124. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
  125. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
  126. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
  127. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
  128. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
  129. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
  130. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
  131. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/restore_bun_dependencies.py +0 -0
  132. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/restore_deno_dependencies.py +0 -0
  133. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
  134. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/restore_pnpm_dependencies.py +0 -0
  135. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/npm/restore_yarn_dependencies.py +0 -0
  136. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
  137. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
  138. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/php/__init__.py +0 -0
  139. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/php/restore_composer_dependencies.py +0 -0
  140. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/python/__init__.py +0 -0
  141. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/python/restore_pip_dependencies.py +0 -0
  142. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/python/restore_pipenv_dependencies.py +0 -0
  143. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/python/restore_poetry_dependencies.py +0 -0
  144. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/python/restore_uv_dependencies.py +0 -0
  145. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
  146. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
  147. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
  148. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
  149. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/sca/sca_file_collector.py +0 -0
  150. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/walk_ignore.py +0 -0
  151. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
  152. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/logger.py +0 -0
  153. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/main.py +0 -0
  154. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/models.py +0 -0
  155. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/__init__.py +0 -0
  156. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/console_printer.py +0 -0
  157. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/json_printer.py +0 -0
  158. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/printer_base.py +0 -0
  159. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/rich_printer.py +0 -0
  160. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
  161. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
  162. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/table.py +0 -0
  163. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
  164. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
  165. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
  166. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/text_printer.py +0 -0
  167. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/__init__.py +0 -0
  168. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/code_snippet_syntax.py +0 -0
  169. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/detection_data.py +0 -0
  170. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
  171. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
  172. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
  173. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/printers/utils/rich_helpers.py +0 -0
  174. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/__init__.py +0 -0
  175. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
  176. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
  177. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
  178. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
  179. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
  180. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/__init__.py +0 -0
  181. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/binary_utils.py +0 -0
  182. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/enum_utils.py +0 -0
  183. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/get_api_client.py +0 -0
  184. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/git_proxy.py +0 -0
  185. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/host_info.py +0 -0
  186. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/ignore_utils.py +0 -0
  187. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/jwt_utils.py +0 -0
  188. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/path_utils.py +0 -0
  189. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/progress_bar.py +0 -0
  190. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/scan_batch.py +0 -0
  191. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/scan_utils.py +0 -0
  192. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/shell_executor.py +0 -0
  193. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/string_utils.py +0 -0
  194. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/task_timer.py +0 -0
  195. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/url_utils.py +0 -0
  196. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/version_checker.py +0 -0
  197. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
  198. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/config.py +0 -0
  199. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/__init__.py +0 -0
  200. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/ai_security_manager_client.py +0 -0
  201. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/ai_security_manager_service_config.py +0 -0
  202. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/auth_client.py +0 -0
  203. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/base_token_auth_client.py +0 -0
  204. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cli_activation_client.py +0 -0
  205. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/client_creator.py +0 -0
  206. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/config.py +0 -0
  207. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/config_dev.py +0 -0
  208. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cycode_client.py +0 -0
  209. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
  210. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cycode_oidc_based_client.py +0 -0
  211. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
  212. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/headers.py +0 -0
  213. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/import_sbom_client.py +0 -0
  214. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/logger.py +0 -0
  215. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/models.py +0 -0
  216. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/report_client.py +0 -0
  217. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/cyclient/scan_config_base.py +0 -0
  218. {cycode-3.20.0 → cycode-3.20.1.dev1}/cycode/logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycode
3
- Version: 3.20.0
3
+ Version: 3.20.1.dev1
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  License-Expression: MIT
6
6
  License-File: LICENCE
@@ -37,6 +37,7 @@ Requires-Dist: rich (>=15.0.0,<16.0.0)
37
37
  Requires-Dist: tenacity (>=9.1.2,<9.2.0)
38
38
  Requires-Dist: tomli (>=2.0.0,<3.0.0) ; python_version < "3.11"
39
39
  Requires-Dist: tomli-w (>=1.0.0,<2.0.0)
40
+ Requires-Dist: truststore (>=0.10.4,<0.11.0) ; python_version >= "3.10"
40
41
  Requires-Dist: typer (>=0.15.3,<0.16.0)
41
42
  Requires-Dist: urllib3 (>=2.4.0,<3.0.0)
42
43
  Project-URL: Repository, https://github.com/cycodehq/cycode-cli
@@ -62,19 +63,20 @@ This guide walks you through both installation and usage.
62
63
  2. [On Windows](#on-windows)
63
64
  2. [Install Pre-Commit Hook](#install-pre-commit-hook)
64
65
  3. [Cycode CLI Commands](#cycode-cli-commands)
65
- 4. [MCP Command](#mcp-command-experiment)
66
+ 4. [Certificates and Proxies](#certificates-and-proxies)
67
+ 5. [MCP Command](#mcp-command-experiment)
66
68
  1. [Starting the MCP Server](#starting-the-mcp-server)
67
69
  2. [Available Options](#available-options)
68
70
  3. [MCP Tools](#mcp-tools)
69
71
  4. [Usage Examples](#usage-examples)
70
72
  5. [Advanced Configuration](#advanced-configuration)
71
- 5. [Platform Command](#platform-command-beta)
73
+ 6. [Platform Command](#platform-command-beta)
72
74
  1. [Discovering Commands](#discovering-commands)
73
75
  2. [Examples](#platform-examples)
74
76
  3. [Notes & Limitations](#platform-notes--limitations)
75
- 6. [AI Guardrails](#ai-guardrails-beta)
77
+ 7. [AI Guardrails](#ai-guardrails-beta)
76
78
  1. [Data Collected by AI Guardrails](#data-collected-by-ai-guardrails)
77
- 7. [Scan Command](#scan-command)
79
+ 8. [Scan Command](#scan-command)
78
80
  1. [Running a Scan](#running-a-scan)
79
81
  1. [Options](#options)
80
82
  1. [Severity Threshold](#severity-option)
@@ -108,11 +110,11 @@ This guide walks you through both installation and usage.
108
110
  4. [Ignoring a Secret, IaC, or SCA Rule](#ignoring-a-secret-iac-sca-or-sast-rule)
109
111
  5. [Ignoring a Package](#ignoring-a-package)
110
112
  6. [Ignoring via a config file](#ignoring-via-a-config-file)
111
- 6. [Report command](#report-command)
113
+ 9. [Report command](#report-command)
112
114
  1. [Generating SBOM Report](#generating-sbom-report)
113
- 7. [Import command](#import-command)
114
- 8. [Scan logs](#scan-logs)
115
- 9. [Syntax Help](#syntax-help)
115
+ 10. [Import command](#import-command)
116
+ 11. [Scan logs](#scan-logs)
117
+ 12. [Syntax Help](#syntax-help)
116
118
 
117
119
  # Prerequisites
118
120
 
@@ -400,6 +402,51 @@ The following are the options and commands available with the Cycode CLI applica
400
402
  | [report](#report-command) | Generate report. You will need to specify which report type to perform as SBOM. |
401
403
  | status | Show the CLI status and exit. |
402
404
 
405
+ # Certificates and Proxies
406
+
407
+ By default, Cycode CLI verifies HTTPS connections against the CA bundle shipped with the CLI.
408
+
409
+ If your organization uses a proxy that inspects HTTPS traffic, or an on-premises installation with
410
+ its own CA, you have two options.
411
+
412
+ **Option 1 — use the certificates already installed on the machine.** If your CA is in the machine
413
+ certificate store (as is usually the case on a managed device), opt in:
414
+
415
+ ```bash
416
+ export CYCODE_CLI_ENABLE_TRUSTSTORE=1
417
+ ```
418
+
419
+ The CLI then verifies against the Windows certificate store, the macOS Keychain, or the system CA
420
+ directory on Linux, and no certificate paths need to be configured.
421
+
422
+ > [!IMPORTANT]
423
+ > This is opt-in on purpose. Trusting the machine store means trusting every root certificate
424
+ > present on that machine, including any an administrator or malicious software installed. Enable it
425
+ > when you know your machine's certificate store is one you trust.
426
+
427
+ **Option 2 — point the CLI at a CA bundle file.** Works without opting in:
428
+
429
+ | Environment Variable | Description |
430
+ |----------------------|-------------|
431
+ | `REQUESTS_CA_BUNDLE` | Path to a CA bundle file (`.pem` or `.crt`) to trust. |
432
+ | `CURL_CA_BUNDLE` | Alias for `REQUESTS_CA_BUNDLE`, honored when the latter is unset. |
433
+
434
+ The two options combine: with `CYCODE_CLI_ENABLE_TRUSTSTORE=1`, certificates from
435
+ `REQUESTS_CA_BUNDLE` are trusted *in addition to* the machine store, not instead of it.
436
+
437
+ > [!TIP]
438
+ > Run any command with `-v` to see which trust source is in use, for example `cycode -v status`.
439
+
440
+ Notes:
441
+
442
+ - `CYCODE_CLI_ENABLE_TRUSTSTORE` requires Python 3.10 or newer. On Python 3.9 the CLI logs a warning
443
+ and falls back to the bundled CA bundle; use `REQUESTS_CA_BUNDLE` instead, or upgrade Python. The
444
+ standalone executables and the Docker image already ship a supported Python.
445
+ - On Windows, the CLI has always fallen back to the system certificate store when neither
446
+ `REQUESTS_CA_BUNDLE` nor `CURL_CA_BUNDLE` is set. That behavior is unchanged.
447
+ - Proxies themselves are configured with the standard `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
448
+ environment variables.
449
+
403
450
  # MCP Command \[EXPERIMENT\]
404
451
 
405
452
  > [!WARNING]
@@ -609,20 +656,20 @@ cycode mcp -t streamable-http -H 127.0.0.2 -p 9000 &
609
656
  ```
610
657
 
611
658
  ### Advanced Configuration
612
- ##### Custom Certificates and Timeouts (Proxy Environments)
659
+ ##### Timeouts and Custom Certificates (Proxy Environments)
613
660
 
614
- If your organization uses a corporate proxy or a custom CA bundle for HTTPS inspection, you need to tell Cycode CLI (and the underlying Python TLS stack) where to find the trusted certificate bundle. You can also increase the MCP tool call timeout if scans are being cut short.
661
+ If long-running scans are being cut short by your MCP client, increase the tool call timeout.
615
662
 
616
663
  | Environment Variable | Description |
617
664
  |----------------------|-------------|
618
- | `REQUESTS_CA_BUNDLE` | Path to a custom CA bundle file (`.pem` or `.crt`). Used by the `requests` library for all HTTPS calls made by Cycode CLI. |
619
- | `SSL_CERT_FILE` | Path to a custom CA bundle file. Used by Python's low-level `ssl` module. Set this alongside `REQUESTS_CA_BUNDLE` for full coverage. |
620
665
  | `MCP_TOOL_TIMEOUT` | Timeout (in seconds) that MCP clients such as Claude and GitHub Copilot wait for a tool call to complete. Increase this if long-running scans are being cut off before they finish. |
621
666
 
622
- > [!TIP]
623
- > Set both `REQUESTS_CA_BUNDLE` and `SSL_CERT_FILE` to the same CA bundle path. `REQUESTS_CA_BUNDLE` covers the HTTP layer; `SSL_CERT_FILE` covers the lower-level TLS layer. Using only one may still cause certificate errors in some environments.
667
+ Behind a corporate proxy, set the certificate variables in the MCP server's `env` block. See
668
+ [Certificates and Proxies](#certificates-and-proxies) for the options: either
669
+ `CYCODE_CLI_ENABLE_TRUSTSTORE=1` to use the certificates already on the machine, or
670
+ `REQUESTS_CA_BUNDLE` pointing at a CA bundle file.
624
671
 
625
- Example `mcp.json` configuration with custom certificates and a longer timeout:
672
+ Example `mcp.json` configuration with a custom CA bundle and a longer timeout:
626
673
 
627
674
  ```json
628
675
  {
@@ -632,7 +679,6 @@ Example `mcp.json` configuration with custom certificates and a longer timeout:
632
679
  "args": ["mcp"],
633
680
  "env": {
634
681
  "REQUESTS_CA_BUNDLE": "/path/to/your/corporate-ca-bundle.pem",
635
- "SSL_CERT_FILE": "/path/to/your/corporate-ca-bundle.pem",
636
682
  "MCP_TOOL_TIMEOUT": "1800"
637
683
  }
638
684
  }
@@ -18,19 +18,20 @@ This guide walks you through both installation and usage.
18
18
  2. [On Windows](#on-windows)
19
19
  2. [Install Pre-Commit Hook](#install-pre-commit-hook)
20
20
  3. [Cycode CLI Commands](#cycode-cli-commands)
21
- 4. [MCP Command](#mcp-command-experiment)
21
+ 4. [Certificates and Proxies](#certificates-and-proxies)
22
+ 5. [MCP Command](#mcp-command-experiment)
22
23
  1. [Starting the MCP Server](#starting-the-mcp-server)
23
24
  2. [Available Options](#available-options)
24
25
  3. [MCP Tools](#mcp-tools)
25
26
  4. [Usage Examples](#usage-examples)
26
27
  5. [Advanced Configuration](#advanced-configuration)
27
- 5. [Platform Command](#platform-command-beta)
28
+ 6. [Platform Command](#platform-command-beta)
28
29
  1. [Discovering Commands](#discovering-commands)
29
30
  2. [Examples](#platform-examples)
30
31
  3. [Notes & Limitations](#platform-notes--limitations)
31
- 6. [AI Guardrails](#ai-guardrails-beta)
32
+ 7. [AI Guardrails](#ai-guardrails-beta)
32
33
  1. [Data Collected by AI Guardrails](#data-collected-by-ai-guardrails)
33
- 7. [Scan Command](#scan-command)
34
+ 8. [Scan Command](#scan-command)
34
35
  1. [Running a Scan](#running-a-scan)
35
36
  1. [Options](#options)
36
37
  1. [Severity Threshold](#severity-option)
@@ -64,11 +65,11 @@ This guide walks you through both installation and usage.
64
65
  4. [Ignoring a Secret, IaC, or SCA Rule](#ignoring-a-secret-iac-sca-or-sast-rule)
65
66
  5. [Ignoring a Package](#ignoring-a-package)
66
67
  6. [Ignoring via a config file](#ignoring-via-a-config-file)
67
- 6. [Report command](#report-command)
68
+ 9. [Report command](#report-command)
68
69
  1. [Generating SBOM Report](#generating-sbom-report)
69
- 7. [Import command](#import-command)
70
- 8. [Scan logs](#scan-logs)
71
- 9. [Syntax Help](#syntax-help)
70
+ 10. [Import command](#import-command)
71
+ 11. [Scan logs](#scan-logs)
72
+ 12. [Syntax Help](#syntax-help)
72
73
 
73
74
  # Prerequisites
74
75
 
@@ -356,6 +357,51 @@ The following are the options and commands available with the Cycode CLI applica
356
357
  | [report](#report-command) | Generate report. You will need to specify which report type to perform as SBOM. |
357
358
  | status | Show the CLI status and exit. |
358
359
 
360
+ # Certificates and Proxies
361
+
362
+ By default, Cycode CLI verifies HTTPS connections against the CA bundle shipped with the CLI.
363
+
364
+ If your organization uses a proxy that inspects HTTPS traffic, or an on-premises installation with
365
+ its own CA, you have two options.
366
+
367
+ **Option 1 — use the certificates already installed on the machine.** If your CA is in the machine
368
+ certificate store (as is usually the case on a managed device), opt in:
369
+
370
+ ```bash
371
+ export CYCODE_CLI_ENABLE_TRUSTSTORE=1
372
+ ```
373
+
374
+ The CLI then verifies against the Windows certificate store, the macOS Keychain, or the system CA
375
+ directory on Linux, and no certificate paths need to be configured.
376
+
377
+ > [!IMPORTANT]
378
+ > This is opt-in on purpose. Trusting the machine store means trusting every root certificate
379
+ > present on that machine, including any an administrator or malicious software installed. Enable it
380
+ > when you know your machine's certificate store is one you trust.
381
+
382
+ **Option 2 — point the CLI at a CA bundle file.** Works without opting in:
383
+
384
+ | Environment Variable | Description |
385
+ |----------------------|-------------|
386
+ | `REQUESTS_CA_BUNDLE` | Path to a CA bundle file (`.pem` or `.crt`) to trust. |
387
+ | `CURL_CA_BUNDLE` | Alias for `REQUESTS_CA_BUNDLE`, honored when the latter is unset. |
388
+
389
+ The two options combine: with `CYCODE_CLI_ENABLE_TRUSTSTORE=1`, certificates from
390
+ `REQUESTS_CA_BUNDLE` are trusted *in addition to* the machine store, not instead of it.
391
+
392
+ > [!TIP]
393
+ > Run any command with `-v` to see which trust source is in use, for example `cycode -v status`.
394
+
395
+ Notes:
396
+
397
+ - `CYCODE_CLI_ENABLE_TRUSTSTORE` requires Python 3.10 or newer. On Python 3.9 the CLI logs a warning
398
+ and falls back to the bundled CA bundle; use `REQUESTS_CA_BUNDLE` instead, or upgrade Python. The
399
+ standalone executables and the Docker image already ship a supported Python.
400
+ - On Windows, the CLI has always fallen back to the system certificate store when neither
401
+ `REQUESTS_CA_BUNDLE` nor `CURL_CA_BUNDLE` is set. That behavior is unchanged.
402
+ - Proxies themselves are configured with the standard `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
403
+ environment variables.
404
+
359
405
  # MCP Command \[EXPERIMENT\]
360
406
 
361
407
  > [!WARNING]
@@ -565,20 +611,20 @@ cycode mcp -t streamable-http -H 127.0.0.2 -p 9000 &
565
611
  ```
566
612
 
567
613
  ### Advanced Configuration
568
- ##### Custom Certificates and Timeouts (Proxy Environments)
614
+ ##### Timeouts and Custom Certificates (Proxy Environments)
569
615
 
570
- If your organization uses a corporate proxy or a custom CA bundle for HTTPS inspection, you need to tell Cycode CLI (and the underlying Python TLS stack) where to find the trusted certificate bundle. You can also increase the MCP tool call timeout if scans are being cut short.
616
+ If long-running scans are being cut short by your MCP client, increase the tool call timeout.
571
617
 
572
618
  | Environment Variable | Description |
573
619
  |----------------------|-------------|
574
- | `REQUESTS_CA_BUNDLE` | Path to a custom CA bundle file (`.pem` or `.crt`). Used by the `requests` library for all HTTPS calls made by Cycode CLI. |
575
- | `SSL_CERT_FILE` | Path to a custom CA bundle file. Used by Python's low-level `ssl` module. Set this alongside `REQUESTS_CA_BUNDLE` for full coverage. |
576
620
  | `MCP_TOOL_TIMEOUT` | Timeout (in seconds) that MCP clients such as Claude and GitHub Copilot wait for a tool call to complete. Increase this if long-running scans are being cut off before they finish. |
577
621
 
578
- > [!TIP]
579
- > Set both `REQUESTS_CA_BUNDLE` and `SSL_CERT_FILE` to the same CA bundle path. `REQUESTS_CA_BUNDLE` covers the HTTP layer; `SSL_CERT_FILE` covers the lower-level TLS layer. Using only one may still cause certificate errors in some environments.
622
+ Behind a corporate proxy, set the certificate variables in the MCP server's `env` block. See
623
+ [Certificates and Proxies](#certificates-and-proxies) for the options: either
624
+ `CYCODE_CLI_ENABLE_TRUSTSTORE=1` to use the certificates already on the machine, or
625
+ `REQUESTS_CA_BUNDLE` pointing at a CA bundle file.
580
626
 
581
- Example `mcp.json` configuration with custom certificates and a longer timeout:
627
+ Example `mcp.json` configuration with a custom CA bundle and a longer timeout:
582
628
 
583
629
  ```json
584
630
  {
@@ -588,7 +634,6 @@ Example `mcp.json` configuration with custom certificates and a longer timeout:
588
634
  "args": ["mcp"],
589
635
  "env": {
590
636
  "REQUESTS_CA_BUNDLE": "/path/to/your/corporate-ca-bundle.pem",
591
- "SSL_CERT_FILE": "/path/to/your/corporate-ca-bundle.pem",
592
637
  "MCP_TOOL_TIMEOUT": "1800"
593
638
  }
594
639
  }
@@ -5,4 +5,4 @@ import time as _time
5
5
  # end-to-end scan duration from the moment the user actually triggered it.
6
6
  _BOOT_WALL: float = _time.time()
7
7
 
8
- __version__ = '3.20.0' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
8
+ __version__ = '3.20.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -209,6 +209,7 @@ CYCODE_CLI_REQUEST_TIMEOUT_ENV_VAR_NAME = 'CYCODE_CLI_REQUEST_TIMEOUT'
209
209
  LOGGING_LEVEL_ENV_VAR_NAME = 'LOGGING_LEVEL'
210
210
  VERBOSE_ENV_VAR_NAME = 'CYCODE_CLI_VERBOSE'
211
211
  DEBUG_ENV_VAR_NAME = 'CYCODE_CLI_DEBUG'
212
+ ENABLE_TRUSTSTORE_ENV_VAR_NAME = 'CYCODE_CLI_ENABLE_TRUSTSTORE'
212
213
 
213
214
  CYCODE_CONFIGURATION_DIRECTORY: str = '.cycode'
214
215
 
@@ -1,6 +1,8 @@
1
1
  from requests import Response
2
2
 
3
+ from cycode.cli import consts
3
4
  from cycode.cli.models import CliError, CliErrors
5
+ from cycode.cli.utils import trust_store
4
6
 
5
7
 
6
8
  class CycodeError(Exception):
@@ -96,6 +98,17 @@ class TfplanKeyError(CycodeError):
96
98
  return f'Error occurred while parsing terraform plan file. Path: {self.file_path}'
97
99
 
98
100
 
101
+ _SSL_ERROR_CA_BUNDLE_HINT = (
102
+ 'set the REQUESTS_CA_BUNDLE (or CURL_CA_BUNDLE) environment variable to the path of a valid .pem or similar'
103
+ )
104
+ _SSL_ERROR_TRUST_HINT = (
105
+ 'If you use an on-premises installation or a proxy that intercepts SSL traffic, '
106
+ f'set {consts.ENABLE_TRUSTSTORE_ENV_VAR_NAME}=1 to trust the CA certificates installed in your '
107
+ f'machine certificate store, or {_SSL_ERROR_CA_BUNDLE_HINT}'
108
+ if trust_store.is_supported() and not trust_store.is_enabled()
109
+ else f'If you use an on-premises installation or a proxy that intercepts SSL traffic, {_SSL_ERROR_CA_BUNDLE_HINT}'
110
+ )
111
+
99
112
  KNOWN_USER_FRIENDLY_REQUEST_ERRORS: CliErrors = {
100
113
  RequestHttpError: CliError(
101
114
  soft_fail=True,
@@ -122,8 +135,6 @@ KNOWN_USER_FRIENDLY_REQUEST_ERRORS: CliErrors = {
122
135
  RequestSslError: CliError(
123
136
  soft_fail=True,
124
137
  code='ssl_error',
125
- message='An SSL error occurred when trying to connect to the Cycode API. '
126
- 'If you use an on-premises installation or a proxy that intercepts SSL traffic '
127
- 'you should use the CURL_CA_BUNDLE environment variable to specify path to a valid .pem or similar',
138
+ message=f'An SSL error occurred when trying to connect to the Cycode API. {_SSL_ERROR_TRUST_HINT}',
128
139
  ),
129
140
  }
@@ -0,0 +1,66 @@
1
+ import sys
2
+
3
+ from cycode import config
4
+ from cycode.cli import consts
5
+ from cycode.logger import get_logger
6
+
7
+ logger = get_logger('Trust Store')
8
+
9
+ # truststore requires Python 3.10+, so on 3.9 the OS trust store is unavailable
10
+ _MIN_PYTHON_VERSION = (3, 10)
11
+
12
+ _installed = False
13
+
14
+
15
+ def is_supported() -> bool:
16
+ return sys.version_info >= _MIN_PYTHON_VERSION
17
+
18
+
19
+ def is_enabled() -> bool:
20
+ return config.get_val_as_bool(consts.ENABLE_TRUSTSTORE_ENV_VAR_NAME)
21
+
22
+
23
+ def is_installed() -> bool:
24
+ """Whether the OS trust store has been injected into the TLS stack."""
25
+ return _installed
26
+
27
+
28
+ def install() -> bool:
29
+ """Verify TLS against the machine's trust store.
30
+
31
+ `truststore.inject_into_ssl()` patches `ssl.SSLContext` process-wide, so this covers all HTTPS
32
+ traffic (the shared session, the presigned S3 upload, the version check) without touching call
33
+ sites. Certificates from `REQUESTS_CA_BUNDLE`/`CURL_CA_BUNDLE` keep working: requests still loads
34
+ them, and truststore treats them as additional trust anchors on top of the OS store.
35
+ """
36
+ global _installed
37
+
38
+ if _installed:
39
+ return True
40
+
41
+ if not is_enabled():
42
+ logger.debug(
43
+ 'OS trust store not enabled, using the bundled CA store (certifi). Set %s=1 to enable it',
44
+ consts.ENABLE_TRUSTSTORE_ENV_VAR_NAME,
45
+ )
46
+ return False
47
+
48
+ if not is_supported():
49
+ logger.warning(
50
+ 'OS trust store requires Python %s+, using the bundled CA store (certifi). Current version: %s',
51
+ '.'.join(map(str, _MIN_PYTHON_VERSION)),
52
+ '.'.join(map(str, sys.version_info[:3])),
53
+ )
54
+ return False
55
+
56
+ try:
57
+ import truststore
58
+
59
+ truststore.inject_into_ssl()
60
+ except Exception as e:
61
+ logger.warning('Failed to use the OS trust store, falling back to the bundled CA store (certifi). %s', e)
62
+ return False
63
+
64
+ logger.debug('Using the OS trust store for TLS verification')
65
+ _installed = True
66
+ return True
@@ -19,6 +19,7 @@ from cycode.cli.exceptions.custom_exceptions import (
19
19
  RequestTimeoutError,
20
20
  SlowUploadConnectionError,
21
21
  )
22
+ from cycode.cli.utils import trust_store
22
23
  from cycode.cyclient import config
23
24
  from cycode.cyclient.headers import get_cli_user_agent, get_correlation_id
24
25
  from cycode.cyclient.logger import logger
@@ -28,6 +29,8 @@ if TYPE_CHECKING:
28
29
 
29
30
 
30
31
  class SystemStorageSslContext(HTTPAdapter):
32
+ """Windows system trust store path, used when truststore is not active."""
33
+
31
34
  def init_poolmanager(self, *args, **kwargs) -> None:
32
35
  default_context = ssl.create_default_context()
33
36
  default_context.load_default_certs()
@@ -43,11 +46,13 @@ class SystemStorageSslContext(HTTPAdapter):
43
46
  @functools.cache
44
47
  def _get_session() -> requests.Session:
45
48
  """Process-wide Session so TCP+TLS connections are reused across all API calls."""
49
+ trust_store.install()
50
+
46
51
  session = requests.Session()
47
- # On Windows without an explicit CA bundle env var, fall back to the system
48
- # trust store via a custom SSL context.
49
- if platform.system() == 'Windows' and not (
50
- os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE')
52
+ if (
53
+ not trust_store.is_installed()
54
+ and platform.system() == 'Windows'
55
+ and not (os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE'))
51
56
  ):
52
57
  session.mount('https://', SystemStorageSslContext())
53
58
  return session
@@ -14,6 +14,7 @@ from cycode.cli.exceptions.custom_exceptions import (
14
14
  SlowUploadConnectionError,
15
15
  )
16
16
  from cycode.cli.files_collector.models.in_memory_zip import InMemoryZip
17
+ from cycode.cli.utils import trust_store
17
18
  from cycode.cyclient import models
18
19
  from cycode.cyclient.cycode_client_base import CycodeClientBase, UploadProgressTracker
19
20
  from cycode.cyclient.logger import logger
@@ -153,7 +154,9 @@ class ScanClient:
153
154
  tracker = UploadProgressTracker(prepared.body, on_upload_progress)
154
155
 
155
156
  try:
156
- # We are not using Cycode client, as we are calling aws S3.
157
+ # We are not using Cycode client, as we are calling aws S3. That also means this call
158
+ # skips the shared session, so the OS trust store has to be installed explicitly here.
159
+ trust_store.install()
157
160
  response = requests.post(
158
161
  url,
159
162
  data=tracker,
@@ -21,7 +21,7 @@ classifiers = [
21
21
  "Programming Language :: Python :: 3.14",
22
22
  ]
23
23
  dynamic = ["dependencies"]
24
- version = "3.20.0"
24
+ version = "3.20.1.dev1"
25
25
 
26
26
  [project.scripts]
27
27
  cycode = "cycode.cli.app:app"
@@ -49,6 +49,7 @@ patch-ng = "1.19.1"
49
49
  typer = "^0.15.3"
50
50
  tenacity = ">=9.1.2,<9.2.0"
51
51
  mcp = { version = ">=1.28.1,<2.0.0", markers = "python_version >= '3.10'" }
52
+ truststore = { version = ">=0.10.4,<0.11.0", markers = "python_version >= '3.10'" }
52
53
  pydantic = ">=2.11.5,<3.0.0"
53
54
  pathvalidate = ">=3.3.1,<4.0.0"
54
55
  tomli-w = ">=1.0.0,<2.0.0"
File without changes
File without changes
File without changes