You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| VS Code ext | TypeScript, VS Code Extension API | LSP-style diagnostics |
54
53
55
54
---
56
55
56
+
## AI Provider System
57
+
58
+
Zenvra supports multiple AI providers for generating vulnerability explanations and fix suggestions. Users can bring their own API key and even configure custom endpoints.
59
+
60
+
### Supported Providers
61
+
62
+
| Provider | Models | Notes |
63
+
|----------|--------|-------|
64
+
| Anthropic | claude-sonnet-4-20250514, etc. | Default provider |
65
+
| OpenAI | gpt-4o, gpt-4o-mini, etc. | Also works for OpenAI-compatible APIs (Groq, Together, etc.) |
66
+
| Google | gemini-2.0-flash, etc. | Gemini generateContent API |
67
+
| Custom | User-defined | Any endpoint with OpenAI-compatible API format |
68
+
69
+
### Configuration
70
+
71
+
```env
72
+
AI_PROVIDER=anthropic # anthropic | openai | google | custom
73
+
AI_API_KEY=sk-ant-... # API key for the chosen provider
74
+
AI_MODEL=claude-sonnet-4-20250514 # Model identifier
75
+
AI_ENDPOINT= # Only needed for custom provider or non-default endpoints
76
+
```
77
+
78
+
### Architecture
79
+
80
+
The `AiProvider` trait in `crates/scanner/src/ai/` defines the interface:
Each provider (`AnthropicProvider`, `OpenAiProvider`, `GoogleProvider`, `CustomProvider`) implements this trait. Provider selection is config-driven via `AiConfig`.
91
+
92
+
---
93
+
57
94
## Coding Rules — Always Follow These
58
95
59
96
### Rust
@@ -65,11 +102,10 @@ zenvra/
65
102
- Tests in `#[cfg(test)]` modules at bottom of each file
66
103
- No `unsafe` without a comment explaining exactly why it's safe
67
104
68
-
### TypeScript / Next.js
105
+
### TypeScript / SvelteKit
69
106
- TypeScript strict mode is ON — no `any`, no `@ts-ignore`
70
-
- Named exports everywhere except Next.js page components
71
-
- Server Components by default; add `"use client"` only when needed
72
-
- API routes live in `apps/web/src/app/api/`
107
+
- Named exports everywhere except SvelteKit page/layout components
108
+
- Use Svelte 5 runes syntax (`$state`, `$derived`, `$effect`, `$props`)
73
109
- No secrets or API keys ever in client-side code
74
110
- All fetch calls go through typed API client functions in `apps/web/src/lib/api.ts`
75
111
- Components max 200 lines — split into smaller ones if larger
This repository is in **initial setup phase**. The structure, CI, and issue templates are being established. No production code exists yet. First milestone: working web paste scanner (MVP).
222
+
This repository is in **active MVP development**. The scan engine foundation, multi-AI provider system, and secrets detection are being built. First milestone: working CLI scanner + web paste UI.
186
223
187
224
When in doubt about a decision, open a GitHub Discussion rather than assuming. We build deliberately.
0 commit comments