codedd-cli 0.1.10__tar.gz → 0.1.12__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 (241) hide show
  1. codedd_cli-0.1.12/LICENSE +201 -0
  2. codedd_cli-0.1.12/NOTICE +4 -0
  3. codedd_cli-0.1.12/PKG-INFO +434 -0
  4. codedd_cli-0.1.12/README.md +393 -0
  5. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/__init__.py +1 -1
  6. codedd_cli-0.1.12/codedd_cli/api/client.py +272 -0
  7. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/api/endpoints.py +2 -0
  8. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/archetype_classifier.py +51 -7
  9. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/architecture_analyzer.py +170 -78
  10. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/audit_checkpoint.py +316 -35
  11. codedd_cli-0.1.12/codedd_cli/auditor/audit_log.py +318 -0
  12. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/complexity_analyzer.py +101 -15
  13. codedd_cli-0.1.12/codedd_cli/auditor/cross_repo_evidence.py +342 -0
  14. codedd_cli-0.1.12/codedd_cli/auditor/dependency_scanner.py +868 -0
  15. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/file_auditor.py +248 -133
  16. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/git_stats_collector.py +8 -1
  17. codedd_cli-0.1.12/codedd_cli/auditor/parity_overrides.py +488 -0
  18. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/response_parser.py +54 -3
  19. codedd_cli-0.1.12/codedd_cli/auditor/security_scope.py +446 -0
  20. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/MANIFEST.json +940 -0
  21. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/__init__.py +45 -0
  22. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/architecture_style.py +632 -0
  23. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/architecture_taxonomy.py +806 -0
  24. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/datastore_topology.py +1773 -0
  25. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/deployable_census.py +3128 -0
  26. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/deployment_profile.py +2467 -0
  27. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/deployment_runtime.py +1791 -0
  28. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_catalog.py +721 -0
  29. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_config.py +69 -0
  30. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_paths.py +465 -0
  31. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_registry.py +339 -0
  32. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_runner.py +826 -0
  33. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_text.py +163 -0
  34. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/detector_urls.py +281 -0
  35. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/evidence_extractor.py +2215 -0
  36. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/fact_readers.py +580 -0
  37. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/__init__.py +29 -0
  38. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/__init__.py +1 -0
  39. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/architecture/__init__.py +1 -0
  40. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/architecture/detectors/__init__.py +19 -0
  41. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/architecture/detectors/detector_paths.py +465 -0
  42. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/architecture/repo_identity.py +280 -0
  43. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/__init__.py +75 -0
  44. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/cli_projection.py +1015 -0
  45. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/data/commercial_registry_hosts.json +38 -0
  46. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/data/public_registry_hosts.json +158 -0
  47. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/data/vendored_single_files.json +134 -0
  48. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/declarations.py +580 -0
  49. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/identity.py +416 -0
  50. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/inventory_scan.py +649 -0
  51. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/__init__.py +23 -0
  52. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/base.py +353 -0
  53. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/ci_pipelines.py +1046 -0
  54. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/clojure.py +609 -0
  55. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/conda.py +994 -0
  56. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/dart.py +668 -0
  57. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/dotnet.py +1952 -0
  58. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/elixir.py +671 -0
  59. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/erlang.py +723 -0
  60. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/golang.py +1233 -0
  61. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/haskell.py +976 -0
  62. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/javascript.py +3570 -0
  63. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/julia.py +461 -0
  64. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/jvm_gradle.py +3013 -0
  65. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/jvm_maven.py +1274 -0
  66. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/jvm_other.py +648 -0
  67. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/jvm_sbt.py +701 -0
  68. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/legacy_fallback.py +42 -0
  69. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/lua.py +464 -0
  70. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/native.py +2304 -0
  71. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/nim.py +510 -0
  72. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/ocaml.py +808 -0
  73. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/perl.py +1041 -0
  74. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/php.py +734 -0
  75. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/python.py +3317 -0
  76. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/r_lang.py +878 -0
  77. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/registry.py +253 -0
  78. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/ruby.py +877 -0
  79. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/rust.py +666 -0
  80. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/swift.py +2636 -0
  81. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/manifests/vendored.py +2352 -0
  82. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/records.py +914 -0
  83. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/registry_config.py +3403 -0
  84. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/shared/dependencies/taxonomy.py +833 -0
  85. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/__init__.py +1 -0
  86. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/__init__.py +1 -0
  87. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/extension_package_parser.py +198 -0
  88. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/__init__.py +267 -0
  89. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/dotnet.py +143 -0
  90. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/golang.py +102 -0
  91. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/javascript.py +221 -0
  92. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/jvm.py +247 -0
  93. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/misc.py +598 -0
  94. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/native_apple.py +413 -0
  95. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/php_ruby_rust.py +345 -0
  96. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/import_extractors/python.py +337 -0
  97. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/registry_prefix_map.py +248 -0
  98. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/registry_prefix_mapper.py +505 -0
  99. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/functions/step_5/dependency_processor/version_resolver.py +1694 -0
  100. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/infra_scan.py +441 -0
  101. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/interface_evidence.py +1761 -0
  102. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/job_reliability.py +676 -0
  103. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/jvm_builds.py +195 -0
  104. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/kind_classifier.py +2475 -0
  105. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/manifest_coordinate_resolver.py +50 -7
  106. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/mask_secrets.py +2586 -0
  107. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/observability_setup.py +734 -0
  108. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_compose.py +136 -0
  109. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_container.py +311 -0
  110. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_deployment.py +59 -0
  111. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_django.py +249 -0
  112. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_dotnet.py +308 -0
  113. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_ecs.py +90 -0
  114. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_env.py +97 -0
  115. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_go.py +225 -0
  116. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_kubernetes.py +217 -0
  117. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_laravel.py +200 -0
  118. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_node.py +374 -0
  119. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_paas.py +337 -0
  120. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_python.py +293 -0
  121. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_rails.py +453 -0
  122. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_serverless.py +348 -0
  123. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_spring.py +522 -0
  124. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/pack_terraform.py +225 -0
  125. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/platform_capabilities.py +357 -0
  126. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/published_identity.py +561 -0
  127. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/reader_evidence.py +430 -0
  128. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/registry_prefix_map.py +248 -0
  129. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/repo_kind.py +273 -0
  130. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/repository_facts.py +436 -0
  131. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/runtime_images.py +78 -0
  132. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/runtime_packages.py +945 -0
  133. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/style_derivation.py +428 -0
  134. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/taxonomy.py +39 -16
  135. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/tech_normalizer.py +1817 -0
  136. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/technology_lists.py +2695 -185
  137. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/tier_definitions.py +2158 -0
  138. codedd_cli-0.1.12/codedd_cli/auditor/server_parity/url_userinfo.py +28 -0
  139. codedd_cli-0.1.12/codedd_cli/auditor/sub_audit_runner.py +2824 -0
  140. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/agents.py +6 -2
  141. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/cli_ai_auditor.py +51 -7
  142. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/cli_orchestrator.py +85 -19
  143. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/cli_settings.py +0 -3
  144. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/file_io.py +10 -7
  145. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/__init__.py +18 -3
  146. codedd_cli-0.1.12/codedd_cli/auditor/vulnerability_analysis/lang_ast/_common.py +118 -0
  147. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/_generic.py +30 -16
  148. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/java.py +23 -10
  149. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/js_ts.py +23 -10
  150. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/shell.py +23 -10
  151. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/taint.py +55 -27
  152. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_snippets.py +5 -5
  153. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/langgraph_runner.py +62 -36
  154. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/planner.py +2 -2
  155. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/semgrep_runner.py +8 -1
  156. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/tools.py +8 -3
  157. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_validator.py +5 -0
  158. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/ai_docs_cmd.py +112 -18
  159. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/audit_cmd.py +1266 -225
  160. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/config_cmd.py +45 -6
  161. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/fix_cmd.py +974 -194
  162. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/scope_cmd.py +131 -29
  163. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/config/settings.py +124 -32
  164. codedd_cli-0.1.12/codedd_cli/config/url_validation.py +199 -0
  165. codedd_cli-0.1.12/codedd_cli/llm/anthropic_utils.py +220 -0
  166. codedd_cli-0.1.12/codedd_cli/llm/call_attempts.py +78 -0
  167. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/llm/key_manager.py +43 -21
  168. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/scanner/file_walker.py +27 -11
  169. codedd_cli-0.1.12/codedd_cli/utils/child_process.py +29 -0
  170. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/display.py +38 -2
  171. codedd_cli-0.1.12/codedd_cli/utils/secret_masking.py +294 -0
  172. codedd_cli-0.1.12/codedd_cli/utils/transparency.py +233 -0
  173. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/pyproject.toml +19 -7
  174. codedd_cli-0.1.10/LICENSE +0 -21
  175. codedd_cli-0.1.10/PKG-INFO +0 -389
  176. codedd_cli-0.1.10/README.md +0 -349
  177. codedd_cli-0.1.10/codedd_cli/api/client.py +0 -120
  178. codedd_cli-0.1.10/codedd_cli/auditor/cross_repo_evidence.py +0 -83
  179. codedd_cli-0.1.10/codedd_cli/auditor/dependency_scanner.py +0 -2571
  180. codedd_cli-0.1.10/codedd_cli/auditor/parity_overrides.py +0 -204
  181. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/MANIFEST.json +0 -55
  182. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/__init__.py +0 -16
  183. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/evidence_extractor.py +0 -801
  184. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/infra_scan.py +0 -158
  185. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/published_identity.py +0 -290
  186. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/repo_kind.py +0 -103
  187. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/tech_normalizer.py +0 -141
  188. codedd_cli-0.1.10/codedd_cli/auditor/server_parity/tier_definitions.py +0 -703
  189. codedd_cli-0.1.10/codedd_cli/auditor/sub_audit_runner.py +0 -1034
  190. codedd_cli-0.1.10/codedd_cli/config/url_validation.py +0 -139
  191. codedd_cli-0.1.10/codedd_cli/llm/anthropic_utils.py +0 -60
  192. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/__main__.py +0 -0
  193. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/api/__init__.py +0 -0
  194. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/api/exceptions.py +0 -0
  195. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/__init__.py +0 -0
  196. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/architecture_prompts.py +0 -0
  197. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/architecture_schema_contract.py +0 -0
  198. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/audit_progress_sync.py +0 -0
  199. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/commit_classifier.py +0 -0
  200. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/enhanced_relationship_detector.py +0 -0
  201. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/enhanced_technology_detector.py +0 -0
  202. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/server_parity/repo_file.py +0 -0
  203. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/tier_definitions.py +0 -0
  204. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/__init__.py +0 -0
  205. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/c_cpp.py +0 -0
  206. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/csharp.py +0 -0
  207. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/go.py +0 -0
  208. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/kotlin.py +0 -0
  209. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/php.py +0 -0
  210. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/ruby.py +0 -0
  211. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/rust.py +0 -0
  212. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/scala.py +0 -0
  213. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/lang_ast/swift.py +0 -0
  214. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/prompts.py +0 -0
  215. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/scope.py +0 -0
  216. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/security_patterns.py +0 -0
  217. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auditor/vulnerability_analysis/state.py +0 -0
  218. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auth/__init__.py +0 -0
  219. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auth/session.py +0 -0
  220. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/auth/token_manager.py +0 -0
  221. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/cli.py +0 -0
  222. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/__init__.py +0 -0
  223. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/audits_cmd.py +0 -0
  224. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/commands/auth_cmd.py +0 -0
  225. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/config/__init__.py +0 -0
  226. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/config/constants.py +0 -0
  227. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/config/fix_session.py +0 -0
  228. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/llm/__init__.py +0 -0
  229. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/models/__init__.py +0 -0
  230. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/models/account.py +0 -0
  231. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/models/audit.py +0 -0
  232. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/models/local_directory.py +0 -0
  233. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/scanner/__init__.py +0 -0
  234. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/scanner/file_classifier.py +0 -0
  235. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/scanner/line_counter.py +0 -0
  236. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/__init__.py +0 -0
  237. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/directory_validator.py +0 -0
  238. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/payload_inspector.py +0 -0
  239. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/safe_path.py +0 -0
  240. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/security.py +0 -0
  241. {codedd_cli-0.1.10 → codedd_cli-0.1.12}/codedd_cli/utils/validators.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ CodeDD CLI
2
+ Copyright 2026 CodeDD Limited
3
+
4
+ This product includes software developed by CodeDD Limited (https://codedd.ai).
@@ -0,0 +1,434 @@
1
+ Metadata-Version: 2.4
2
+ Name: codedd-cli
3
+ Version: 0.1.12
4
+ Summary: CLI tool for CodeDD — run code audits from your terminal
5
+ License: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Keywords: code-audit,security,cli,codedd
9
+ Author: CodeDD
10
+ Author-email: info@codedd.ai
11
+ Requires-Python: >=3.11,<4.0
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
22
+ Classifier: Topic :: Security
23
+ Classifier: Topic :: Software Development :: Quality Assurance
24
+ Provides-Extra: esprima
25
+ Requires-Dist: defusedxml (>=0.7.1)
26
+ Requires-Dist: esprima (>=4.0.0) ; extra == "esprima"
27
+ Requires-Dist: httpx (>=0.27.0)
28
+ Requires-Dist: keyring (>=25.0.0)
29
+ Requires-Dist: langgraph (>=0.2.0)
30
+ Requires-Dist: lizard (>=1.17.0)
31
+ Requires-Dist: packaging (>=23.0)
32
+ Requires-Dist: pyyaml (>=6.0.0)
33
+ Requires-Dist: radon (>=6.0.0)
34
+ Requires-Dist: rich (>=13.0.0)
35
+ Requires-Dist: tomli-w (>=1.0.0)
36
+ Requires-Dist: typer (>=0.9.0)
37
+ Project-URL: Homepage, https://codedd.ai
38
+ Project-URL: Repository, https://gitlab.com/codedd1/codedd-cli
39
+ Description-Content-Type: text/markdown
40
+
41
+ # CodeDD CLI
42
+
43
+ [![PyPI](https://img.shields.io/pypi/v/codedd-cli)](https://pypi.org/project/codedd-cli/)
44
+ [![Python](https://img.shields.io/pypi/pyversions/codedd-cli)](https://pypi.org/project/codedd-cli/)
45
+ [![License](https://img.shields.io/pypi/l/codedd-cli)](LICENSE)
46
+
47
+ **Run code audits from your terminal.** The CodeDD CLI runs a [CodeDD](https://codedd.ai) audit on your own machine, with your own LLM API keys. Source files stay local; CodeDD receives findings and metrics for consolidation, recommendations, and dashboards.
48
+
49
+ ---
50
+
51
+ ## What is CodeDD CLI?
52
+
53
+ CodeDD CLI is the official command-line interface for the CodeDD platform. You:
54
+
55
+ - **Define scope** — Add one or more local Git repository roots to an audit.
56
+ - **Run analysis locally** — File audits, vulnerability validation, complexity, dependencies, git history, and architecture are analysed on your machine. When an audit runs without security analysis (a CodeDD admin setting, or `codedd audit start --no-security-analysis` on a CodeDD server that supports it), the security sections and vulnerability validation are skipped; dependency and CVE scanning still run.
57
+ - **Sync to CodeDD** — Findings and metrics are submitted to CodeDD, where consolidation, dependency enrichment, security scoring, and recommendations run on the server.
58
+
59
+ Built for teams that want CodeDD’s analytics, recommendations, and reporting without handing over their source code.
60
+
61
+ ---
62
+
63
+ ## What leaves your machine
64
+
65
+ | Data | Stays local | Sent to your LLM provider | Sent to CodeDD |
66
+ |------|:-----------:|:-------------------------:|:--------------:|
67
+ | Source files | ✓ | Files and snippets under analysis, using **your** API key | — |
68
+ | File audit and vulnerability findings | | | ✓ (file paths, line ranges, findings text; no security assessment, flags or validations for repositories where CodeDD excludes security analysis) |
69
+ | Complexity metrics, LoC, file types | | | ✓ |
70
+ | Dependencies (manifests, lockfiles, imports) | | | ✓ (package names, versions and import specifiers; [details below](#dependency-data)) |
71
+ | Git statistics | | | ✓ (commit history metadata, author names) |
72
+ | Architecture components and relationships | | Optional LLM enhancement | ✓ (the `--verbose` local tier estimate is not sent) |
73
+ | Cross-repo evidence (group audits) | | | ✓ (service identities and outbound references from infrastructure, runtime-configuration and interface source files; git-tracked files only when the scope folder is a repository root, and none when git cannot list them) |
74
+ | CLI token, LLM API keys | ✓ (OS keychain or environment) | | — |
75
+
76
+ <a id="dependency-data"></a>**Dependency data.** The CLI reads manifests, lockfiles and imports with the same parsers CodeDD uses for cloud audits, and sends CodeDD:
77
+
78
+ - package names, the version constraints as written in manifests (a tarball URL without its credentials, query or access-token path segments), and the versions resolved in lockfiles;
79
+ - lockfile integrity hashes and the licence identifiers lockfiles record;
80
+ - repository-relative manifest paths (for example `web/package.json`);
81
+ - the import specifiers of each audited file (for example `requests.adapters`), with the package each belongs to; a specifier that is a URL, an absolute or drive path, or looks like a credential is left empty;
82
+ - the package names this repository itself publishes, so its own code is not counted as a dependency;
83
+ - private registry hosts and package-name patterns from registry config files such as `.npmrc` or `pip.conf` (never credentials or tokens);
84
+ - workspace member paths;
85
+ - the git remote's host and owner (for example `github.com` and `acme`), not the full URL.
86
+
87
+ Nothing of the source code is sent. CodeDD looks up vulnerabilities and licences itself. Large repositories are sent in several requests.
88
+
89
+ Run `codedd audit start --show` to review what is sent to CodeDD. You choose whether the audit pauses once per stage (file results, security validation, complexity, dependencies, git statistics, cross-repo evidence, architecture) or before every request and batch. Either way, every payload is saved as JSON under `~/.codedd/transparency/<audit>/<run>/`, with an `index.md` listing each request, so you can check all batches afterwards. Declining a payload stops the audit before it is sent; run `codedd audit start` again to resume.
90
+
91
+ ---
92
+
93
+ ## Features
94
+
95
+ - **Scope management** — Add/remove local directories, sync with CodeDD, detect changes and re-confirm scope (delta updates). Removing a repo from local scope also attempts a best-effort removal of the matching repository on CodeDD.
96
+ - **Local file auditing** — LLM-based file analysis using your Anthropic, OpenAI, Google Gemini, or xAI Grok API key, with batching, configurable concurrency, and progress feedback.
97
+ - **Vulnerability validation** — Candidate findings are checked by an agentic LLM pipeline that reads the surrounding code, traces reachability, and looks for existing mitigations. Uses [Semgrep](https://semgrep.dev) when it is installed.
98
+ - **Security scope from CodeDD** — When CodeDD excludes security analysis for an audit or a single repository (set by a CodeDD admin before the audit starts), the CLI audits those files with CodeDD's no-security form: no section 5 security assessment, no due-diligence flags, no vulnerability validation. Dependency and CVE scanning still run. The summaries say "Security analysis: excluded"; a resumed audit stops before any LLM call if CodeDD's plan no longer matches how its files were audited.
99
+ - **Start without security analysis** — The auditor can ask CodeDD to start an audit without LLM security analysis: `codedd audit start --no-security-analysis`, `CODEDD_SECURITY_ANALYSIS=off`, or `codedd config set security_analysis off` (in that order of precedence). It applies to every repository in the audit and is fixed once the audit starts: it cannot be re-enabled from the CLI, and a later `--security-analysis` or `--no-security-analysis` that disagrees with the audit stops the run (an environment or config setting only prints a notice). The CLI shows what is excluded and asks for confirmation unless `--yes`. Dependency and CVE scanning still run. This needs a CodeDD server that supports the option; other servers refuse it before the audit starts and before any payment, so nothing is deducted.
100
+ - **Complexity analysis** — Cyclomatic complexity, Halstead, and maintainability metrics (Radon/Lizard).
101
+ - **Dependency scanning** — Manifest, lockfile and import parsing with the same parsers CodeDD uses for cloud audits; CodeDD enriches the results with vulnerability and licence data.
102
+ - **Git statistics** — Commit history and repository activity for team and delivery metrics.
103
+ - **Architecture analysis** — Local component and relationship extraction, technology detection, and cross-repository evidence for group audits.
104
+ - **Resumable audits** — Progress is checkpointed; an interrupted `codedd audit start` resumes where it stopped. Ctrl-C stops new LLM calls at once, submits the results that are already back, and exits once the calls in flight return. If CodeDD's rate limit holds up those results, the CLI waits at most 90 s in total; results not sent by then are redone on resume. A second Ctrl-C exits immediately.
105
+ - **Issue remediation (`codedd fix`)** — Work through audit flags and dependency vulnerabilities from the terminal, by priority, per repository, or from an Issue Compass saved list. Built for interactive use and AI-agent loops (`context`, `summarize`, `--json`, exit codes).
106
+ - **Payment and budget** — Pre-flight checks, LoC budget deduction, or Stripe checkout when additional payment is required.
107
+ - **Secure auth** — Tokens and keys stored in the OS credential store (Windows Credential Locker, macOS Keychain, Linux Secret Service), or supplied through environment variables.
108
+
109
+ ---
110
+
111
+ ## Installation
112
+
113
+ ### Requirements
114
+
115
+ - **Python 3.11–3.13** (CI tests 3.11, 3.12 and 3.13; 0.1.11 was the last release for Python 3.10)
116
+ - A [CodeDD](https://codedd.ai) account and a CLI token (Account → CLI Access → Generate Token)
117
+ - An API key for at least one LLM provider (Anthropic, OpenAI, Google Gemini, or xAI Grok)
118
+ - Optional: [Semgrep](https://semgrep.dev/docs/getting-started/) on your `PATH` for additional vulnerability evidence
119
+
120
+ ### Install
121
+
122
+ ```bash
123
+ pip install codedd-cli
124
+ ```
125
+
126
+ Or as an isolated tool:
127
+
128
+ ```bash
129
+ uv tool install codedd-cli
130
+ # or: pipx install codedd-cli
131
+ ```
132
+
133
+ Verify:
134
+
135
+ ```bash
136
+ codedd --version
137
+ ```
138
+
139
+ On Linux, the OS credential store needs a Secret Service provider such as gnome-keyring or KWallet (typically present on desktop environments). Headless servers, containers, and CI runners generally do not; use environment variables instead of `codedd auth login` / `codedd config set-key` (see [Environment variables](#environment-variables)).
140
+
141
+ ### Upgrade and uninstall
142
+
143
+ ```bash
144
+ pip install -U codedd-cli # or: uv tool upgrade codedd-cli / pipx upgrade codedd-cli
145
+ pip uninstall codedd-cli # or: uv tool uninstall codedd-cli / pipx uninstall codedd-cli
146
+ ```
147
+
148
+ If `codedd --version` shows an older version than you installed, another copy is earlier on your `PATH` (`where codedd` on Windows, `which -a codedd` on macOS/Linux).
149
+
150
+ ---
151
+
152
+ ## Quick start
153
+
154
+ ### 1. Authenticate once
155
+
156
+ Generate a CLI token at [codedd.ai](https://codedd.ai) (Account → CLI Access), then:
157
+
158
+ ```bash
159
+ codedd auth login --token <your_token>
160
+ ```
161
+
162
+ Or run `codedd auth login` and paste the token when prompted. Check with `codedd auth status`.
163
+
164
+ On headless Linux or in CI, skip login and export `CODEDD_API_TOKEN` instead (see [Environment variables](#environment-variables)).
165
+
166
+ ### 2. Select the audit
167
+
168
+ ```bash
169
+ codedd audits list
170
+ codedd audits select
171
+ ```
172
+
173
+ Choose a **group audit** (multiple repos) or a **single audit** (one repo). The selected audit is the active context for all `scope` and `audit` commands.
174
+
175
+ ### 3. Define local scope
176
+
177
+ Add the local paths that correspond to the repositories in that audit (each path must be a Git repository root with commits):
178
+
179
+ ```bash
180
+ codedd scope add /path/to/my-repo
181
+ codedd scope list
182
+ codedd scope confirm
183
+ ```
184
+
185
+ `scope confirm` scans paths, file types, and LoC, and registers scope with CodeDD.
186
+ If files change later, `codedd audit start` detects the drift and asks you to re-confirm.
187
+
188
+ ### 4. Configure an LLM key
189
+
190
+ ```bash
191
+ codedd config set-key anthropic
192
+ # or: openai | gemini | grok
193
+ ```
194
+
195
+ Alternatively, export a provider key (see [Environment variables](#environment-variables)). Environment variables take precedence over the keychain.
196
+
197
+ With more than one key configured, `codedd config provider both` uses them in fallback order.
198
+
199
+ ### 5. Start the audit
200
+
201
+ ```bash
202
+ codedd audit start
203
+ ```
204
+
205
+ What `codedd audit start` does, in order:
206
+
207
+ ```text
208
+ A. Scope sync -> re-confirm prompt if local files changed
209
+ B. Pre-flight -> checks audit status, payment, and budget on CodeDD
210
+ C. Payment -> budget deduction or browser checkout
211
+ D. Local analysis -> file audit (LLM), vulnerability validation (skipped when
212
+ CodeDD excludes security analysis), complexity,
213
+ dependencies, git stats, architecture
214
+ E. Submission -> structured results to CodeDD (retries on transient errors)
215
+ F. Completion -> server-side consolidation and recommendations
216
+ ```
217
+
218
+ Follow progress with `codedd audit status --watch`. Results and recommendations appear in the CodeDD dashboard.
219
+
220
+ ### 6. Fix issues (optional, after the audit completes)
221
+
222
+ **Group audit** (multiple repos):
223
+
224
+ ```bash
225
+ codedd fix status # repos ranked by severity
226
+ codedd fix repo my-service # scope to one repository
227
+ codedd fix flags next --auto # next unresolved flag (red first)
228
+ codedd fix resolve --comment "Fixed null check in auth handler"
229
+ ```
230
+
231
+ **Single-repo audit:**
232
+
233
+ ```bash
234
+ codedd fix fetch flags
235
+ codedd fix flags next --auto
236
+ codedd fix resolve --comment "Updated lodash to 4.17.21"
237
+ ```
238
+
239
+ `codedd fix resolve` records the comment, marks the issue fixed, and prints the next one, so the loop is one command per issue. Repeat until the output shows `QUEUE EMPTY`.
240
+
241
+ For dependency vulnerabilities, swap `flags` for `vulns` (`codedd fix fetch vulns`, `codedd fix vulns next --auto`, `codedd fix vulns affected-files <package>`).
242
+
243
+ To work through an Issue Compass saved list from the web UI, run `codedd fix selections list`, then `codedd fix selections use <n>`. Flag commands then use that list’s audit automatically.
244
+
245
+ Without a saved list, filter the flag queue from the terminal. `codedd fix filter set --preset llm` keeps AI findings that are open or inconclusive and hides AI-invalidated, resolved and user-invalidated ones; `--preset llm-validated` also hides findings the AI never validated. `codedd fix flags list` shows the filtered queue without advancing it, and `codedd fix resolve <uuid>` closes any listed flag directly.
246
+
247
+ ---
248
+
249
+ ## Costs
250
+
251
+ - **CodeDD** — Audits run through the CLI are billed like any CodeDD audit, by lines of code in scope. `codedd audit start` checks your budget before any analysis runs and offers checkout if more is needed.
252
+ - **LLM provider** — Model usage is billed by your provider to the API key you configure. `codedd config concurrency <n>` controls how many requests run in parallel, not the total volume.
253
+ - The CLI itself is free.
254
+
255
+ ---
256
+
257
+ ## Commands reference
258
+
259
+ Every command supports `--help`.
260
+
261
+ ### Authentication
262
+
263
+ | Command | Description |
264
+ |--------|-------------|
265
+ | `codedd auth login` | Log in with a CLI token (prompt or `--token`) |
266
+ | `codedd auth logout` | Clear stored credentials |
267
+ | `codedd auth status` | Show current account and token state |
268
+
269
+ ### Audits
270
+
271
+ | Command | Description |
272
+ |--------|-------------|
273
+ | `codedd audits list` | List audits (`--type single\|group`, `--limit`, `--page`) |
274
+ | `codedd audits select [uuid]` | Set active audit (interactive if UUID omitted) |
275
+
276
+ ### Scope
277
+
278
+ | Command | Description |
279
+ |--------|-------------|
280
+ | `codedd scope add <path> [path ...]` | Add Git repository root(s) to the active audit’s scope |
281
+ | `codedd scope remove <n> [--yes]` | Remove directory by list number; if it is registered on CodeDD, the repository is also deleted there (irreversible) after confirmation (`--yes` skips the prompt; non-interactive runs without `--yes` update local scope only) |
282
+ | `codedd scope list` | List directories in scope |
283
+ | `codedd scope clear` | Remove all directories from scope |
284
+ | `codedd scope status` | Show scope and sync state per directory |
285
+ | `codedd scope confirm` | Scan, preview, and register scope with CodeDD |
286
+ | `codedd scope sync` | Compare local vs CodeDD and show changes |
287
+
288
+ ### Audit execution
289
+
290
+ | Command | Description |
291
+ |--------|-------------|
292
+ | `codedd audit start` | Sync scope, run pre-flight and payment, then run the local audit and submit to CodeDD |
293
+ | `codedd audit status [--watch] [--interval N]` | Show pipeline progress for an active or resumable audit; `--watch` polls until it completes |
294
+
295
+ `codedd audit start` options:
296
+
297
+ | Option | Effect |
298
+ |--------|--------|
299
+ | `--yes` | Auto-confirm prompts (CI) |
300
+ | `--skip-sync` | Skip the scope sync check |
301
+ | `--show` | Review payloads sent to CodeDD; asks whether to pause once per stage or at every request (see [What leaves your machine](#what-leaves-your-machine)) |
302
+ | `--show-interactive` | Like `--show`, but pause before every request and batch without asking |
303
+ | `--show-force-interactive` | With `--show-interactive`, skip the offer to switch to per-stage review on large audits |
304
+ | `--debug-llm` | Print LLM request/response debug output |
305
+ | `--debug-llm-full-prompt` | Include the full system prompt in `--debug-llm` output (sensitive) |
306
+ | `--verbose` | Show the local architecture tier estimate (labelled; CodeDD computes the tier itself) and one architecture row per repository in the final summary |
307
+ | `--no-security-analysis` | Start the audit without LLM security analysis: no section 5 assessment, no due-diligence flags, no vulnerability validation (dependency and CVE scanning still run). For every repository, fixed at audit start, auditor only, and needs CodeDD server support. `--security-analysis` asks for it explicitly and stops if CodeDD excluded it. Default: `CODEDD_SECURITY_ANALYSIS`, then `[audit] security_analysis`, then on |
308
+
309
+ ### Issue remediation (`codedd fix`)
310
+
311
+ Requires a completed audit with remediation data on CodeDD.
312
+
313
+ | Command | Description |
314
+ |--------|-------------|
315
+ | `codedd fix status [--json]` | Dashboard of open flags/vulns; repos ranked by severity in group audits |
316
+ | `codedd fix repo [name\|uuid]` | Scope the fix workflow to one repository (group audits) |
317
+ | `codedd fix fetch flags\|vulns` | Load the issue overview (interactive repository pick when needed) |
318
+ | `codedd fix flags next [--auto] [--json]` | Next unresolved flag; `--auto` prioritises red issues |
319
+ | `codedd fix flags list [--preset P] [--status S] [--all] [--json]` | Read-only list of flags in queue order, with counts per source, status and type |
320
+ | `codedd fix flags show <uuid> [--json]` | Full detail and fix kit for one flag, without loading it into the session |
321
+ | `codedd fix filter set\|show\|clear` | Filter flag commands by `--source`, `--status` (`open`, `validated`, `not-validated`, `inconclusive`, `ai-invalid`, ...), `--type`, `--color` or a `--preset` (`llm`, `llm-validated`, `llm-security`, `llm-closed`, `sonar`) |
322
+ | `codedd fix flags invalidate [<uuid>] [--reason "<text>"]` | Mark the current (or given) flag invalid and advance |
323
+ | `codedd fix vulns next [--auto] [--severity S] [--used-only] [--json]` | Next vulnerability; `--auto` prioritises critical |
324
+ | `codedd fix vulns affected-files <package> [--json]` | List local files importing a vulnerable package |
325
+ | `codedd fix resolve [<uuid>] [--comment "<text>"] [--commit <ref>]` | Record progress, mark the current (or given) issue resolved, and print the next one; `--commit` links the fix to a commit |
326
+ | `codedd fix comment "<text>" [--target <uuid>]` | Record progress without resolving |
327
+ | `codedd fix context [--json]` / `summarize` | Session snapshot for AI agents |
328
+ | `codedd fix selections list\|show\|use\|clear` | Issue Compass saved flag lists from the web UI |
329
+ | `codedd fix access status\|enable\|disable` | Remediation access (organisation initiator) |
330
+
331
+ Comment text can also be supplied with `--comment-file <path>` or on stdin (`codedd fix comment -`), which avoids shell quoting for multi-line notes.
332
+
333
+ **Exit codes** (for scripts and AI-agent loops): `0` issue delivered or action succeeded, `1` error, `3` no unresolved issues left in the current scope. Commands that deliver an issue also print a loop protocol block — remaining count, the exact next command, and the stop condition — so long remediation runs do not depend on instructions surviving in an agent’s context window.
334
+
335
+ ### Configuration
336
+
337
+ | Command | Description |
338
+ |--------|-------------|
339
+ | `codedd config show` | Show current config (API URL, active audit, scope, etc.) |
340
+ | `codedd config set <key> <value>` | Set a config value (`api_url`, `security_analysis`) |
341
+ | `codedd config set-key [anthropic\|openai\|gemini\|grok]` | Store an LLM API key in the OS keychain |
342
+ | `codedd config show-keys` | List which providers have keys configured (not the keys themselves) |
343
+ | `codedd config remove-key <provider>` | Remove a stored LLM API key |
344
+ | `codedd config provider [anthropic\|openai\|gemini\|grok\|both]` | Set the preferred LLM provider |
345
+ | `codedd config concurrency <n>` | Max concurrent LLM requests (1–75, default 4) |
346
+
347
+ ### AI agents
348
+
349
+ | Command | Description |
350
+ |--------|-------------|
351
+ | `codedd ai-docs` | Print the full reference for AI coding agents: authentication, audit workflow, the remediation loop, JSON output, and error recovery |
352
+
353
+ Point an agent at `codedd ai-docs` before it runs `codedd fix` so it follows the loop protocol and exit codes.
354
+
355
+ ---
356
+
357
+ ## Configuration
358
+
359
+ - **Config file:** `~/.codedd/config.toml`. Stores API URL, active audit, scope directories, LLM provider, and concurrency. Owner-only permissions where supported.
360
+ - **Secrets:** On desktop, the CLI token and LLM API keys are stored in the system keychain, not in the config file. On headless systems, supply them through environment variables; the CLI does not write secrets to disk.
361
+
362
+ Optional `[audit]` keys (defaults shown) tune how long the CLI waits after opening a payment browser flow:
363
+
364
+ - `payment_poll_interval_seconds` (default `5`)
365
+ - `payment_poll_max_wait_seconds` (default `600`)
366
+
367
+ `[audit] security_analysis` (default `true`; set with `codedd config set security_analysis on|off`) is the default for `codedd audit start --security-analysis/--no-security-analysis`. When it is off, every start asks for confirmation unless `--yes`.
368
+
369
+ ### Environment variables
370
+
371
+ | Variable | Purpose |
372
+ |---------|---------|
373
+ | `CODEDD_API_TOKEN` | CLI token (for CI or headless Linux). Takes precedence over a stored keyring token. |
374
+ | `CODEDD_ANTHROPIC_API_KEY` / `ANTHROPIC_API_KEY` | Anthropic API key. `CODEDD_*` wins if both are set. |
375
+ | `CODEDD_OPENAI_API_KEY` / `OPENAI_API_KEY` | OpenAI API key. |
376
+ | `CODEDD_GEMINI_API_KEY` / `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Google Gemini API key. |
377
+ | `CODEDD_GROK_API_KEY` / `XAI_API_KEY` / `GROK_API_KEY` | xAI Grok API key. |
378
+ | `CODEDD_SECURITY_ANALYSIS` | `on` or `off` (also `1`/`0`, `true`/`false`, `yes`/`no`): default for `codedd audit start --security-analysis/--no-security-analysis`, over `[audit] security_analysis`. Any other value stops `codedd audit start` with exit status 2. |
379
+
380
+ Headless / CI example:
381
+
382
+ ```bash
383
+ export CODEDD_API_TOKEN=codedd_cli_...
384
+ export ANTHROPIC_API_KEY=sk-ant-...
385
+ codedd audit start --yes
386
+ ```
387
+
388
+ ---
389
+
390
+ ## Troubleshooting
391
+
392
+ | Symptom | Fix |
393
+ |---------|-----|
394
+ | Keyring / credential-store error on Linux | No Secret Service provider is running. Use `CODEDD_API_TOKEN` and a provider key environment variable instead. |
395
+ | “No active audit selected” | Run `codedd audits select`. For flag remediation, `codedd fix selections use <n>` also works. |
396
+ | Audit was interrupted | Run `codedd audit start` again; completed stages are skipped. `codedd audit status` shows where it stopped. After Ctrl-C the CLI exits with status 130 once in-flight LLM calls return (up to the 240 s read timeout) and finished results are submitted (up to 90 s in total of waiting on CodeDD's rate limit); press Ctrl-C again to exit at once. |
397
+ | Scope drift prompt on every run | Files changed since `scope confirm`. Confirm the new scope, or use `--skip-sync` if the change is intentional and already registered. |
398
+ | `codedd --version` shows an old version | Another install is earlier on your `PATH`; see [Upgrade and uninstall](#upgrade-and-uninstall). |
399
+ | Garbled symbols in the Windows console | Update to the latest CLI (it switches the console to UTF-8), or set `PYTHONIOENCODING=utf-8`. |
400
+
401
+ ---
402
+
403
+ ## Security
404
+
405
+ - Tokens and LLM keys are kept in the OS credential store or environment variables, never in plaintext on disk.
406
+ - TLS certificate verification is always enabled for API requests.
407
+ - The config file and `~/.codedd` directory use owner-only permissions where supported.
408
+ - Tokens expire after 90 days (server-configurable); generate a new one from the CodeDD dashboard.
409
+
410
+ Report security issues to [info@codedd.ai](mailto:info@codedd.ai) rather than in public issues.
411
+
412
+ ---
413
+
414
+ ## Development
415
+
416
+ ```bash
417
+ poetry install --with dev
418
+ poetry run pytest
419
+ poetry run ruff check .
420
+ ```
421
+
422
+ ---
423
+
424
+ ## License
425
+
426
+ Apache License 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
427
+
428
+ ---
429
+
430
+ ## Support
431
+
432
+ - **Issues:** [GitLab Issues](https://gitlab.com/codedd1/codedd-cli/-/work_items)
433
+ - **Product:** [CodeDD](https://codedd.ai)
434
+