codedd-cli 0.1.9__tar.gz → 0.1.11__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.
- codedd_cli-0.1.11/LICENSE +201 -0
- codedd_cli-0.1.11/NOTICE +4 -0
- codedd_cli-0.1.11/PKG-INFO +413 -0
- codedd_cli-0.1.11/README.md +371 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/__init__.py +1 -1
- codedd_cli-0.1.11/codedd_cli/api/client.py +216 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/api/endpoints.py +2 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/architecture_analyzer.py +112 -60
- codedd_cli-0.1.11/codedd_cli/auditor/audit_log.py +286 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/complexity_analyzer.py +101 -15
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/dependency_scanner.py +114 -32
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/file_auditor.py +164 -126
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/parity_overrides.py +103 -13
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/MANIFEST.json +1 -1
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/manifest_coordinate_resolver.py +14 -2
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/sub_audit_runner.py +96 -34
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/agents.py +6 -2
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/cli_ai_auditor.py +51 -7
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/cli_orchestrator.py +36 -7
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/cli_settings.py +0 -3
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/__init__.py +18 -3
- codedd_cli-0.1.11/codedd_cli/auditor/vulnerability_analysis/lang_ast/_common.py +118 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/_generic.py +30 -16
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/java.py +23 -10
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/js_ts.py +23 -10
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/shell.py +23 -10
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/taint.py +55 -27
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_snippets.py +5 -5
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/langgraph_runner.py +62 -36
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/planner.py +2 -2
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_validator.py +2 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auth/session.py +24 -8
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/ai_docs_cmd.py +228 -44
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/audit_cmd.py +209 -158
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/auth_cmd.py +81 -41
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/config_cmd.py +11 -4
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/fix_cmd.py +1512 -245
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/scope_cmd.py +131 -29
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/config/settings.py +77 -26
- codedd_cli-0.1.11/codedd_cli/config/url_validation.py +199 -0
- codedd_cli-0.1.11/codedd_cli/llm/anthropic_utils.py +220 -0
- codedd_cli-0.1.11/codedd_cli/llm/call_attempts.py +78 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/llm/key_manager.py +76 -25
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/display.py +24 -2
- codedd_cli-0.1.11/codedd_cli/utils/transparency.py +200 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/pyproject.toml +3 -3
- codedd_cli-0.1.9/LICENSE +0 -21
- codedd_cli-0.1.9/PKG-INFO +0 -315
- codedd_cli-0.1.9/README.md +0 -275
- codedd_cli-0.1.9/codedd_cli/api/client.py +0 -120
- codedd_cli-0.1.9/codedd_cli/config/url_validation.py +0 -139
- codedd_cli-0.1.9/codedd_cli/llm/anthropic_utils.py +0 -61
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/__main__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/api/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/api/exceptions.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/archetype_classifier.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/architecture_prompts.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/architecture_schema_contract.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/audit_checkpoint.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/audit_progress_sync.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/commit_classifier.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/cross_repo_evidence.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/git_stats_collector.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/response_parser.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/enhanced_relationship_detector.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/enhanced_technology_detector.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/evidence_extractor.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/infra_scan.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/published_identity.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/repo_file.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/repo_kind.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/taxonomy.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/tech_normalizer.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/technology_lists.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/server_parity/tier_definitions.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/tier_definitions.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/file_io.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/c_cpp.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/csharp.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/go.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/kotlin.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/php.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/ruby.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/rust.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/scala.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/lang_ast/swift.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/prompts.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/scope.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/security_patterns.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/semgrep_runner.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/state.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auditor/vulnerability_analysis/tools.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auth/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/auth/token_manager.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/cli.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/commands/audits_cmd.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/config/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/config/constants.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/config/fix_session.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/llm/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/models/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/models/account.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/models/audit.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/models/local_directory.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/scanner/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/scanner/file_classifier.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/scanner/file_walker.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/scanner/line_counter.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/__init__.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/directory_validator.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/payload_inspector.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/safe_path.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/codedd_cli/utils/security.py +0 -0
- {codedd_cli-0.1.9 → codedd_cli-0.1.11}/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.
|
codedd_cli-0.1.11/NOTICE
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codedd-cli
|
|
3
|
+
Version: 0.1.11
|
|
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.10,<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.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
|
+
Classifier: Topic :: Security
|
|
24
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
25
|
+
Provides-Extra: esprima
|
|
26
|
+
Requires-Dist: defusedxml (>=0.7.1)
|
|
27
|
+
Requires-Dist: esprima (>=4.0.0) ; extra == "esprima"
|
|
28
|
+
Requires-Dist: httpx (>=0.27.0)
|
|
29
|
+
Requires-Dist: keyring (>=25.0.0)
|
|
30
|
+
Requires-Dist: langgraph (>=0.2.0)
|
|
31
|
+
Requires-Dist: lizard (>=1.17.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 (>=2.0.0) ; python_version < "3.11"
|
|
36
|
+
Requires-Dist: tomli-w (>=1.0.0)
|
|
37
|
+
Requires-Dist: typer (>=0.9.0)
|
|
38
|
+
Project-URL: Homepage, https://codedd.ai
|
|
39
|
+
Project-URL: Repository, https://gitlab.com/codedd1/codedd-cli
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# CodeDD CLI
|
|
43
|
+
|
|
44
|
+
[](https://pypi.org/project/codedd-cli/)
|
|
45
|
+
[](https://pypi.org/project/codedd-cli/)
|
|
46
|
+
[](LICENSE)
|
|
47
|
+
|
|
48
|
+
**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.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What is CodeDD CLI?
|
|
53
|
+
|
|
54
|
+
CodeDD CLI is the official command-line interface for the CodeDD platform. You:
|
|
55
|
+
|
|
56
|
+
- **Define scope** — Add one or more local Git repository roots to an audit.
|
|
57
|
+
- **Run analysis locally** — File audits, vulnerability validation, complexity, dependencies, git history, and architecture are analysed on your machine.
|
|
58
|
+
- **Sync to CodeDD** — Findings and metrics are submitted to CodeDD, where consolidation, dependency enrichment, security scoring, and recommendations run on the server.
|
|
59
|
+
|
|
60
|
+
Built for teams that want CodeDD’s analytics, recommendations, and reporting without handing over their source code.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## What leaves your machine
|
|
65
|
+
|
|
66
|
+
| Data | Stays local | Sent to your LLM provider | Sent to CodeDD |
|
|
67
|
+
|------|:-----------:|:-------------------------:|:--------------:|
|
|
68
|
+
| Source files | ✓ | Files and snippets under analysis, using **your** API key | — |
|
|
69
|
+
| File audit and vulnerability findings | | | ✓ (file paths, line ranges, findings text) |
|
|
70
|
+
| Complexity metrics, LoC, file types | | | ✓ |
|
|
71
|
+
| Dependencies (manifests, lockfiles, imports) | | | ✓ (package names and versions) |
|
|
72
|
+
| Git statistics | | | ✓ (commit history metadata, author names) |
|
|
73
|
+
| Architecture components and relationships | | Optional LLM enhancement | ✓ |
|
|
74
|
+
| CLI token, LLM API keys | ✓ (OS keychain or environment) | | — |
|
|
75
|
+
|
|
76
|
+
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.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Features
|
|
81
|
+
|
|
82
|
+
- **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.
|
|
83
|
+
- **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.
|
|
84
|
+
- **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.
|
|
85
|
+
- **Complexity analysis** — Cyclomatic complexity, Halstead, and maintainability metrics (Radon/Lizard).
|
|
86
|
+
- **Dependency scanning** — Lockfile/manifest and import parsing; CodeDD enriches the results with vulnerability and licence data.
|
|
87
|
+
- **Git statistics** — Commit history and repository activity for team and delivery metrics.
|
|
88
|
+
- **Architecture analysis** — Local component and relationship extraction, technology detection, and cross-repository evidence for group audits.
|
|
89
|
+
- **Resumable audits** — Progress is checkpointed; an interrupted `codedd audit start` resumes where it stopped.
|
|
90
|
+
- **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).
|
|
91
|
+
- **Payment and budget** — Pre-flight checks, LoC budget deduction, or Stripe checkout when additional payment is required.
|
|
92
|
+
- **Secure auth** — Tokens and keys stored in the OS credential store (Windows Credential Locker, macOS Keychain, Linux Secret Service), or supplied through environment variables.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Installation
|
|
97
|
+
|
|
98
|
+
### Requirements
|
|
99
|
+
|
|
100
|
+
- **Python 3.10–3.13**
|
|
101
|
+
- A [CodeDD](https://codedd.ai) account and a CLI token (Account → CLI Access → Generate Token)
|
|
102
|
+
- An API key for at least one LLM provider (Anthropic, OpenAI, Google Gemini, or xAI Grok)
|
|
103
|
+
- Optional: [Semgrep](https://semgrep.dev/docs/getting-started/) on your `PATH` for additional vulnerability evidence
|
|
104
|
+
|
|
105
|
+
### Install
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install codedd-cli
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Or as an isolated tool:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
uv tool install codedd-cli
|
|
115
|
+
# or: pipx install codedd-cli
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Verify:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
codedd --version
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
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)).
|
|
125
|
+
|
|
126
|
+
### Upgrade and uninstall
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pip install -U codedd-cli # or: uv tool upgrade codedd-cli / pipx upgrade codedd-cli
|
|
130
|
+
pip uninstall codedd-cli # or: uv tool uninstall codedd-cli / pipx uninstall codedd-cli
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
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).
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Quick start
|
|
138
|
+
|
|
139
|
+
### 1. Authenticate once
|
|
140
|
+
|
|
141
|
+
Generate a CLI token at [codedd.ai](https://codedd.ai) (Account → CLI Access), then:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
codedd auth login --token <your_token>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Or run `codedd auth login` and paste the token when prompted. Check with `codedd auth status`.
|
|
148
|
+
|
|
149
|
+
On headless Linux or in CI, skip login and export `CODEDD_API_TOKEN` instead (see [Environment variables](#environment-variables)).
|
|
150
|
+
|
|
151
|
+
### 2. Select the audit
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
codedd audits list
|
|
155
|
+
codedd audits select
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
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.
|
|
159
|
+
|
|
160
|
+
### 3. Define local scope
|
|
161
|
+
|
|
162
|
+
Add the local paths that correspond to the repositories in that audit (each path must be a Git repository root with commits):
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
codedd scope add /path/to/my-repo
|
|
166
|
+
codedd scope list
|
|
167
|
+
codedd scope confirm
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`scope confirm` scans paths, file types, and LoC, and registers scope with CodeDD.
|
|
171
|
+
If files change later, `codedd audit start` detects the drift and asks you to re-confirm.
|
|
172
|
+
|
|
173
|
+
### 4. Configure an LLM key
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
codedd config set-key anthropic
|
|
177
|
+
# or: openai | gemini | grok
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Alternatively, export a provider key (see [Environment variables](#environment-variables)). Environment variables take precedence over the keychain.
|
|
181
|
+
|
|
182
|
+
With more than one key configured, `codedd config provider both` uses them in fallback order.
|
|
183
|
+
|
|
184
|
+
### 5. Start the audit
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
codedd audit start
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
What `codedd audit start` does, in order:
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
A. Scope sync -> re-confirm prompt if local files changed
|
|
194
|
+
B. Pre-flight -> checks audit status, payment, and budget on CodeDD
|
|
195
|
+
C. Payment -> budget deduction or browser checkout
|
|
196
|
+
D. Local analysis -> file audit (LLM), vulnerability validation, complexity,
|
|
197
|
+
dependencies, git stats, architecture
|
|
198
|
+
E. Submission -> structured results to CodeDD (retries on transient errors)
|
|
199
|
+
F. Completion -> server-side consolidation and recommendations
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Follow progress with `codedd audit status --watch`. Results and recommendations appear in the CodeDD dashboard.
|
|
203
|
+
|
|
204
|
+
### 6. Fix issues (optional, after the audit completes)
|
|
205
|
+
|
|
206
|
+
**Group audit** (multiple repos):
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
codedd fix status # repos ranked by severity
|
|
210
|
+
codedd fix repo my-service # scope to one repository
|
|
211
|
+
codedd fix flags next --auto # next unresolved flag (red first)
|
|
212
|
+
codedd fix resolve --comment "Fixed null check in auth handler"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Single-repo audit:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
codedd fix fetch flags
|
|
219
|
+
codedd fix flags next --auto
|
|
220
|
+
codedd fix resolve --comment "Updated lodash to 4.17.21"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
`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`.
|
|
224
|
+
|
|
225
|
+
For dependency vulnerabilities, swap `flags` for `vulns` (`codedd fix fetch vulns`, `codedd fix vulns next --auto`, `codedd fix vulns affected-files <package>`).
|
|
226
|
+
|
|
227
|
+
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.
|
|
228
|
+
|
|
229
|
+
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.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Costs
|
|
234
|
+
|
|
235
|
+
- **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.
|
|
236
|
+
- **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.
|
|
237
|
+
- The CLI itself is free.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Commands reference
|
|
242
|
+
|
|
243
|
+
Every command supports `--help`.
|
|
244
|
+
|
|
245
|
+
### Authentication
|
|
246
|
+
|
|
247
|
+
| Command | Description |
|
|
248
|
+
|--------|-------------|
|
|
249
|
+
| `codedd auth login` | Log in with a CLI token (prompt or `--token`) |
|
|
250
|
+
| `codedd auth logout` | Clear stored credentials |
|
|
251
|
+
| `codedd auth status` | Show current account and token state |
|
|
252
|
+
|
|
253
|
+
### Audits
|
|
254
|
+
|
|
255
|
+
| Command | Description |
|
|
256
|
+
|--------|-------------|
|
|
257
|
+
| `codedd audits list` | List audits (`--type single\|group`, `--limit`, `--page`) |
|
|
258
|
+
| `codedd audits select [uuid]` | Set active audit (interactive if UUID omitted) |
|
|
259
|
+
|
|
260
|
+
### Scope
|
|
261
|
+
|
|
262
|
+
| Command | Description |
|
|
263
|
+
|--------|-------------|
|
|
264
|
+
| `codedd scope add <path> [path ...]` | Add Git repository root(s) to the active audit’s scope |
|
|
265
|
+
| `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) |
|
|
266
|
+
| `codedd scope list` | List directories in scope |
|
|
267
|
+
| `codedd scope clear` | Remove all directories from scope |
|
|
268
|
+
| `codedd scope status` | Show scope and sync state per directory |
|
|
269
|
+
| `codedd scope confirm` | Scan, preview, and register scope with CodeDD |
|
|
270
|
+
| `codedd scope sync` | Compare local vs CodeDD and show changes |
|
|
271
|
+
|
|
272
|
+
### Audit execution
|
|
273
|
+
|
|
274
|
+
| Command | Description |
|
|
275
|
+
|--------|-------------|
|
|
276
|
+
| `codedd audit start` | Sync scope, run pre-flight and payment, then run the local audit and submit to CodeDD |
|
|
277
|
+
| `codedd audit status [--watch] [--interval N]` | Show pipeline progress for an active or resumable audit; `--watch` polls until it completes |
|
|
278
|
+
|
|
279
|
+
`codedd audit start` options:
|
|
280
|
+
|
|
281
|
+
| Option | Effect |
|
|
282
|
+
|--------|--------|
|
|
283
|
+
| `--yes` | Auto-confirm prompts (CI) |
|
|
284
|
+
| `--skip-sync` | Skip the scope sync check |
|
|
285
|
+
| `--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)) |
|
|
286
|
+
| `--show-interactive` | Like `--show`, but pause before every request and batch without asking |
|
|
287
|
+
| `--show-force-interactive` | With `--show-interactive`, skip the offer to switch to per-stage review on large audits |
|
|
288
|
+
| `--debug-llm` | Print LLM request/response debug output |
|
|
289
|
+
| `--debug-llm-full-prompt` | Include the full system prompt in `--debug-llm` output (sensitive) |
|
|
290
|
+
|
|
291
|
+
### Issue remediation (`codedd fix`)
|
|
292
|
+
|
|
293
|
+
Requires a completed audit with remediation data on CodeDD.
|
|
294
|
+
|
|
295
|
+
| Command | Description |
|
|
296
|
+
|--------|-------------|
|
|
297
|
+
| `codedd fix status [--json]` | Dashboard of open flags/vulns; repos ranked by severity in group audits |
|
|
298
|
+
| `codedd fix repo [name\|uuid]` | Scope the fix workflow to one repository (group audits) |
|
|
299
|
+
| `codedd fix fetch flags\|vulns` | Load the issue overview (interactive repository pick when needed) |
|
|
300
|
+
| `codedd fix flags next [--auto] [--json]` | Next unresolved flag; `--auto` prioritises red issues |
|
|
301
|
+
| `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 |
|
|
302
|
+
| `codedd fix flags show <uuid> [--json]` | Full detail and fix kit for one flag, without loading it into the session |
|
|
303
|
+
| `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`) |
|
|
304
|
+
| `codedd fix flags invalidate [<uuid>] [--reason "<text>"]` | Mark the current (or given) flag invalid and advance |
|
|
305
|
+
| `codedd fix vulns next [--auto] [--severity S] [--used-only] [--json]` | Next vulnerability; `--auto` prioritises critical |
|
|
306
|
+
| `codedd fix vulns affected-files <package> [--json]` | List local files importing a vulnerable package |
|
|
307
|
+
| `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 |
|
|
308
|
+
| `codedd fix comment "<text>" [--target <uuid>]` | Record progress without resolving |
|
|
309
|
+
| `codedd fix context [--json]` / `summarize` | Session snapshot for AI agents |
|
|
310
|
+
| `codedd fix selections list\|show\|use\|clear` | Issue Compass saved flag lists from the web UI |
|
|
311
|
+
| `codedd fix access status\|enable\|disable` | Remediation access (organisation initiator) |
|
|
312
|
+
|
|
313
|
+
Comment text can also be supplied with `--comment-file <path>` or on stdin (`codedd fix comment -`), which avoids shell quoting for multi-line notes.
|
|
314
|
+
|
|
315
|
+
**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.
|
|
316
|
+
|
|
317
|
+
### Configuration
|
|
318
|
+
|
|
319
|
+
| Command | Description |
|
|
320
|
+
|--------|-------------|
|
|
321
|
+
| `codedd config show` | Show current config (API URL, active audit, scope, etc.) |
|
|
322
|
+
| `codedd config set <key> <value>` | Set a config value |
|
|
323
|
+
| `codedd config set-key [anthropic\|openai\|gemini\|grok]` | Store an LLM API key in the OS keychain |
|
|
324
|
+
| `codedd config show-keys` | List which providers have keys configured (not the keys themselves) |
|
|
325
|
+
| `codedd config remove-key <provider>` | Remove a stored LLM API key |
|
|
326
|
+
| `codedd config provider [anthropic\|openai\|gemini\|grok\|both]` | Set the preferred LLM provider |
|
|
327
|
+
| `codedd config concurrency <n>` | Max concurrent LLM requests (1–75, default 4) |
|
|
328
|
+
|
|
329
|
+
### AI agents
|
|
330
|
+
|
|
331
|
+
| Command | Description |
|
|
332
|
+
|--------|-------------|
|
|
333
|
+
| `codedd ai-docs` | Print the full reference for AI coding agents: authentication, audit workflow, the remediation loop, JSON output, and error recovery |
|
|
334
|
+
|
|
335
|
+
Point an agent at `codedd ai-docs` before it runs `codedd fix` so it follows the loop protocol and exit codes.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Configuration
|
|
340
|
+
|
|
341
|
+
- **Config file:** `~/.codedd/config.toml`. Stores API URL, active audit, scope directories, LLM provider, and concurrency. Owner-only permissions where supported.
|
|
342
|
+
- **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.
|
|
343
|
+
|
|
344
|
+
Optional `[audit]` keys (defaults shown) tune how long the CLI waits after opening a payment browser flow:
|
|
345
|
+
|
|
346
|
+
- `payment_poll_interval_seconds` (default `5`)
|
|
347
|
+
- `payment_poll_max_wait_seconds` (default `600`)
|
|
348
|
+
|
|
349
|
+
### Environment variables
|
|
350
|
+
|
|
351
|
+
| Variable | Purpose |
|
|
352
|
+
|---------|---------|
|
|
353
|
+
| `CODEDD_API_TOKEN` | CLI token (for CI or headless Linux). Takes precedence over a stored keyring token. |
|
|
354
|
+
| `CODEDD_ANTHROPIC_API_KEY` / `ANTHROPIC_API_KEY` | Anthropic API key. `CODEDD_*` wins if both are set. |
|
|
355
|
+
| `CODEDD_OPENAI_API_KEY` / `OPENAI_API_KEY` | OpenAI API key. |
|
|
356
|
+
| `CODEDD_GEMINI_API_KEY` / `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Google Gemini API key. |
|
|
357
|
+
| `CODEDD_GROK_API_KEY` / `XAI_API_KEY` / `GROK_API_KEY` | xAI Grok API key. |
|
|
358
|
+
|
|
359
|
+
Headless / CI example:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
export CODEDD_API_TOKEN=codedd_cli_...
|
|
363
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
364
|
+
codedd audit start --yes
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Troubleshooting
|
|
370
|
+
|
|
371
|
+
| Symptom | Fix |
|
|
372
|
+
|---------|-----|
|
|
373
|
+
| Keyring / credential-store error on Linux | No Secret Service provider is running. Use `CODEDD_API_TOKEN` and a provider key environment variable instead. |
|
|
374
|
+
| “No active audit selected” | Run `codedd audits select`. For flag remediation, `codedd fix selections use <n>` also works. |
|
|
375
|
+
| Audit was interrupted | Run `codedd audit start` again; completed stages are skipped. `codedd audit status` shows where it stopped. |
|
|
376
|
+
| 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. |
|
|
377
|
+
| `codedd --version` shows an old version | Another install is earlier on your `PATH`; see [Upgrade and uninstall](#upgrade-and-uninstall). |
|
|
378
|
+
| Garbled symbols in the Windows console | Update to the latest CLI (it switches the console to UTF-8), or set `PYTHONIOENCODING=utf-8`. |
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Security
|
|
383
|
+
|
|
384
|
+
- Tokens and LLM keys are kept in the OS credential store or environment variables, never in plaintext on disk.
|
|
385
|
+
- TLS certificate verification is always enabled for API requests.
|
|
386
|
+
- The config file and `~/.codedd` directory use owner-only permissions where supported.
|
|
387
|
+
- Tokens expire after 90 days (server-configurable); generate a new one from the CodeDD dashboard.
|
|
388
|
+
|
|
389
|
+
Report security issues to [info@codedd.ai](mailto:info@codedd.ai) rather than in public issues.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Development
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
poetry install --with dev
|
|
397
|
+
poetry run pytest
|
|
398
|
+
poetry run ruff check .
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## License
|
|
404
|
+
|
|
405
|
+
Apache License 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Support
|
|
410
|
+
|
|
411
|
+
- **Issues:** [GitLab Issues](https://gitlab.com/codedd1/codedd-cli/-/work_items)
|
|
412
|
+
- **Product:** [CodeDD](https://codedd.ai)
|
|
413
|
+
|