flintai-cli 1.0.0__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 (152) hide show
  1. flintai_cli-1.0.0/LICENSE +210 -0
  2. flintai_cli-1.0.0/PKG-INFO +442 -0
  3. flintai_cli-1.0.0/README.md +204 -0
  4. flintai_cli-1.0.0/flintai/__init__.py +0 -0
  5. flintai_cli-1.0.0/flintai/cli/__init__.py +0 -0
  6. flintai_cli-1.0.0/flintai/cli/__main__.py +3 -0
  7. flintai_cli-1.0.0/flintai/cli/builtin_config.json +911 -0
  8. flintai_cli-1.0.0/flintai/cli/console.py +116 -0
  9. flintai_cli-1.0.0/flintai/cli/eval_cli.py +891 -0
  10. flintai_cli-1.0.0/flintai/cli/init_cli.py +144 -0
  11. flintai_cli-1.0.0/flintai/cli/main.py +262 -0
  12. flintai_cli-1.0.0/flintai/cli/rich_observer.py +89 -0
  13. flintai_cli-1.0.0/flintai/cli/runner.py +305 -0
  14. flintai_cli-1.0.0/flintai/cli/scan_cli.py +238 -0
  15. flintai_cli-1.0.0/flintai/cli/utils.py +37 -0
  16. flintai_cli-1.0.0/flintai/cli/version.py +1 -0
  17. flintai_cli-1.0.0/flintai/data/detector_prompts/llm01_adversarial.txt +55 -0
  18. flintai_cli-1.0.0/flintai/data/detector_prompts/llm01_fixed.txt +8 -0
  19. flintai_cli-1.0.0/flintai/data/detector_prompts/llm02_adversarial.txt +75 -0
  20. flintai_cli-1.0.0/flintai/data/detector_prompts/llm02_fixed.txt +8 -0
  21. flintai_cli-1.0.0/flintai/data/detector_prompts/llm05_adversarial.txt +63 -0
  22. flintai_cli-1.0.0/flintai/data/detector_prompts/llm05_fixed.txt +16 -0
  23. flintai_cli-1.0.0/flintai/data/detector_prompts/llm06_adversarial.txt +135 -0
  24. flintai_cli-1.0.0/flintai/data/detector_prompts/llm06_fixed.txt +15 -0
  25. flintai_cli-1.0.0/flintai/data/detector_prompts/llm07_adversarial.txt +185 -0
  26. flintai_cli-1.0.0/flintai/data/detector_prompts/llm07_fixed.txt +14 -0
  27. flintai_cli-1.0.0/flintai/data/detector_prompts/llm09_adversarial.txt +77 -0
  28. flintai_cli-1.0.0/flintai/data/detector_prompts/llm09_fixed.txt +15 -0
  29. flintai_cli-1.0.0/flintai/data/llm01_prompt_injection.csv +6708 -0
  30. flintai_cli-1.0.0/flintai/data/llm02_sensitive_information.csv +1069 -0
  31. flintai_cli-1.0.0/flintai/data/llm05_unsafe_output.csv +3882 -0
  32. flintai_cli-1.0.0/flintai/data/llm06_excessive_agency.csv +778 -0
  33. flintai_cli-1.0.0/flintai/data/llm07_system_prompt_leakage.csv +971 -0
  34. flintai_cli-1.0.0/flintai/data/llm09_hallucination-goals.csv +32419 -0
  35. flintai_cli-1.0.0/flintai/data/llm09_hallucination.csv +599 -0
  36. flintai_cli-1.0.0/flintai/data/pii_leakage.csv +706 -0
  37. flintai_cli-1.0.0/flintai/data/secret_leakage.csv +1380 -0
  38. flintai_cli-1.0.0/flintai/eval/__init__.py +0 -0
  39. flintai_cli-1.0.0/flintai/eval/common/converter_anthropic.py +151 -0
  40. flintai_cli-1.0.0/flintai/eval/common/converter_genai.py +169 -0
  41. flintai_cli-1.0.0/flintai/eval/common/converter_openai.py +165 -0
  42. flintai_cli-1.0.0/flintai/eval/common/log.py +96 -0
  43. flintai_cli-1.0.0/flintai/eval/common/reference.py +25 -0
  44. flintai_cli-1.0.0/flintai/eval/common/schema.py +192 -0
  45. flintai_cli-1.0.0/flintai/eval/common/utils.py +74 -0
  46. flintai_cli-1.0.0/flintai/eval/core/__init__.py +0 -0
  47. flintai_cli-1.0.0/flintai/eval/core/detectors/__init__.py +1 -0
  48. flintai_cli-1.0.0/flintai/eval/core/detectors/detector.py +25 -0
  49. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_garak.py +80 -0
  50. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_model.py +76 -0
  51. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_pii.py +64 -0
  52. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_secret.py +82 -0
  53. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_topic_guard.py +70 -0
  54. flintai_cli-1.0.0/flintai/eval/core/detectors/detector_toxicity.py +70 -0
  55. flintai_cli-1.0.0/flintai/eval/core/eval/__init__.py +0 -0
  56. flintai_cli-1.0.0/flintai/eval/core/eval/eval_creator.py +197 -0
  57. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation.py +100 -0
  58. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_adversarial.py +523 -0
  59. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_garak_module.py +52 -0
  60. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_garak_probe.py +274 -0
  61. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_message_list.py +44 -0
  62. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_multi.py +207 -0
  63. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_single.py +79 -0
  64. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_single_prompt.py +58 -0
  65. flintai_cli-1.0.0/flintai/eval/core/eval/evaluation_topic_guard.py +318 -0
  66. flintai_cli-1.0.0/flintai/eval/core/eval/metric_conciseness.py +181 -0
  67. flintai_cli-1.0.0/flintai/eval/core/eval/metric_factual_accuracy.py +294 -0
  68. flintai_cli-1.0.0/flintai/eval/core/eval/metric_instruction_adherence.py +180 -0
  69. flintai_cli-1.0.0/flintai/eval/core/eval/metric_tone.py +183 -0
  70. flintai_cli-1.0.0/flintai/eval/core/eval/metric_toxicity.py +147 -0
  71. flintai_cli-1.0.0/flintai/eval/core/eval/observer.py +136 -0
  72. flintai_cli-1.0.0/flintai/eval/core/eval/probe_adversarial.py +14 -0
  73. flintai_cli-1.0.0/flintai/eval/core/message/__init__.py +0 -0
  74. flintai_cli-1.0.0/flintai/eval/core/message/message_collection.py +37 -0
  75. flintai_cli-1.0.0/flintai/eval/core/message/message_collection_csv.py +46 -0
  76. flintai_cli-1.0.0/flintai/eval/core/message/message_collection_garak.py +52 -0
  77. flintai_cli-1.0.0/flintai/eval/core/message/message_collection_memory.py +36 -0
  78. flintai_cli-1.0.0/flintai/eval/core/models/__init__.py +0 -0
  79. flintai_cli-1.0.0/flintai/eval/core/models/generator_model.py +88 -0
  80. flintai_cli-1.0.0/flintai/eval/core/models/model.py +111 -0
  81. flintai_cli-1.0.0/flintai/eval/core/models/model_adk.py +158 -0
  82. flintai_cli-1.0.0/flintai/eval/core/models/model_anthropic.py +51 -0
  83. flintai_cli-1.0.0/flintai/eval/core/models/model_anthropic_agent.py +92 -0
  84. flintai_cli-1.0.0/flintai/eval/core/models/model_gemini.py +107 -0
  85. flintai_cli-1.0.0/flintai/eval/core/models/model_generic_http.py +117 -0
  86. flintai_cli-1.0.0/flintai/eval/core/models/model_huggingface.py +61 -0
  87. flintai_cli-1.0.0/flintai/eval/core/models/model_langserve.py +94 -0
  88. flintai_cli-1.0.0/flintai/eval/core/models/model_litellm.py +38 -0
  89. flintai_cli-1.0.0/flintai/eval/core/models/model_ollama.py +50 -0
  90. flintai_cli-1.0.0/flintai/eval/core/models/model_openai.py +35 -0
  91. flintai_cli-1.0.0/flintai/eval/core/models/model_openai_agent.py +80 -0
  92. flintai_cli-1.0.0/flintai/eval/core/models/model_openai_compatible.py +57 -0
  93. flintai_cli-1.0.0/flintai/eval/core/models/model_retry.py +134 -0
  94. flintai_cli-1.0.0/flintai/eval/core/models/model_sync_wrapper.py +35 -0
  95. flintai_cli-1.0.0/flintai/eval/db/__init__.py +0 -0
  96. flintai_cli-1.0.0/flintai/eval/db/base/__init__.py +0 -0
  97. flintai_cli-1.0.0/flintai/eval/db/base/detectors/__init__.py +1 -0
  98. flintai_cli-1.0.0/flintai/eval/db/base/detectors/detector_helpers.py +78 -0
  99. flintai_cli-1.0.0/flintai/eval/db/base/detectors/detector_repository.py +91 -0
  100. flintai_cli-1.0.0/flintai/eval/db/base/detectors/detector_types.py +77 -0
  101. flintai_cli-1.0.0/flintai/eval/db/base/eval/__init__.py +1 -0
  102. flintai_cli-1.0.0/flintai/eval/db/base/eval/eval_helpers.py +227 -0
  103. flintai_cli-1.0.0/flintai/eval/db/base/eval/eval_repository.py +115 -0
  104. flintai_cli-1.0.0/flintai/eval/db/base/eval/eval_run.py +139 -0
  105. flintai_cli-1.0.0/flintai/eval/db/base/eval/eval_types.py +129 -0
  106. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_repository.py +78 -0
  107. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_run_repository.py +70 -0
  108. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_run_result_repository.py +40 -0
  109. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_run_result_types.py +21 -0
  110. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_run_types.py +84 -0
  111. flintai_cli-1.0.0/flintai/eval/db/base/eval/model_eval_types.py +71 -0
  112. flintai_cli-1.0.0/flintai/eval/db/base/message/__init__.py +0 -0
  113. flintai_cli-1.0.0/flintai/eval/db/base/message/message_collection_helpers.py +61 -0
  114. flintai_cli-1.0.0/flintai/eval/db/base/message/message_collection_repository.py +92 -0
  115. flintai_cli-1.0.0/flintai/eval/db/base/message/message_collection_types.py +89 -0
  116. flintai_cli-1.0.0/flintai/eval/db/base/models/__init__.py +0 -0
  117. flintai_cli-1.0.0/flintai/eval/db/base/models/model_helpers.py +172 -0
  118. flintai_cli-1.0.0/flintai/eval/db/base/models/model_repository.py +95 -0
  119. flintai_cli-1.0.0/flintai/eval/db/base/models/model_types.py +156 -0
  120. flintai_cli-1.0.0/flintai/eval/db/json/__init__.py +0 -0
  121. flintai_cli-1.0.0/flintai/eval/db/json/repository_json.py +603 -0
  122. flintai_cli-1.0.0/flintai/scan/__init__.py +0 -0
  123. flintai_cli-1.0.0/flintai/scan/agent_scanner.py +797 -0
  124. flintai_cli-1.0.0/flintai/scan/config/agent_opengrep_rules.yaml +533 -0
  125. flintai_cli-1.0.0/flintai/scan/config/agent_taxonomy.json +481 -0
  126. flintai_cli-1.0.0/flintai/scan/config/agentic_cvss_mapping.yaml +136 -0
  127. flintai_cli-1.0.0/flintai/scan/config/compliance_mappings.json +110 -0
  128. flintai_cli-1.0.0/flintai/scan/config/triage_prompt.txt +335 -0
  129. flintai_cli-1.0.0/flintai/scan/constants.py +15 -0
  130. flintai_cli-1.0.0/flintai/scan/file_filter.py +156 -0
  131. flintai_cli-1.0.0/flintai/scan/llm_provider.py +197 -0
  132. flintai_cli-1.0.0/flintai/scan/opengrep_resolver.py +12 -0
  133. flintai_cli-1.0.0/flintai/scan/reasoner.py +552 -0
  134. flintai_cli-1.0.0/flintai/scan/schema.py +337 -0
  135. flintai_cli-1.0.0/flintai/scan/scorer.py +371 -0
  136. flintai_cli-1.0.0/flintai/scan/secret_anonymizer.py +72 -0
  137. flintai_cli-1.0.0/flintai/scan/static_scanner.py +542 -0
  138. flintai_cli-1.0.0/flintai/scan/taxonomy.py +75 -0
  139. flintai_cli-1.0.0/flintai/scan/tool_dispatcher.py +754 -0
  140. flintai_cli-1.0.0/flintai/scan/trace_logger.py +118 -0
  141. flintai_cli-1.0.0/flintai/scan/trace_logger_file.py +143 -0
  142. flintai_cli-1.0.0/flintai/scan/trace_logger_log.py +100 -0
  143. flintai_cli-1.0.0/flintai/scan/triage.py +496 -0
  144. flintai_cli-1.0.0/flintai/schema.py +58 -0
  145. flintai_cli-1.0.0/flintai_cli.egg-info/PKG-INFO +442 -0
  146. flintai_cli-1.0.0/flintai_cli.egg-info/SOURCES.txt +150 -0
  147. flintai_cli-1.0.0/flintai_cli.egg-info/dependency_links.txt +1 -0
  148. flintai_cli-1.0.0/flintai_cli.egg-info/entry_points.txt +2 -0
  149. flintai_cli-1.0.0/flintai_cli.egg-info/requires.txt +15 -0
  150. flintai_cli-1.0.0/flintai_cli.egg-info/top_level.txt +1 -0
  151. flintai_cli-1.0.0/pyproject.toml +60 -0
  152. flintai_cli-1.0.0/setup.cfg +4 -0
@@ -0,0 +1,210 @@
1
+ Software: Flint AI
2
+
3
+ Copyright (c) 2026 SB Technology, Inc. dba SandboxAQ
4
+
5
+ This software is licensed to you under the Apache 2.0 License as limited by
6
+ the "Commons Clause" license condition below. The "Commons Clause" license
7
+ condition has been modified from the original version to clarify that the
8
+ "Common Clause" license condition also applies to any derivatives of the
9
+ Software.
10
+
11
+
12
+ "Commons Clause" License Condition v1.0, as modified below
13
+
14
+ The Software is provided to you by the Licensor under the License, as defined
15
+ below, subject to the following condition.
16
+
17
+ Without limiting other conditions in the License, the grant of rights under the
18
+ License will not include, and the License does not grant to you, the right to
19
+ Sell the Software or any derivative of the Software.
20
+
21
+ For purposes of the foregoing, "Sell" means practicing any or all of the rights
22
+ granted to you under the License to provide to third parties, for a fee or
23
+ other consideration (including without limitation fees for hosting or
24
+ consulting/ support services related to the Software), a product or service
25
+ whose value derives, entirely or substantially, from the functionality of the
26
+ Software. Any license notice or attribution required by the License must also
27
+ include this Commons Clause License Condition notice.
28
+
29
+
30
+ Apache License Version 2.0, January 2004
31
+ http://www.apache.org/licenses/
32
+
33
+
34
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
35
+
36
+ 1. Definitions.
37
+
38
+ "License" shall mean the terms and conditions for use, reproduction, and
39
+ distribution as defined by Sections 1 through 9 of this document.
40
+
41
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
42
+ owner that is granting the License.
43
+
44
+ "Legal Entity" shall mean the union of the acting entity and all other entities
45
+ that control, are controlled by, or are under common control with that entity.
46
+ For the purposes of this definition, "control" means (i) the power, direct or
47
+ indirect, to cause the direction or management of such entity, whether by
48
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
49
+ outstanding shares, or (iii) beneficial ownership of such entity.
50
+
51
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
52
+ permissions granted by this License.
53
+
54
+ "Source" form shall mean the preferred form for making modifications, including
55
+ but not limited to software source code, documentation source, and
56
+ configuration files.
57
+
58
+ "Object" form shall mean any form resulting from mechanical transformation or
59
+ translation of a Source form, including but not limited to compiled object code,
60
+ generated documentation, and conversions to other media types.
61
+
62
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
63
+ available under the License, as indicated by a copyright notice that is included
64
+ in or attached to the work.
65
+
66
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
67
+ is based on (or derived from) the Work and for which the editorial revisions,
68
+ annotations, elaborations, or other modifications represent, as a whole, an
69
+ original work of authorship. For the purposes of this License, Derivative Works
70
+ shall not include works that remain separable from, or merely link (or bind by
71
+ name) to the interfaces of, the Work and Derivative Works thereof.
72
+
73
+ "Contribution" shall mean any work of authorship, including the original version
74
+ of the Work and any modifications or additions thereto, that is intentionally
75
+ submitted to Licensor for inclusion in the Work by the copyright owner or by an
76
+ individual or Legal Entity authorized to submit on behalf of the copyright
77
+ owner. For the purposes of this definition, "submitted" means any form of
78
+ electronic, verbal, or written communication sent to the Licensor or its
79
+ representatives, including but not limited to communication on electronic
80
+ mailing lists, source code control systems, and issue tracking systems that are
81
+ managed by, or on behalf of, the Licensor for the purpose of discussing and
82
+ improving the Work, but excluding communication that is conspicuously marked or
83
+ otherwise designated in writing by the copyright owner as "Not a Contribution."
84
+
85
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
86
+ of whom a Contribution has been received by Licensor and subsequently
87
+ incorporated within the Work.
88
+
89
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
90
+ License, each Contributor hereby grants to You a perpetual, worldwide,
91
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
92
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
93
+ sublicense, and distribute the Work and such Derivative Works in Source or
94
+ Object form.
95
+
96
+ 3. Grant of Patent License. Subject to the terms and conditions of this
97
+ License, each Contributor hereby grants to You a perpetual, worldwide,
98
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
99
+ section) patent license to make, have made, use, offer to sell, sell, import,
100
+ and otherwise transfer the Work, where such license applies only to those patent
101
+ claims licensable by such Contributor that are necessarily infringed by their
102
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
103
+ to which such Contribution(s) was submitted. If You institute patent litigation
104
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
105
+ alleging that the Work or a Contribution incorporated within the Work
106
+ constitutes direct or contributory patent infringement, then any patent licenses
107
+ granted to You under this License for that Work shall terminate as of the date
108
+ such litigation is filed.
109
+
110
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
111
+ Derivative Works thereof in any medium, with or without modifications, and in
112
+ Source or Object form, provided that You meet the following conditions:
113
+
114
+ (a) You must give any other recipients of the Work or Derivative Works a copy
115
+ of this License; and
116
+
117
+ (b) You must cause any modified files to carry prominent notices stating that
118
+ You changed the files; and
119
+
120
+ (c) You must retain, in the Source form of any Derivative Works that You
121
+ distribute, all copyright, patent, trademark, and attribution notices from the
122
+ Source form of the Work, excluding those notices that do not pertain to any part
123
+ of the Derivative Works; and
124
+
125
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
126
+ any Derivative Works that You distribute must include a readable copy of the
127
+ attribution notices contained within such NOTICE file, excluding those notices
128
+ that do not pertain to any part of the Derivative Works, in at least one of the
129
+ following places: within a NOTICE text file distributed as part of the
130
+ Derivative Works; within the Source form or documentation, if provided along
131
+ with the Derivative Works; or, within a display generated by the Derivative
132
+ Works, if and wherever such third-party notices normally appear. The contents of
133
+ the NOTICE file are for informational purposes only and do not modify the
134
+ License. You may add Your own attribution notices within Derivative Works that
135
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
136
+ provided that such additional attribution notices cannot be construed as
137
+ modifying the License. You may add Your own copyright statement to Your
138
+ modifications and may provide additional or different license terms and
139
+ conditions for use, reproduction, or distribution of Your modifications, or for
140
+ any such Derivative Works as a whole, provided Your use, reproduction, and
141
+ distribution of the Work otherwise complies with the conditions stated in this
142
+ License.
143
+
144
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
145
+ Contribution intentionally submitted for inclusion in the Work by You to the
146
+ Licensor shall be under the terms and conditions of this License, without any
147
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
148
+ supersede or modify the terms of any separate license agreement you may have
149
+ executed with Licensor regarding such Contributions.
150
+
151
+ 6. Trademarks. This License does not grant permission to use the trade names,
152
+ trademarks, service marks, or product names of the Licensor, except as required
153
+ for reasonable and customary use in describing the origin of the Work and
154
+ reproducing the content of the NOTICE file.
155
+
156
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
157
+ writing, Licensor provides the Work (and each Contributor provides its
158
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
159
+ KIND, either express or implied, including, without limitation, any warranties
160
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
161
+ PARTICULAR PURPOSE. You are solely responsible for determining the
162
+ appropriateness of using or redistributing the Work and assume any risks
163
+ associated with Your exercise of permissions under this License.
164
+
165
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
166
+ tort (including negligence), contract, or otherwise, unless required by
167
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
168
+ writing, shall any Contributor be liable to You for damages, including any
169
+ direct, indirect, special, incidental, or consequential damages of any character
170
+ arising as a result of this License or out of the use or inability to use the
171
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
172
+ computer failure or malfunction, or any and all other commercial damages or
173
+ losses), even if such Contributor has been advised of the possibility of such
174
+ damages.
175
+
176
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
177
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
178
+ acceptance of support, warranty, indemnity, or other liability obligations
179
+ and/or rights consistent with this License. However, in accepting such
180
+ obligations, You may act only on Your own behalf and on Your sole
181
+ responsibility, not on behalf of any other Contributor, and only if You agree to
182
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
183
+ by, or claims asserted against, such Contributor by reason of your accepting any
184
+ such warranty or additional liability.
185
+
186
+ END OF TERMS AND CONDITIONS
187
+
188
+
189
+ APPENDIX: How to apply the Apache License to your work
190
+
191
+ To apply the Apache License to your work, attach the following boilerplate
192
+ notice, with the fields enclosed by brackets "[]" replaced with your own
193
+ identifying information. (Don't include the brackets!) The text should be
194
+ enclosed in the appropriate comment syntax for the file format. We also
195
+ recommend that a file or class name and description of purpose be included on
196
+ the same "printed page" as the copyright notice for easier identification
197
+ within third-party archives.
198
+
199
+ Copyright [yyyy] [name of copyright owner]
200
+
201
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
202
+ this file except in compliance with the License. You may obtain a copy of the
203
+ License at
204
+
205
+ http://www.apache.org/licenses/LICENSE-2.0
206
+
207
+ Unless required by applicable law or agreed to in writing, software distributed
208
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
209
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
210
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,442 @@
1
+ Metadata-Version: 2.4
2
+ Name: flintai-cli
3
+ Version: 1.0.0
4
+ Summary: Command-line tool for evaluating agents, offering two features to assess agents via code scanning (`flintai scan`, whitebox testing) and runtime evaluation (`flintai eval`, blackbox testing)
5
+ Author-email: SandboxAQ <info@flintai.dev>
6
+ License: Software: Flint AI
7
+
8
+ Copyright (c) 2026 SB Technology, Inc. dba SandboxAQ
9
+
10
+ This software is licensed to you under the Apache 2.0 License as limited by
11
+ the "Commons Clause" license condition below. The "Commons Clause" license
12
+ condition has been modified from the original version to clarify that the
13
+ "Common Clause" license condition also applies to any derivatives of the
14
+ Software.
15
+
16
+
17
+ "Commons Clause" License Condition v1.0, as modified below
18
+
19
+ The Software is provided to you by the Licensor under the License, as defined
20
+ below, subject to the following condition.
21
+
22
+ Without limiting other conditions in the License, the grant of rights under the
23
+ License will not include, and the License does not grant to you, the right to
24
+ Sell the Software or any derivative of the Software.
25
+
26
+ For purposes of the foregoing, "Sell" means practicing any or all of the rights
27
+ granted to you under the License to provide to third parties, for a fee or
28
+ other consideration (including without limitation fees for hosting or
29
+ consulting/ support services related to the Software), a product or service
30
+ whose value derives, entirely or substantially, from the functionality of the
31
+ Software. Any license notice or attribution required by the License must also
32
+ include this Commons Clause License Condition notice.
33
+
34
+
35
+ Apache License Version 2.0, January 2004
36
+ http://www.apache.org/licenses/
37
+
38
+
39
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
40
+
41
+ 1. Definitions.
42
+
43
+ "License" shall mean the terms and conditions for use, reproduction, and
44
+ distribution as defined by Sections 1 through 9 of this document.
45
+
46
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
47
+ owner that is granting the License.
48
+
49
+ "Legal Entity" shall mean the union of the acting entity and all other entities
50
+ that control, are controlled by, or are under common control with that entity.
51
+ For the purposes of this definition, "control" means (i) the power, direct or
52
+ indirect, to cause the direction or management of such entity, whether by
53
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
54
+ outstanding shares, or (iii) beneficial ownership of such entity.
55
+
56
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
57
+ permissions granted by this License.
58
+
59
+ "Source" form shall mean the preferred form for making modifications, including
60
+ but not limited to software source code, documentation source, and
61
+ configuration files.
62
+
63
+ "Object" form shall mean any form resulting from mechanical transformation or
64
+ translation of a Source form, including but not limited to compiled object code,
65
+ generated documentation, and conversions to other media types.
66
+
67
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
68
+ available under the License, as indicated by a copyright notice that is included
69
+ in or attached to the work.
70
+
71
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
72
+ is based on (or derived from) the Work and for which the editorial revisions,
73
+ annotations, elaborations, or other modifications represent, as a whole, an
74
+ original work of authorship. For the purposes of this License, Derivative Works
75
+ shall not include works that remain separable from, or merely link (or bind by
76
+ name) to the interfaces of, the Work and Derivative Works thereof.
77
+
78
+ "Contribution" shall mean any work of authorship, including the original version
79
+ of the Work and any modifications or additions thereto, that is intentionally
80
+ submitted to Licensor for inclusion in the Work by the copyright owner or by an
81
+ individual or Legal Entity authorized to submit on behalf of the copyright
82
+ owner. For the purposes of this definition, "submitted" means any form of
83
+ electronic, verbal, or written communication sent to the Licensor or its
84
+ representatives, including but not limited to communication on electronic
85
+ mailing lists, source code control systems, and issue tracking systems that are
86
+ managed by, or on behalf of, the Licensor for the purpose of discussing and
87
+ improving the Work, but excluding communication that is conspicuously marked or
88
+ otherwise designated in writing by the copyright owner as "Not a Contribution."
89
+
90
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
91
+ of whom a Contribution has been received by Licensor and subsequently
92
+ incorporated within the Work.
93
+
94
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
95
+ License, each Contributor hereby grants to You a perpetual, worldwide,
96
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
97
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
98
+ sublicense, and distribute the Work and such Derivative Works in Source or
99
+ Object form.
100
+
101
+ 3. Grant of Patent License. Subject to the terms and conditions of this
102
+ License, each Contributor hereby grants to You a perpetual, worldwide,
103
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
104
+ section) patent license to make, have made, use, offer to sell, sell, import,
105
+ and otherwise transfer the Work, where such license applies only to those patent
106
+ claims licensable by such Contributor that are necessarily infringed by their
107
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
108
+ to which such Contribution(s) was submitted. If You institute patent litigation
109
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
110
+ alleging that the Work or a Contribution incorporated within the Work
111
+ constitutes direct or contributory patent infringement, then any patent licenses
112
+ granted to You under this License for that Work shall terminate as of the date
113
+ such litigation is filed.
114
+
115
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
116
+ Derivative Works thereof in any medium, with or without modifications, and in
117
+ Source or Object form, provided that You meet the following conditions:
118
+
119
+ (a) You must give any other recipients of the Work or Derivative Works a copy
120
+ of this License; and
121
+
122
+ (b) You must cause any modified files to carry prominent notices stating that
123
+ You changed the files; and
124
+
125
+ (c) You must retain, in the Source form of any Derivative Works that You
126
+ distribute, all copyright, patent, trademark, and attribution notices from the
127
+ Source form of the Work, excluding those notices that do not pertain to any part
128
+ of the Derivative Works; and
129
+
130
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
131
+ any Derivative Works that You distribute must include a readable copy of the
132
+ attribution notices contained within such NOTICE file, excluding those notices
133
+ that do not pertain to any part of the Derivative Works, in at least one of the
134
+ following places: within a NOTICE text file distributed as part of the
135
+ Derivative Works; within the Source form or documentation, if provided along
136
+ with the Derivative Works; or, within a display generated by the Derivative
137
+ Works, if and wherever such third-party notices normally appear. The contents of
138
+ the NOTICE file are for informational purposes only and do not modify the
139
+ License. You may add Your own attribution notices within Derivative Works that
140
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
141
+ provided that such additional attribution notices cannot be construed as
142
+ modifying the License. You may add Your own copyright statement to Your
143
+ modifications and may provide additional or different license terms and
144
+ conditions for use, reproduction, or distribution of Your modifications, or for
145
+ any such Derivative Works as a whole, provided Your use, reproduction, and
146
+ distribution of the Work otherwise complies with the conditions stated in this
147
+ License.
148
+
149
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
150
+ Contribution intentionally submitted for inclusion in the Work by You to the
151
+ Licensor shall be under the terms and conditions of this License, without any
152
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
153
+ supersede or modify the terms of any separate license agreement you may have
154
+ executed with Licensor regarding such Contributions.
155
+
156
+ 6. Trademarks. This License does not grant permission to use the trade names,
157
+ trademarks, service marks, or product names of the Licensor, except as required
158
+ for reasonable and customary use in describing the origin of the Work and
159
+ reproducing the content of the NOTICE file.
160
+
161
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
162
+ writing, Licensor provides the Work (and each Contributor provides its
163
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
164
+ KIND, either express or implied, including, without limitation, any warranties
165
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
166
+ PARTICULAR PURPOSE. You are solely responsible for determining the
167
+ appropriateness of using or redistributing the Work and assume any risks
168
+ associated with Your exercise of permissions under this License.
169
+
170
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
171
+ tort (including negligence), contract, or otherwise, unless required by
172
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
173
+ writing, shall any Contributor be liable to You for damages, including any
174
+ direct, indirect, special, incidental, or consequential damages of any character
175
+ arising as a result of this License or out of the use or inability to use the
176
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
177
+ computer failure or malfunction, or any and all other commercial damages or
178
+ losses), even if such Contributor has been advised of the possibility of such
179
+ damages.
180
+
181
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
182
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
183
+ acceptance of support, warranty, indemnity, or other liability obligations
184
+ and/or rights consistent with this License. However, in accepting such
185
+ obligations, You may act only on Your own behalf and on Your sole
186
+ responsibility, not on behalf of any other Contributor, and only if You agree to
187
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
188
+ by, or claims asserted against, such Contributor by reason of your accepting any
189
+ such warranty or additional liability.
190
+
191
+ END OF TERMS AND CONDITIONS
192
+
193
+
194
+ APPENDIX: How to apply the Apache License to your work
195
+
196
+ To apply the Apache License to your work, attach the following boilerplate
197
+ notice, with the fields enclosed by brackets "[]" replaced with your own
198
+ identifying information. (Don't include the brackets!) The text should be
199
+ enclosed in the appropriate comment syntax for the file format. We also
200
+ recommend that a file or class name and description of purpose be included on
201
+ the same "printed page" as the copyright notice for easier identification
202
+ within third-party archives.
203
+
204
+ Copyright [yyyy] [name of copyright owner]
205
+
206
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
207
+ this file except in compliance with the License. You may obtain a copy of the
208
+ License at
209
+
210
+ http://www.apache.org/licenses/LICENSE-2.0
211
+
212
+ Unless required by applicable law or agreed to in writing, software distributed
213
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
214
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
215
+ specific language governing permissions and limitations under the License.
216
+
217
+ Project-URL: Homepage, https://github.com/sandbox-quantum/flintai-cli
218
+ Project-URL: Issues, https://github.com/sandbox-quantum/flintai-cli/issues
219
+ Requires-Python: >=3.13
220
+ Description-Content-Type: text/markdown
221
+ License-File: LICENSE
222
+ Requires-Dist: aiohttp>=3.9
223
+ Requires-Dist: anthropic==0.87.0
224
+ Requires-Dist: cvss>=2.6
225
+ Requires-Dist: datafog>=4.4.0
226
+ Requires-Dist: dataclasses-json==0.6.7
227
+ Requires-Dist: detect-secrets>=1.5.0
228
+ Requires-Dist: garak==0.14.0
229
+ Requires-Dist: google-adk==2.2.0
230
+ Requires-Dist: litellm>=1.83.7
231
+ Requires-Dist: openai==2.29.0
232
+ Requires-Dist: pydantic==2.12.5
233
+ Requires-Dist: python-dotenv==1.2.2
234
+ Requires-Dist: requests>=2.33.0
235
+ Requires-Dist: rich>=13.0
236
+ Requires-Dist: transformers==5.3.0
237
+ Dynamic: license-file
238
+
239
+ <div align="center">
240
+
241
+ <img src="images/flint-ai-wordmark.svg" alt="Flint AI" width="350">
242
+
243
+ [![PyPI version](https://img.shields.io/pypi/v/flintai-cli?color=A1C9D2&logo=pypi&logoColor=white)](https://pypi.org/project/flintai-cli/) [![Python](https://img.shields.io/badge/python-3.13+-A1C9D2?logo=python&logoColor=white)](https://www.python.org/downloads/) [![License](https://img.shields.io/github/license/sandbox-quantum/flintai-cli?color=1B1817&labelColor=555&logoColor=white)](https://github.com/sandbox-quantum/flintai-cli/blob/main/LICENSE) [![Documentation](https://img.shields.io/badge/docs-docs.flintai.dev-FF895E)](https://docs.flintai.dev) [![Website](https://img.shields.io/badge/website-flintai.dev-FF895E)](https://flintai.dev)
244
+
245
+ </div>
246
+
247
+ **Ship AI agents with confidence**
248
+
249
+ One CLI to analyze agent code and runtime behavior, any framework.
250
+
251
+ | | **Flint AI Scan** | **Flint AI Eval** |
252
+ |---|---|---|
253
+ | **Command** | `flintai scan` | `flintai eval` |
254
+ | **What** | AI-powered security analysis of your agent's code (whitebox testing) | Runtime behavioral evaluation with adversarial prompts (blackbox testing) |
255
+ | **Output** | Security findings mapped to OWASP Top 10 for LLM with CVSS severity scores | Evaluation scores (0-100%) mapped to OWASP Top 10 for LLM |
256
+
257
+ **Why Flint AI?**
258
+ - **AI-powered analysis** — Contextual code understanding, not just pattern matching
259
+ - **OWASP ASI mapped** — Findings aligned to Top 10 for Agentic Applications
260
+ - **100% free** — First results in minutes
261
+
262
+
263
+ ## Try it now - 5 minute Quickstart
264
+
265
+ > **Requirements**
266
+ > - Python 3.13 or later
267
+ > - [OpenGrep](https://github.com/opengrep/opengrep#linux--macos) (required for Flint AI Scan)
268
+ > - A running agent accessible via HTTP (required for Flint AI Eval)
269
+ >
270
+ > **Supported frameworks:** Google ADK, Google GenAI, Anthropic, OpenAI, OpenAI Agents SDK, LangGraph, CrewAI, AutoGen, HuggingFace Transformers, HuggingFace smolagents
271
+
272
+ ### Step 1: Install Flint AI
273
+
274
+ ```bash
275
+ pip install flintai-cli
276
+ ```
277
+
278
+ ### Step 2: Configure your LLM provider
279
+
280
+ Flint AI uses AI to analyze agent code and score reliability. Run the interactive setup:
281
+
282
+ ```bash
283
+ flintai init
284
+ ```
285
+
286
+ You'll be prompted to select a provider (Gemini, OpenAI, Anthropic, or LiteLLM), choose a model, and enter your API key.
287
+
288
+ <details>
289
+ <summary>Where to get API keys</summary>
290
+
291
+ - **Google Gemini**: [aistudio.google.com/apikey](https://aistudio.google.com/apikey) (free tier available)
292
+ - **OpenAI**: [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
293
+ - **Anthropic**: [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
294
+ - **LiteLLM**: Supports 100+ providers. See [docs.litellm.ai](https://docs.litellm.ai/docs/)
295
+
296
+ </details>
297
+
298
+ > Run into issues? See [installation troubleshooting](https://docs.flintai.dev/troubleshooting/common-issues#installation)
299
+
300
+ ### Step 3: Try the example agents
301
+
302
+ To demonstrate the CLIs capabilities, we've shipped this tool with two example agents. You can get them [here](https://github.com/sandbox-quantum/flintai-cli/tree/main/examples).
303
+
304
+ **Both agents work with both `flintai scan` and `flintai eval`**:
305
+
306
+ | Agent | Framework | Description |
307
+ |-------|-----------|-------------|
308
+ | **weather_agent** | Google ADK | Weather assistant that looks up conditions for cities. Should refuse off-topic requests. |
309
+ | **bookstore_agent** | OpenAI Agents SDK | Customer support assistant for an online bookstore. Searches books, checks orders, and processes returns. |
310
+
311
+ The included `examples/config.json` has both agents configured with builtin evaluations (OWASP LLM01–LLM09, PII, secrets) and custom tests.
312
+
313
+ ---
314
+
315
+ `flintai scan` finds security issues in the code without running the agent. We'll scan the bookstore agent to see what issues Flint AI can find:
316
+ ```bash
317
+ flintai scan examples/bookstore_agent/
318
+ ```
319
+
320
+ <img src="images/scan-findings.png" alt="Scan results showing security findings" width="550">
321
+
322
+ *Example: Scan found 2 security issues - High severity missing authentication and Medium severity unbounded execution loop*
323
+
324
+ ---
325
+
326
+ `flintai eval` tests runtime behavior, so the agent needs to be running. Start the bookstore agent:
327
+
328
+ ```bash
329
+ # Start the bookstore agent (serves on http://localhost:8010)
330
+ uvx --with openai-agents,fastapi --from uvicorn uvicorn examples.bookstore_agent.agent:app --port 8010 --host 0.0.0.0
331
+ ```
332
+
333
+ In a new terminal, run evaluations:
334
+
335
+ ```bash
336
+ flintai eval run --model model-bookstore-agent --config examples/config.json
337
+ ```
338
+
339
+ ### Step 4: Test your own agents
340
+
341
+ See our documentation to configure, scan and evaluate your agents:
342
+ - `flintai scan`
343
+ - [Scan your own agent](https://docs.flintai.dev/scan/getting-started) — Apply Flint AI Scan to your codebase
344
+ - [Understand scan results](https://docs.flintai.dev/scan/scan-results) — Interpret findings and severity scores
345
+ - `flintai eval`
346
+ - [Evaluate your own agent](https://docs.flintai.dev/eval/getting-started) — Configure and test your agent's behavior
347
+ - [Configuration](https://docs.flintai.dev/eval/getting-started) — In-depth documentation of our configuration
348
+ - [Understand eval results](https://docs.flintai.dev/eval/eval-results) — What the scores means and how to improve
349
+
350
+ **Ship with confidence.** Validate behavior, catch risks, prove readiness.
351
+
352
+
353
+ ## Commands
354
+
355
+ ### `init`
356
+
357
+ Setup wizard that configures Flint AI for first use. Creates the `~/.flintai` directory with a `.env` file (LLM provider, API key, runtime settings) and a `config.json` skeleton.
358
+
359
+ Runs automatically on first use in non-CI environments. You can re-run it at any time to reconfigure.
360
+
361
+ ```bash
362
+ flintai init
363
+ ```
364
+
365
+ ### `scan`
366
+
367
+ AI-powered security analysis of agent source code. Finds vulnerabilities, misconfigurations, and OWASP Top 10 violations.
368
+
369
+ ```bash
370
+ # Scan a directory
371
+ flintai scan /path/to/agent/code
372
+
373
+ # Scan a single file
374
+ flintai scan agent.py
375
+
376
+ # Specify output file
377
+ flintai scan /path/to/code --output results.json
378
+ ```
379
+
380
+ [Full scan guide](https://docs.flintai.dev/scan/getting-started)
381
+
382
+ ### `eval`
383
+
384
+ Test agent behavior at runtime. Get a evaluation score proving production-readiness.
385
+
386
+ ```bash
387
+ # List all available configuration
388
+ flintai eval evaluations list
389
+
390
+ # List your agents and models
391
+ flintai eval models list
392
+
393
+ # Attach an evalation to your agent
394
+ flintai eval model-evaluations attach \
395
+ --model my-agent \
396
+ --eval eval-llm01-adversarial
397
+
398
+ # Run all evaluations for an agent
399
+ flintai eval run --model my-agent
400
+ ```
401
+
402
+ The `flintai eval` command requires configuration. See [Configuration](https://docs.flintai.dev/eval/eval-configuration) to:
403
+ 1. Define your models (agents to test)
404
+ 2. View available evaluations
405
+ 3. Attach evaluations to models
406
+
407
+ [Full eval guide](https://docs.flintai.dev/eval/getting-started)
408
+
409
+ ## Documentation
410
+
411
+ **Complete guides and reference:**
412
+ - [Getting started](https://docs.flintai.dev)
413
+ - [Scan command reference](https://docs.flintai.dev/scan/scan-command)
414
+ - [Eval command reference](https://docs.flintai.dev/eval/eval-command)
415
+ - [Configuration](https://docs.flintai.dev/eval/eval-configuration)
416
+ - [Environment variables](https://docs.flintai.dev/reference/env-vars)
417
+ - [Built-in evaluations](https://docs.flintai.dev/reference/builtin-evaluations)
418
+ - [Data privacy](https://docs.flintai.dev/reference/data-privacy)
419
+ - [FAQ](https://docs.flintai.dev/resources/faq)
420
+
421
+ ## Data privacy
422
+
423
+ Flint AI runs on your machine, but several features can call external LLM providers. This can be configured via `GENERATOR_MODEL`
424
+ (located in `~/.flintai/.env`, created by `flintai init`). You can set this to a remote managed LLM (i.e. `gemini`, `openai`, `anthropic`)
425
+ or a locally hosted LLM (i.e. `litellm` or `ollama`).
426
+
427
+ [Read more](https://docs.flintai.dev/reference/data-privacy).
428
+
429
+ ## Contributing
430
+
431
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
432
+
433
+ ## License
434
+
435
+ Free to use - [full license](LICENSE).
436
+
437
+ ## Contact
438
+
439
+ - Website: [https://flintai.dev](https://flintai.dev)
440
+ - Email: [info@flintai.dev](mailto:info@flintai.dev)
441
+
442
+