cycode 3.11.3__tar.gz → 3.11.5.dev2__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 (203) hide show
  1. {cycode-3.11.3 → cycode-3.11.5.dev2}/PKG-INFO +1 -1
  2. cycode-3.11.5.dev2/cycode/__init__.py +1 -0
  3. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/__init__.py +4 -0
  4. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/consts.py +32 -9
  5. cycode-3.11.5.dev2/cycode/cli/apps/ai_guardrails/ensure_auth_command.py +21 -0
  6. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/hooks_manager.py +61 -5
  7. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/install_command.py +40 -12
  8. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/handlers.py +3 -5
  9. {cycode-3.11.3 → cycode-3.11.5.dev2}/pyproject.toml +1 -1
  10. cycode-3.11.3/cycode/__init__.py +0 -1
  11. {cycode-3.11.3 → cycode-3.11.5.dev2}/LICENCE +0 -0
  12. {cycode-3.11.3 → cycode-3.11.5.dev2}/README.md +0 -0
  13. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/__main__.py +0 -0
  14. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/__init__.py +0 -0
  15. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/app.py +0 -0
  16. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/__init__.py +0 -0
  17. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/command_utils.py +0 -0
  18. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/__init__.py +0 -0
  19. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/consts.py +0 -0
  20. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/payload.py +0 -0
  21. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/policy.py +0 -0
  22. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/response_builders.py +0 -0
  23. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/scan_command.py +0 -0
  24. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/types.py +0 -0
  25. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/scan/utils.py +0 -0
  26. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/status_command.py +0 -0
  27. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_guardrails/uninstall_command.py +0 -0
  28. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_remediation/__init__.py +0 -0
  29. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_remediation/ai_remediation_command.py +0 -0
  30. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_remediation/apply_fix.py +0 -0
  31. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ai_remediation/print_remediation.py +0 -0
  32. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/auth/__init__.py +0 -0
  33. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/auth/auth_command.py +0 -0
  34. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/auth/auth_common.py +0 -0
  35. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/auth/auth_manager.py +0 -0
  36. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/auth/models.py +0 -0
  37. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/configure/__init__.py +0 -0
  38. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/configure/configure_command.py +0 -0
  39. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/configure/consts.py +0 -0
  40. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/configure/messages.py +0 -0
  41. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/configure/prompts.py +0 -0
  42. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ignore/__init__.py +0 -0
  43. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/ignore/ignore_command.py +0 -0
  44. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/mcp/__init__.py +0 -0
  45. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/mcp/mcp_command.py +0 -0
  46. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/__init__.py +0 -0
  47. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/report_command.py +0 -0
  48. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/__init__.py +0 -0
  49. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/common.py +0 -0
  50. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/path/__init__.py +0 -0
  51. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/path/path_command.py +0 -0
  52. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/repository_url/__init__.py +0 -0
  53. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/repository_url/repository_url_command.py +0 -0
  54. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/sbom_command.py +0 -0
  55. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report/sbom/sbom_report_file.py +0 -0
  56. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report_import/__init__.py +0 -0
  57. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report_import/report_import_command.py +0 -0
  58. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report_import/sbom/__init__.py +0 -0
  59. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/report_import/sbom/sbom_command.py +0 -0
  60. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/sca_options.py +0 -0
  61. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/__init__.py +0 -0
  62. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/aggregation_report.py +0 -0
  63. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/code_scanner.py +0 -0
  64. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/commit_history/__init__.py +0 -0
  65. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/commit_history/commit_history_command.py +0 -0
  66. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/commit_range_scanner.py +0 -0
  67. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/detection_excluder.py +0 -0
  68. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/path/__init__.py +0 -0
  69. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/path/path_command.py +0 -0
  70. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_commit/__init__.py +0 -0
  71. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_commit/pre_commit_command.py +0 -0
  72. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_push/__init__.py +0 -0
  73. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_push/pre_push_command.py +0 -0
  74. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_receive/__init__.py +0 -0
  75. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/pre_receive/pre_receive_command.py +0 -0
  76. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/remote_url_resolver.py +0 -0
  77. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/repository/__init__.py +0 -0
  78. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/repository/repository_command.py +0 -0
  79. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_ci/__init__.py +0 -0
  80. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_ci/ci_integrations.py +0 -0
  81. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_ci/scan_ci_command.py +0 -0
  82. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_command.py +0 -0
  83. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_parameters.py +0 -0
  84. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/scan/scan_result.py +0 -0
  85. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/status/__init__.py +0 -0
  86. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/status/get_cli_status.py +0 -0
  87. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/status/models.py +0 -0
  88. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/status/status_command.py +0 -0
  89. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/apps/status/version_command.py +0 -0
  90. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/cli_types.py +0 -0
  91. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/config.py +0 -0
  92. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/console.py +0 -0
  93. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/consts.py +0 -0
  94. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/__init__.py +0 -0
  95. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/custom_exceptions.py +0 -0
  96. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/handle_ai_remediation_errors.py +0 -0
  97. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/handle_auth_errors.py +0 -0
  98. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/handle_errors.py +0 -0
  99. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
  100. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
  101. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/__init__.py +0 -0
  102. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/commit_range_documents.py +0 -0
  103. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/documents_walk_ignore.py +0 -0
  104. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/file_excluder.py +0 -0
  105. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/iac/__init__.py +0 -0
  106. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
  107. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/models/__init__.py +0 -0
  108. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
  109. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/path_documents.py +0 -0
  110. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/repository_documents.py +0 -0
  111. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/__init__.py +0 -0
  112. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/base_restore_dependencies.py +0 -0
  113. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/go/__init__.py +0 -0
  114. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/go/restore_go_dependencies.py +0 -0
  115. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
  116. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
  117. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
  118. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/npm/__init__.py +0 -0
  119. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/npm/restore_deno_dependencies.py +0 -0
  120. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py +0 -0
  121. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/npm/restore_pnpm_dependencies.py +0 -0
  122. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/npm/restore_yarn_dependencies.py +0 -0
  123. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/nuget/__init__.py +0 -0
  124. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/nuget/restore_nuget_dependencies.py +0 -0
  125. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/php/__init__.py +0 -0
  126. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/php/restore_composer_dependencies.py +0 -0
  127. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/python/__init__.py +0 -0
  128. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/python/restore_pipenv_dependencies.py +0 -0
  129. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/python/restore_poetry_dependencies.py +0 -0
  130. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/ruby/__init__.py +0 -0
  131. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/ruby/restore_ruby_dependencies.py +0 -0
  132. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/sbt/__init__.py +0 -0
  133. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py +0 -0
  134. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/sca/sca_file_collector.py +0 -0
  135. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/walk_ignore.py +0 -0
  136. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/files_collector/zip_documents.py +0 -0
  137. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/logger.py +0 -0
  138. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/main.py +0 -0
  139. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/models.py +0 -0
  140. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/__init__.py +0 -0
  141. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/console_printer.py +0 -0
  142. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/json_printer.py +0 -0
  143. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/printer_base.py +0 -0
  144. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/rich_printer.py +0 -0
  145. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/__init__.py +0 -0
  146. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
  147. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/table.py +0 -0
  148. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/table_models.py +0 -0
  149. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/table_printer.py +0 -0
  150. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/tables/table_printer_base.py +0 -0
  151. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/text_printer.py +0 -0
  152. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/__init__.py +0 -0
  153. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/code_snippet_syntax.py +0 -0
  154. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/detection_data.py +0 -0
  155. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/detection_ordering/__init__.py +0 -0
  156. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/detection_ordering/common_ordering.py +0 -0
  157. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/detection_ordering/sca_ordering.py +0 -0
  158. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/printers/utils/rich_helpers.py +0 -0
  159. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/__init__.py +0 -0
  160. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/base_file_manager.py +0 -0
  161. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/config_file_manager.py +0 -0
  162. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/configuration_manager.py +0 -0
  163. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/credentials_manager.py +0 -0
  164. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/user_settings/jwt_creator.py +0 -0
  165. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/__init__.py +0 -0
  166. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/binary_utils.py +0 -0
  167. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/enum_utils.py +0 -0
  168. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/get_api_client.py +0 -0
  169. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/git_proxy.py +0 -0
  170. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/ignore_utils.py +0 -0
  171. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/jwt_utils.py +0 -0
  172. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/path_utils.py +0 -0
  173. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/progress_bar.py +0 -0
  174. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/scan_batch.py +0 -0
  175. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/scan_utils.py +0 -0
  176. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/shell_executor.py +0 -0
  177. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/string_utils.py +0 -0
  178. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/task_timer.py +0 -0
  179. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/url_utils.py +0 -0
  180. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/version_checker.py +0 -0
  181. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cli/utils/yaml_utils.py +0 -0
  182. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/config.py +0 -0
  183. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/__init__.py +0 -0
  184. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/ai_security_manager_client.py +0 -0
  185. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/ai_security_manager_service_config.py +0 -0
  186. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/auth_client.py +0 -0
  187. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/base_token_auth_client.py +0 -0
  188. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/client_creator.py +0 -0
  189. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/config.py +0 -0
  190. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/config_dev.py +0 -0
  191. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/cycode_client.py +0 -0
  192. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/cycode_client_base.py +0 -0
  193. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/cycode_dev_based_client.py +0 -0
  194. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/cycode_oidc_based_client.py +0 -0
  195. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/cycode_token_based_client.py +0 -0
  196. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/headers.py +0 -0
  197. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/import_sbom_client.py +0 -0
  198. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/logger.py +0 -0
  199. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/models.py +0 -0
  200. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/report_client.py +0 -0
  201. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/scan_client.py +0 -0
  202. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/cyclient/scan_config_base.py +0 -0
  203. {cycode-3.11.3 → cycode-3.11.5.dev2}/cycode/logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycode
3
- Version: 3.11.3
3
+ Version: 3.11.5.dev2
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
@@ -0,0 +1 @@
1
+ __version__ = '3.11.5.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -1,5 +1,6 @@
1
1
  import typer
2
2
 
3
+ from cycode.cli.apps.ai_guardrails.ensure_auth_command import ensure_auth_command
3
4
  from cycode.cli.apps.ai_guardrails.install_command import install_command
4
5
  from cycode.cli.apps.ai_guardrails.scan.scan_command import scan_command
5
6
  from cycode.cli.apps.ai_guardrails.status_command import status_command
@@ -17,3 +18,6 @@ app.command(
17
18
  name='scan',
18
19
  short_help='Scan content from AI IDE hooks for secrets (reads JSON from stdin).',
19
20
  )(scan_command)
21
+ app.command(hidden=True, name='ensure-auth', short_help='Ensure authentication, triggering auth if needed.')(
22
+ ensure_auth_command
23
+ )
@@ -6,6 +6,7 @@ Currently supports:
6
6
  """
7
7
 
8
8
  import platform
9
+ from copy import deepcopy
9
10
  from enum import Enum
10
11
  from pathlib import Path
11
12
  from typing import NamedTuple
@@ -25,6 +26,13 @@ class PolicyMode(str, Enum):
25
26
  WARN = 'warn'
26
27
 
27
28
 
29
+ class InstallMode(str, Enum):
30
+ """Installation mode for ai-guardrails install command."""
31
+
32
+ REPORT = 'report'
33
+ BLOCK = 'block'
34
+
35
+
28
36
  class IDEConfig(NamedTuple):
29
37
  """Configuration for an AI IDE."""
30
38
 
@@ -76,12 +84,15 @@ DEFAULT_IDE = AIIDEType.CURSOR
76
84
 
77
85
  # Command used in hooks
78
86
  CYCODE_SCAN_PROMPT_COMMAND = 'cycode ai-guardrails scan'
87
+ CYCODE_ENSURE_AUTH_COMMAND = 'cycode ai-guardrails ensure-auth'
79
88
 
80
89
 
81
- def _get_cursor_hooks_config() -> dict:
90
+ def _get_cursor_hooks_config(async_mode: bool = False) -> dict:
82
91
  """Get Cursor-specific hooks configuration."""
83
92
  config = IDE_CONFIGS[AIIDEType.CURSOR]
84
- hooks = {event: [{'command': CYCODE_SCAN_PROMPT_COMMAND}] for event in config.hook_events}
93
+ command = f'{CYCODE_SCAN_PROMPT_COMMAND} &' if async_mode else CYCODE_SCAN_PROMPT_COMMAND
94
+ hooks = {event: [{'command': command}] for event in config.hook_events}
95
+ hooks['sessionStart'] = [{'command': CYCODE_ENSURE_AUTH_COMMAND}]
85
96
 
86
97
  return {
87
98
  'version': 1,
@@ -89,7 +100,7 @@ def _get_cursor_hooks_config() -> dict:
89
100
  }
90
101
 
91
102
 
92
- def _get_claude_code_hooks_config() -> dict:
103
+ def _get_claude_code_hooks_config(async_mode: bool = False) -> dict:
93
104
  """Get Claude Code-specific hooks configuration.
94
105
 
95
106
  Claude Code uses a different hook format with nested structure:
@@ -98,36 +109,48 @@ def _get_claude_code_hooks_config() -> dict:
98
109
  """
99
110
  command = f'{CYCODE_SCAN_PROMPT_COMMAND} --ide claude-code'
100
111
 
112
+ hook_entry = {'type': 'command', 'command': command}
113
+ if async_mode:
114
+ hook_entry['async'] = True
115
+ hook_entry['timeout'] = 20
116
+
101
117
  return {
102
118
  'hooks': {
119
+ 'SessionStart': [
120
+ {
121
+ 'matcher': 'startup',
122
+ 'hooks': [{'type': 'command', 'command': CYCODE_ENSURE_AUTH_COMMAND}],
123
+ }
124
+ ],
103
125
  'UserPromptSubmit': [
104
126
  {
105
- 'hooks': [{'type': 'command', 'command': command}],
127
+ 'hooks': [deepcopy(hook_entry)],
106
128
  }
107
129
  ],
108
130
  'PreToolUse': [
109
131
  {
110
132
  'matcher': 'Read',
111
- 'hooks': [{'type': 'command', 'command': command}],
133
+ 'hooks': [deepcopy(hook_entry)],
112
134
  },
113
135
  {
114
136
  'matcher': 'mcp__.*',
115
- 'hooks': [{'type': 'command', 'command': command}],
137
+ 'hooks': [deepcopy(hook_entry)],
116
138
  },
117
139
  ],
118
140
  },
119
141
  }
120
142
 
121
143
 
122
- def get_hooks_config(ide: AIIDEType) -> dict:
144
+ def get_hooks_config(ide: AIIDEType, async_mode: bool = False) -> dict:
123
145
  """Get the hooks configuration for a specific IDE.
124
146
 
125
147
  Args:
126
148
  ide: The AI IDE type
149
+ async_mode: If True, hooks run asynchronously (non-blocking)
127
150
 
128
151
  Returns:
129
152
  Dict with hooks configuration for the specified IDE
130
153
  """
131
154
  if ide == AIIDEType.CLAUDE_CODE:
132
- return _get_claude_code_hooks_config()
133
- return _get_cursor_hooks_config()
155
+ return _get_claude_code_hooks_config(async_mode=async_mode)
156
+ return _get_cursor_hooks_config(async_mode=async_mode)
@@ -0,0 +1,21 @@
1
+ import typer
2
+
3
+ from cycode.cli.apps.auth.auth_common import get_authorization_info
4
+ from cycode.cli.apps.auth.auth_manager import AuthManager
5
+ from cycode.cli.exceptions.handle_auth_errors import handle_auth_exception
6
+ from cycode.cli.logger import logger
7
+
8
+
9
+ def ensure_auth_command(ctx: typer.Context) -> None:
10
+ """Ensure the user is authenticated, triggering authentication if needed."""
11
+ auth_info = get_authorization_info(ctx)
12
+ if auth_info is not None:
13
+ logger.debug('Already authenticated')
14
+ return
15
+
16
+ logger.debug('Not authenticated, starting authentication')
17
+ try:
18
+ auth_manager = AuthManager()
19
+ auth_manager.authenticate()
20
+ except Exception as err:
21
+ handle_auth_exception(ctx, err)
@@ -5,17 +5,21 @@ Handles installation, removal, and status checking of AI IDE hooks.
5
5
  Supports multiple IDEs: Cursor, Claude Code (future).
6
6
  """
7
7
 
8
+ import copy
8
9
  import json
9
10
  from pathlib import Path
10
11
  from typing import Optional
11
12
 
13
+ import yaml
14
+
12
15
  from cycode.cli.apps.ai_guardrails.consts import (
13
- CYCODE_SCAN_PROMPT_COMMAND,
14
16
  DEFAULT_IDE,
15
17
  IDE_CONFIGS,
16
18
  AIIDEType,
19
+ PolicyMode,
17
20
  get_hooks_config,
18
21
  )
22
+ from cycode.cli.apps.ai_guardrails.scan.consts import DEFAULT_POLICY, POLICY_FILE_NAME
19
23
  from cycode.logger import get_logger
20
24
 
21
25
  logger = get_logger('AI Guardrails Hooks')
@@ -58,6 +62,13 @@ def save_hooks_file(hooks_path: Path, hooks_config: dict) -> bool:
58
62
  return False
59
63
 
60
64
 
65
+ _CYCODE_COMMAND_MARKERS = ('cycode ai-guardrails',)
66
+
67
+
68
+ def _is_cycode_command(command: str) -> bool:
69
+ return any(marker in command for marker in _CYCODE_COMMAND_MARKERS)
70
+
71
+
61
72
  def is_cycode_hook_entry(entry: dict) -> bool:
62
73
  """Check if a hook entry is from cycode-cli.
63
74
 
@@ -68,7 +79,7 @@ def is_cycode_hook_entry(entry: dict) -> bool:
68
79
  """
69
80
  # Check Cursor format (flat command)
70
81
  command = entry.get('command', '')
71
- if CYCODE_SCAN_PROMPT_COMMAND in command:
82
+ if _is_cycode_command(command):
72
83
  return True
73
84
 
74
85
  # Check Claude Code format (nested hooks array)
@@ -76,14 +87,58 @@ def is_cycode_hook_entry(entry: dict) -> bool:
76
87
  for hook in hooks:
77
88
  if isinstance(hook, dict):
78
89
  hook_command = hook.get('command', '')
79
- if CYCODE_SCAN_PROMPT_COMMAND in hook_command:
90
+ if _is_cycode_command(hook_command):
80
91
  return True
81
92
 
82
93
  return False
83
94
 
84
95
 
96
+ def _load_policy(policy_path: Path) -> dict:
97
+ """Load existing policy file merged with defaults, or return defaults if not found."""
98
+ if not policy_path.exists():
99
+ return copy.deepcopy(DEFAULT_POLICY)
100
+ try:
101
+ existing = yaml.safe_load(policy_path.read_text(encoding='utf-8')) or {}
102
+ except Exception:
103
+ existing = {}
104
+ return {**copy.deepcopy(DEFAULT_POLICY), **existing}
105
+
106
+
107
+ def create_policy_file(scope: str, mode: PolicyMode, repo_path: Optional[Path] = None) -> tuple[bool, str]:
108
+ """Create or update the ai-guardrails.yaml policy file.
109
+
110
+ If the file already exists, only the mode field is updated.
111
+ If it doesn't exist, a new file is created from the default policy.
112
+
113
+ Args:
114
+ scope: 'user' for user-level, 'repo' for repository-level
115
+ mode: The policy mode to set
116
+ repo_path: Repository path (required if scope is 'repo')
117
+
118
+ Returns:
119
+ Tuple of (success, message)
120
+ """
121
+ config_dir = repo_path / '.cycode' if scope == 'repo' and repo_path else Path.home() / '.cycode'
122
+ policy_path = config_dir / POLICY_FILE_NAME
123
+
124
+ policy = _load_policy(policy_path)
125
+
126
+ policy['mode'] = mode.value
127
+
128
+ try:
129
+ config_dir.mkdir(parents=True, exist_ok=True)
130
+ policy_path.write_text(yaml.dump(policy, default_flow_style=False, sort_keys=False), encoding='utf-8')
131
+ return True, f'AI guardrails policy ({mode.value} mode) set: {policy_path}'
132
+ except Exception as e:
133
+ logger.error('Failed to create policy file', exc_info=e)
134
+ return False, f'Failed to create policy file: {policy_path}'
135
+
136
+
85
137
  def install_hooks(
86
- scope: str = 'user', repo_path: Optional[Path] = None, ide: AIIDEType = DEFAULT_IDE
138
+ scope: str = 'user',
139
+ repo_path: Optional[Path] = None,
140
+ ide: AIIDEType = DEFAULT_IDE,
141
+ report_mode: bool = False,
87
142
  ) -> tuple[bool, str]:
88
143
  """
89
144
  Install Cycode AI guardrails hooks.
@@ -92,6 +147,7 @@ def install_hooks(
92
147
  scope: 'user' for user-level hooks, 'repo' for repository-level hooks
93
148
  repo_path: Repository path (required if scope is 'repo')
94
149
  ide: The AI IDE type (default: Cursor)
150
+ report_mode: If True, install hooks in async mode (non-blocking)
95
151
 
96
152
  Returns:
97
153
  Tuple of (success, message)
@@ -104,7 +160,7 @@ def install_hooks(
104
160
  existing.setdefault('hooks', {})
105
161
 
106
162
  # Get IDE-specific hooks configuration
107
- hooks_config = get_hooks_config(ide)
163
+ hooks_config = get_hooks_config(ide, async_mode=report_mode)
108
164
 
109
165
  # Add/update Cycode hooks
110
166
  for event, entries in hooks_config['hooks'].items():
@@ -11,8 +11,8 @@ from cycode.cli.apps.ai_guardrails.command_utils import (
11
11
  validate_and_parse_ide,
12
12
  validate_scope,
13
13
  )
14
- from cycode.cli.apps.ai_guardrails.consts import IDE_CONFIGS, AIIDEType
15
- from cycode.cli.apps.ai_guardrails.hooks_manager import install_hooks
14
+ from cycode.cli.apps.ai_guardrails.consts import IDE_CONFIGS, AIIDEType, InstallMode, PolicyMode
15
+ from cycode.cli.apps.ai_guardrails.hooks_manager import create_policy_file, install_hooks
16
16
 
17
17
 
18
18
  def install_command(
@@ -43,6 +43,15 @@ def install_command(
43
43
  resolve_path=True,
44
44
  ),
45
45
  ] = None,
46
+ mode: Annotated[
47
+ InstallMode,
48
+ typer.Option(
49
+ '--mode',
50
+ '-m',
51
+ help='Installation mode: "report" for async non-blocking hooks with warn policy, '
52
+ '"block" for sync blocking hooks.',
53
+ ),
54
+ ] = InstallMode.REPORT,
46
55
  ) -> None:
47
56
  """Install AI guardrails hooks for supported IDEs.
48
57
 
@@ -50,7 +59,8 @@ def install_command(
50
59
  and MCP tool calls for secrets before they are sent to AI models.
51
60
 
52
61
  Examples:
53
- cycode ai-guardrails install # Install for all projects (user scope)
62
+ cycode ai-guardrails install # Install in report mode (default)
63
+ cycode ai-guardrails install --mode block # Install in block mode
54
64
  cycode ai-guardrails install --scope repo # Install for current repo only
55
65
  cycode ai-guardrails install --ide cursor # Install for Cursor IDE
56
66
  cycode ai-guardrails install --ide all # Install for all supported IDEs
@@ -66,7 +76,8 @@ def install_command(
66
76
  results: list[tuple[str, bool, str]] = []
67
77
  for current_ide in ides_to_install:
68
78
  ide_name = IDE_CONFIGS[current_ide].name
69
- success, message = install_hooks(scope, repo_path, ide=current_ide)
79
+ report_mode = mode == InstallMode.REPORT
80
+ success, message = install_hooks(scope, repo_path, ide=current_ide, report_mode=report_mode)
70
81
  results.append((ide_name, success, message))
71
82
 
72
83
  # Report results for each IDE
@@ -81,14 +92,31 @@ def install_command(
81
92
  all_success = False
82
93
 
83
94
  if any_success:
84
- console.print()
85
- console.print('[bold]Next steps:[/]')
86
- successful_ides = [name for name, success, _ in results if success]
87
- ide_list = ', '.join(successful_ides)
88
- console.print(f'1. Restart {ide_list} to activate the hooks')
89
- console.print('2. (Optional) Customize policy in ~/.cycode/ai-guardrails.yaml')
90
- console.print()
91
- console.print('[dim]The hooks will scan prompts, file reads, and MCP tool calls for secrets.[/]')
95
+ policy_mode = PolicyMode.WARN if mode == InstallMode.REPORT else PolicyMode.BLOCK
96
+ _install_policy(scope, repo_path, policy_mode)
97
+ _print_next_steps(results, mode)
92
98
 
93
99
  if not all_success:
94
100
  raise typer.Exit(1)
101
+
102
+
103
+ def _install_policy(scope: str, repo_path: Optional[Path], policy_mode: PolicyMode) -> None:
104
+ policy_success, policy_message = create_policy_file(scope, policy_mode, repo_path)
105
+ if policy_success:
106
+ console.print(f'[green]✓[/] {policy_message}')
107
+ else:
108
+ console.print(f'[red]✗[/] {policy_message}', style='bold red')
109
+
110
+
111
+ def _print_next_steps(results: list[tuple[str, bool, str]], mode: InstallMode) -> None:
112
+ console.print()
113
+ console.print('[bold]Next steps:[/]')
114
+ successful_ides = [name for name, success, _ in results if success]
115
+ ide_list = ', '.join(successful_ides)
116
+ console.print(f'1. Restart {ide_list} to activate the hooks')
117
+ console.print('2. (Optional) Customize policy in ~/.cycode/ai-guardrails.yaml')
118
+ console.print()
119
+ if mode == InstallMode.REPORT:
120
+ console.print('[dim]Report mode: hooks run async (non-blocking) and policy is set to warn.[/]')
121
+ else:
122
+ console.print('[dim]The hooks will scan prompts, file reads, and MCP tool calls for secrets.[/]')
@@ -345,12 +345,10 @@ def _scan_path_for_secrets(ctx: typer.Context, file_path: str, policy: dict) ->
345
345
  if not file_path or not os.path.exists(file_path):
346
346
  return None, None
347
347
 
348
- with open(file_path, encoding='utf-8', errors='replace') as f:
349
- content = f.read()
350
-
351
- # Truncate content based on policy max_bytes
352
348
  max_bytes = get_policy_value(policy, 'secrets', 'max_bytes', default=200000)
353
- content = truncate_utf8(content, max_bytes)
349
+
350
+ with open(file_path, encoding='utf-8', errors='replace') as f:
351
+ content = f.read(max_bytes)
354
352
 
355
353
  # Get timeout from policy
356
354
  timeout_ms = get_policy_value(policy, 'secrets', 'timeout_ms', default=30000)
@@ -21,7 +21,7 @@ classifiers = [
21
21
  "Programming Language :: Python :: 3.14",
22
22
  ]
23
23
  dynamic = ["dependencies"]
24
- version = "3.11.3"
24
+ version = "3.11.5.dev2"
25
25
 
26
26
  [project.scripts]
27
27
  cycode = "cycode.cli.app:app"
@@ -1 +0,0 @@
1
- __version__ = '3.11.3' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes