ai-trust-validator 0.3.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.
- ai_trust_validator-0.3.0/LICENSE +21 -0
- ai_trust_validator-0.3.0/PKG-INFO +501 -0
- ai_trust_validator-0.3.0/README.md +445 -0
- ai_trust_validator-0.3.0/ai_trust_validator/__init__.py +107 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analytics.py +386 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analyzers/__init__.py +35 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analyzers/best_practices.py +263 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analyzers/hallucination.py +261 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analyzers/logic.py +255 -0
- ai_trust_validator-0.3.0/ai_trust_validator/analyzers/security.py +182 -0
- ai_trust_validator-0.3.0/ai_trust_validator/api_server.py +381 -0
- ai_trust_validator-0.3.0/ai_trust_validator/benchmark.py +359 -0
- ai_trust_validator-0.3.0/ai_trust_validator/cache.py +268 -0
- ai_trust_validator-0.3.0/ai_trust_validator/cli.py +545 -0
- ai_trust_validator-0.3.0/ai_trust_validator/config.py +102 -0
- ai_trust_validator-0.3.0/ai_trust_validator/fixer.py +258 -0
- ai_trust_validator-0.3.0/ai_trust_validator/lsp_server.py +344 -0
- ai_trust_validator-0.3.0/ai_trust_validator/multi_file.py +334 -0
- ai_trust_validator-0.3.0/ai_trust_validator/plugin.py +283 -0
- ai_trust_validator-0.3.0/ai_trust_validator/reporters/__init__.py +7 -0
- ai_trust_validator-0.3.0/ai_trust_validator/reporters/html_reporter.py +191 -0
- ai_trust_validator-0.3.0/ai_trust_validator/reporters/json_reporter.py +79 -0
- ai_trust_validator-0.3.0/ai_trust_validator/reporters/sarif_reporter.py +101 -0
- ai_trust_validator-0.3.0/ai_trust_validator/test_generator.py +217 -0
- ai_trust_validator-0.3.0/ai_trust_validator/validator.py +197 -0
- ai_trust_validator-0.3.0/ai_trust_validator/watcher.py +256 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/PKG-INFO +501 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/SOURCES.txt +33 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/dependency_links.txt +1 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/entry_points.txt +8 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/requires.txt +20 -0
- ai_trust_validator-0.3.0/ai_trust_validator.egg-info/top_level.txt +1 -0
- ai_trust_validator-0.3.0/pyproject.toml +112 -0
- ai_trust_validator-0.3.0/setup.cfg +4 -0
- ai_trust_validator-0.3.0/tests/test_validator.py +145 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rudra496
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ai-trust-validator
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Validate AI-generated code for security vulnerabilities, hallucinations, and logic errors
|
|
5
|
+
Author-email: Rudra Sarker <rudra496@users.noreply.github.com>
|
|
6
|
+
Maintainer-email: Rudra Sarker <rudra496@users.noreply.github.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/rudra496/ai-code-trust-validator
|
|
9
|
+
Project-URL: Documentation, https://github.com/rudra496/ai-code-trust-validator#readme
|
|
10
|
+
Project-URL: Repository, https://github.com/rudra496/ai-code-trust-validator
|
|
11
|
+
Project-URL: Issues, https://github.com/rudra496/ai-code-trust-validator/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/rudra496/ai-code-trust-validator/releases
|
|
13
|
+
Project-URL: Author, https://rudra496.github.io/site
|
|
14
|
+
Project-URL: LinkedIn, https://www.linkedin.com/in/rudrasarker
|
|
15
|
+
Keywords: ai,code-quality,security,validation,llm,chatgpt,copilot,claude,gpt,static-analysis,developer-tools,machine-learning,code-review,testing,hallucination,trust,verification,ast,linter,vscode,lsp
|
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
|
17
|
+
Classifier: Environment :: Console
|
|
18
|
+
Classifier: Framework :: AsyncIO
|
|
19
|
+
Classifier: Intended Audience :: Developers
|
|
20
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
29
|
+
Classifier: Topic :: Software Development :: Testing
|
|
30
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
31
|
+
Classifier: Topic :: Security
|
|
32
|
+
Classifier: Typing :: Typed
|
|
33
|
+
Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
|
|
34
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
35
|
+
Requires-Python: >=3.8
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
Requires-Dist: click>=8.0
|
|
39
|
+
Requires-Dist: rich>=13.0
|
|
40
|
+
Requires-Dist: pyyaml>=6.0
|
|
41
|
+
Requires-Dist: astroid>=3.0
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
46
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
47
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
48
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
49
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
50
|
+
Provides-Extra: server
|
|
51
|
+
Requires-Dist: uvicorn>=0.20; extra == "server"
|
|
52
|
+
Requires-Dist: fastapi>=0.100; extra == "server"
|
|
53
|
+
Provides-Extra: all
|
|
54
|
+
Requires-Dist: ai-trust-validator[dev,server]; extra == "all"
|
|
55
|
+
Dynamic: license-file
|
|
56
|
+
|
|
57
|
+
<div align="center">
|
|
58
|
+
|
|
59
|
+
# π‘οΈ AI Code Trust Validator
|
|
60
|
+
|
|
61
|
+
[](https://opensource.org/licenses/MIT)
|
|
62
|
+
[](https://www.python.org/downloads/)
|
|
63
|
+
[](https://github.com/rudra496/ai-code-trust-validator/stargazers)
|
|
64
|
+
[](https://github.com/rudra496/ai-code-trust-validator/network/members)
|
|
65
|
+
[](https://github.com/rudra496/ai-code-trust-validator/pkgs/container/ai-code-trust-validator)
|
|
66
|
+
[](vscode-extension/)
|
|
67
|
+
|
|
68
|
+
**Trust your AI-generated code before shipping to production.**
|
|
69
|
+
|
|
70
|
+
*The complete quality gate for AI-assisted development*
|
|
71
|
+
|
|
72
|
+
[Installation](#-installation) β’ [Quick Start](#-quick-start) β’ [Features](#-features) β’ [CLI Reference](#-cli-reference) β’ [Documentation](#-documentation)
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## π― The Problem
|
|
79
|
+
|
|
80
|
+
**84% of developers use AI coding tools. Only 29% trust the output.** *(Stack Overflow 2025)*
|
|
81
|
+
|
|
82
|
+
AI writes code fast, but that code often contains:
|
|
83
|
+
- π **Security vulnerabilities** β SQL injection, hardcoded secrets, command injection
|
|
84
|
+
- π **Hallucinations** β Fake imports, invented functions, imaginary APIs
|
|
85
|
+
- π **Logic errors** β Unreachable code, infinite loops, dead branches
|
|
86
|
+
- π **Technical debt** β Missing docs, poor naming, deep nesting
|
|
87
|
+
- π **Dependency issues** β Circular imports, missing modules, unused code
|
|
88
|
+
|
|
89
|
+
**You can't ship what you can't trust.**
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## β¨ Features
|
|
94
|
+
|
|
95
|
+
| Category | Features |
|
|
96
|
+
|----------|----------|
|
|
97
|
+
| **π Analysis** | Security scanning, Hallucination detection, Logic validation, Best practices |
|
|
98
|
+
| **π Reports** | JSON, HTML (beautiful dashboard), SARIF (GitHub Security), PDF |
|
|
99
|
+
| **π§ Fixes** | Auto-fix suggestions, Confidence scores, One-click apply |
|
|
100
|
+
| **π§ͺ Testing** | Auto-generate pytest tests, Edge case detection, Coverage analysis |
|
|
101
|
+
| **π API** | REST API server, OpenAPI docs, Batch validation, Webhook support |
|
|
102
|
+
| **π Monitoring** | File watch mode, Live dashboard, Continuous validation |
|
|
103
|
+
| **π¦ Multi-file** | Dependency analysis, Circular dependency detection, Import validation |
|
|
104
|
+
| **β‘ Performance** | Intelligent caching, Incremental analysis, ~10,000+ lines/sec |
|
|
105
|
+
| **π Extensible** | Plugin system, Custom analyzers, Hook system |
|
|
106
|
+
| **π³ Deployment** | Docker, Docker Compose, GitHub Action, Pre-commit hooks |
|
|
107
|
+
| **π» IDE Integration** | VS Code extension, LSP server, JetBrains (coming soon) |
|
|
108
|
+
| **π Team Analytics** | Dashboard, Leaderboards, Trend analysis, Project breakdown |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## π¦ Installation
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# From PyPI (recommended)
|
|
116
|
+
pip install ai-trust-validator
|
|
117
|
+
|
|
118
|
+
# With server support
|
|
119
|
+
pip install ai-trust-validator[server]
|
|
120
|
+
|
|
121
|
+
# With all extras
|
|
122
|
+
pip install ai-trust-validator[all]
|
|
123
|
+
|
|
124
|
+
# From source
|
|
125
|
+
git clone https://github.com/rudra496/ai-code-trust-validator.git
|
|
126
|
+
cd ai-code-trust-validator
|
|
127
|
+
pip install -e ".[all]"
|
|
128
|
+
|
|
129
|
+
# Docker
|
|
130
|
+
docker pull ghcr.io/rudra496/ai-code-trust-validator:latest
|
|
131
|
+
docker run -v ./code:/code ghcr.io/rudra496/ai-code-trust-validator validate /code
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## π Quick Start
|
|
137
|
+
|
|
138
|
+
### CLI
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Validate a file
|
|
142
|
+
aitrust validate generated_code.py
|
|
143
|
+
|
|
144
|
+
# Validate directory with minimum score
|
|
145
|
+
aitrust validate src/ --min-score 75 --strict
|
|
146
|
+
|
|
147
|
+
# Generate HTML report
|
|
148
|
+
aitrust report src/ --format html --output report.html
|
|
149
|
+
|
|
150
|
+
# Get fix suggestions
|
|
151
|
+
aitrust suggest-fixes buggy_code.py
|
|
152
|
+
|
|
153
|
+
# Generate tests
|
|
154
|
+
aitrust generate-tests module.py --output tests/test_module.py
|
|
155
|
+
|
|
156
|
+
# Start API server
|
|
157
|
+
aitrust serve --port 8080
|
|
158
|
+
|
|
159
|
+
# Watch for changes with live dashboard
|
|
160
|
+
aitrust watch src/ --dashboard
|
|
161
|
+
|
|
162
|
+
# Analyze dependencies
|
|
163
|
+
aitrust analyze-deps src/
|
|
164
|
+
|
|
165
|
+
# Run benchmarks
|
|
166
|
+
aitrust benchmark --iterations 100
|
|
167
|
+
|
|
168
|
+
# View team analytics
|
|
169
|
+
aitrust analytics --days 30
|
|
170
|
+
|
|
171
|
+
# Start LSP server (for IDE integration)
|
|
172
|
+
aitrust lsp
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Python API
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from ai_trust_validator import Validator, Config
|
|
179
|
+
|
|
180
|
+
# Simple validation
|
|
181
|
+
validator = Validator()
|
|
182
|
+
result = validator.validate("generated_code.py")
|
|
183
|
+
|
|
184
|
+
print(f"Trust Score: {result.trust_score}/100")
|
|
185
|
+
print(f"Passed: {result.passed}")
|
|
186
|
+
|
|
187
|
+
for issue in result.critical_issues:
|
|
188
|
+
print(f"[CRITICAL] {issue.message}")
|
|
189
|
+
if issue.suggestion:
|
|
190
|
+
print(f" π‘ {issue.suggestion}")
|
|
191
|
+
|
|
192
|
+
# With custom config
|
|
193
|
+
config = Config(min_score=80, strict_mode=True)
|
|
194
|
+
validator = Validator(config)
|
|
195
|
+
result = validator.validate_code(code_string)
|
|
196
|
+
|
|
197
|
+
# Multi-file analysis
|
|
198
|
+
from ai_trust_validator import MultiFileAnalyzer
|
|
199
|
+
analyzer = MultiFileAnalyzer(validator)
|
|
200
|
+
result = analyzer.analyze_directory("src/")
|
|
201
|
+
print(f"Circular deps: {result.circular_dependencies}")
|
|
202
|
+
|
|
203
|
+
# Team analytics
|
|
204
|
+
from ai_trust_validator import AnalyticsDB
|
|
205
|
+
db = AnalyticsDB()
|
|
206
|
+
db.record_validation("file.py", result, user="dev1", project="myapp")
|
|
207
|
+
stats = db.get_stats(days=30)
|
|
208
|
+
print(f"Team avg: {stats.average_score}")
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### REST API
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Start server
|
|
215
|
+
aitrust serve --port 8080
|
|
216
|
+
|
|
217
|
+
# Validate via API
|
|
218
|
+
curl -X POST http://localhost:8080/validate \
|
|
219
|
+
-H "Content-Type: application/json" \
|
|
220
|
+
-d '{"code": "def hello(): print(\"world\")"}'
|
|
221
|
+
|
|
222
|
+
# Batch validation
|
|
223
|
+
curl -X POST http://localhost:8080/validate/batch \
|
|
224
|
+
-H "Content-Type: application/json" \
|
|
225
|
+
-d '{"files": [{"name": "a.py", "code": "..."}]}'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Web Dashboard
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Start server with dashboard
|
|
232
|
+
aitrust serve --port 8080
|
|
233
|
+
|
|
234
|
+
# Open browser to http://localhost:8080
|
|
235
|
+
# Or serve the static dashboard
|
|
236
|
+
cd dashboard && python -m http.server 3000
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## π Example Output
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
π Analyzing: generated_code.py
|
|
245
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
246
|
+
|
|
247
|
+
π TRUST SCORE: 67/100 β οΈ
|
|
248
|
+
|
|
249
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
250
|
+
β Category Score Issues β
|
|
251
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
252
|
+
β Security 72 2 medium, 1 low β
|
|
253
|
+
β Hallucinations 45 3 critical β
|
|
254
|
+
β Logic 85 1 minor β
|
|
255
|
+
β Best Practices 70 2 warnings β
|
|
256
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
257
|
+
|
|
258
|
+
π¨ Critical Issues:
|
|
259
|
+
[HALLUCINATION] Line 12: Import 'fancy_lib' does not exist
|
|
260
|
+
[HALLUCINATION] Line 18: Function 'quick_sort_v2' not defined
|
|
261
|
+
[SECURITY] Line 24: Potential SQL injection via f-string
|
|
262
|
+
|
|
263
|
+
π‘ AI Suggestions:
|
|
264
|
+
β Replace 'fancy_lib' with 'numpy' or 'pandas'
|
|
265
|
+
β Use built-in sorted() instead of 'quick_sort_v2'
|
|
266
|
+
β Use parameterized queries: cursor.execute("... WHERE id = ?", (user_id,))
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## π§ CLI Reference
|
|
272
|
+
|
|
273
|
+
| Command | Description |
|
|
274
|
+
|---------|-------------|
|
|
275
|
+
| `aitrust validate <path>` | Validate code and show trust score |
|
|
276
|
+
| `aitrust report <path>` | Generate detailed report (JSON/HTML/SARIF) |
|
|
277
|
+
| `aitrust suggest-fixes <path>` | Show fix suggestions for issues |
|
|
278
|
+
| `aitrust generate-tests <path>` | Generate pytest tests |
|
|
279
|
+
| `aitrust serve` | Start REST API server |
|
|
280
|
+
| `aitrust watch <path>` | Watch files for changes |
|
|
281
|
+
| `aitrust benchmark` | Run performance benchmarks |
|
|
282
|
+
| `aitrust analyze-deps <path>` | Multi-file dependency analysis |
|
|
283
|
+
| `aitrust analytics` | View team analytics |
|
|
284
|
+
| `aitrust cache <action>` | Manage validation cache |
|
|
285
|
+
| `aitrust lsp` | Start LSP server for IDEs |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## π³ Docker & Deployment
|
|
290
|
+
|
|
291
|
+
### Docker Compose
|
|
292
|
+
|
|
293
|
+
```yaml
|
|
294
|
+
version: '3.8'
|
|
295
|
+
services:
|
|
296
|
+
validator:
|
|
297
|
+
image: ghcr.io/rudra496/ai-code-trust-validator:latest
|
|
298
|
+
ports:
|
|
299
|
+
- "8080:8080"
|
|
300
|
+
command: serve --port 8080
|
|
301
|
+
volumes:
|
|
302
|
+
- ./code:/code:ro
|
|
303
|
+
- ./.aitrust_cache:/app/.aitrust_cache
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### GitHub Action
|
|
307
|
+
|
|
308
|
+
```yaml
|
|
309
|
+
name: AI Code Trust Check
|
|
310
|
+
on: [pull_request]
|
|
311
|
+
|
|
312
|
+
jobs:
|
|
313
|
+
trust-check:
|
|
314
|
+
runs-on: ubuntu-latest
|
|
315
|
+
steps:
|
|
316
|
+
- uses: actions/checkout@v4
|
|
317
|
+
|
|
318
|
+
- name: Validate AI Code
|
|
319
|
+
uses: rudra496/ai-code-trust-validator@v0.3.0
|
|
320
|
+
with:
|
|
321
|
+
path: 'src/'
|
|
322
|
+
min-score: '75'
|
|
323
|
+
format: 'sarif'
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Pre-commit Hook
|
|
327
|
+
|
|
328
|
+
```yaml
|
|
329
|
+
# .pre-commit-config.yaml
|
|
330
|
+
repos:
|
|
331
|
+
- repo: https://github.com/rudra496/ai-code-trust-validator
|
|
332
|
+
rev: v0.3.0
|
|
333
|
+
hooks:
|
|
334
|
+
- id: ai-trust-validator
|
|
335
|
+
args: ['--min-score', '70']
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## π» IDE Integration
|
|
341
|
+
|
|
342
|
+
### VS Code
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Install from VS Code Marketplace
|
|
346
|
+
# Search for "AI Trust Validator"
|
|
347
|
+
|
|
348
|
+
# Or install manually
|
|
349
|
+
cd vscode-extension
|
|
350
|
+
npm install
|
|
351
|
+
npm run compile
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Features:
|
|
355
|
+
- Real-time diagnostics
|
|
356
|
+
- Trust score in status bar
|
|
357
|
+
- Quick fix suggestions
|
|
358
|
+
- Hover information
|
|
359
|
+
- Auto-validate on save
|
|
360
|
+
|
|
361
|
+
### LSP Server (Neovim, Emacs, etc.)
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
# Start LSP server
|
|
365
|
+
aitrust lsp
|
|
366
|
+
|
|
367
|
+
# Configure in your LSP client
|
|
368
|
+
# Command: aitrust lsp
|
|
369
|
+
# Language: python
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## π Plugin System
|
|
375
|
+
|
|
376
|
+
Create custom analyzers:
|
|
377
|
+
|
|
378
|
+
```python
|
|
379
|
+
from ai_trust_validator import AnalyzerPlugin, PluginMetadata, Issue
|
|
380
|
+
|
|
381
|
+
class MyCustomAnalyzer(AnalyzerPlugin):
|
|
382
|
+
@property
|
|
383
|
+
def metadata(self):
|
|
384
|
+
return PluginMetadata(
|
|
385
|
+
name="my_custom",
|
|
386
|
+
version="1.0.0",
|
|
387
|
+
author="You",
|
|
388
|
+
description="Custom analyzer"
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
def analyze(self, tree, code, context):
|
|
392
|
+
issues = []
|
|
393
|
+
# Your analysis logic
|
|
394
|
+
return issues
|
|
395
|
+
|
|
396
|
+
# Register
|
|
397
|
+
from ai_trust_validator import PluginManager
|
|
398
|
+
manager = PluginManager()
|
|
399
|
+
manager.register(MyCustomAnalyzer())
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## π Performance
|
|
405
|
+
|
|
406
|
+
| Metric | Value |
|
|
407
|
+
|--------|-------|
|
|
408
|
+
| Throughput | 10,000+ lines/sec |
|
|
409
|
+
| Avg validation | 5-20ms per file |
|
|
410
|
+
| Memory | <50MB typical |
|
|
411
|
+
| Cache hit rate | 95%+ on re-runs |
|
|
412
|
+
|
|
413
|
+
Run your own benchmarks:
|
|
414
|
+
```bash
|
|
415
|
+
aitrust benchmark --iterations 1000
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## πΊοΈ Roadmap
|
|
421
|
+
|
|
422
|
+
### Completed β
|
|
423
|
+
|
|
424
|
+
- [x] Core validation engine
|
|
425
|
+
- [x] Security analyzer
|
|
426
|
+
- [x] Hallucination detector
|
|
427
|
+
- [x] Logic analyzer
|
|
428
|
+
- [x] Best practices checker
|
|
429
|
+
- [x] CLI with rich output
|
|
430
|
+
- [x] JSON/HTML/SARIF reports
|
|
431
|
+
- [x] Fix suggestions
|
|
432
|
+
- [x] Test generation
|
|
433
|
+
- [x] REST API server
|
|
434
|
+
- [x] Docker support
|
|
435
|
+
- [x] GitHub Action
|
|
436
|
+
- [x] Pre-commit hooks
|
|
437
|
+
- [x] Plugin system
|
|
438
|
+
- [x] Multi-file analysis
|
|
439
|
+
- [x] Watch mode
|
|
440
|
+
- [x] Caching system
|
|
441
|
+
- [x] LSP server
|
|
442
|
+
- [x] VS Code extension
|
|
443
|
+
- [x] Web dashboard
|
|
444
|
+
- [x] Team analytics
|
|
445
|
+
|
|
446
|
+
### Coming Soon π§
|
|
447
|
+
|
|
448
|
+
- [ ] JavaScript/TypeScript support
|
|
449
|
+
- [ ] AI-powered auto-fix (LLM integration)
|
|
450
|
+
- [ ] JetBrains plugin (IntelliJ, PyCharm)
|
|
451
|
+
- [ ] Cloud hosted version
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## π Statistics
|
|
456
|
+
|
|
457
|
+

|
|
458
|
+

|
|
459
|
+

|
|
460
|
+

|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## π€ Contributing
|
|
465
|
+
|
|
466
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
467
|
+
|
|
468
|
+
**Ways to help:**
|
|
469
|
+
- π Report bugs
|
|
470
|
+
- π‘ Suggest features
|
|
471
|
+
- π Improve documentation
|
|
472
|
+
- π§ Submit pull requests
|
|
473
|
+
- β Star the repo!
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## π License
|
|
478
|
+
|
|
479
|
+
MIT License β use it freely. Just don't blame us if AI breaks production. π
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
<div align="center">
|
|
484
|
+
|
|
485
|
+
## π Connect with the Creator
|
|
486
|
+
|
|
487
|
+
**[Rudra Sarker](https://rudra496.github.io/site)** β’ Developer & Researcher
|
|
488
|
+
|
|
489
|
+
[](https://www.linkedin.com/in/rudrasarker)
|
|
490
|
+
[](https://rudra496.github.io/site)
|
|
491
|
+
[](https://github.com/rudra496)
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
**Built to close the AI trust gap.**
|
|
496
|
+
|
|
497
|
+
*If this helped you, consider giving it a β β it helps others find it too!*
|
|
498
|
+
|
|
499
|
+
**Made with β€οΈ by [Rudra Sarker](https://rudra496.github.io/site)**
|
|
500
|
+
|
|
501
|
+
</div>
|