How paras-2407/vulnai-vulnerability-detection-in-ai-models works
VulnAI is a web application for authenticated ML-model and LLM security audits. Users sign in, submit a model and (for ML scans) test images, run the selected security analysis, then review reports and scan history. The graph distinguishes the ML adversarial-attack pipeline from LLM checks and report generation. Edges are limited to relationships shown in excerpts or README; unsampled frontend/API wiring and some backend scan steps are omitted.
Main entry points: upload.py Upload and scan routes · auth.py Token service · page.jsx Scan dashboard · main.py FastAPI app
Components 17
Web dashboard
- Scan dashboard
frontend/app/page.jsx - OAuth provider
frontend/app/providers.jsx - API client
frontend/lib/api-client.js
API and identity
- FastAPI app
backend/app/main.py - Google auth route
backend/app/routers/auth_router.py - Token service
backend/app/services/auth.py - Auth configuration
backend/app/config.py - Upload and scan routes
backend/app/routers/upload.py - Scan schemas
backend/app/models/schemas.py
ML scanning
- Model and image files
backend/app/services/model_service.py - Adversarial attacks
backend/app/services/attack_service.py
LLM scanning
- LLM security tests
backend/app/services/llm_security_service.py
Results and reporting
- Report generation
backend/app/services/reporter_service.py - Scan history
backend/app/routers/upload.py
Other components
- Auditor
- Gemini API
- Google OAuth
Connections 20
- Auditor → Scan dashboard: uses
- Scan dashboard → OAuth provider: authenticates with
frontend/app/providers.jsx - Scan dashboard → API client: requests scans
- API client → FastAPI app: calls API
- FastAPI app → Google auth route: registers
backend/app/main.py - FastAPI app → Upload and scan routes: registers
backend/app/main.py - Google auth route → Token service: verifies and signs
backend/app/routers/auth_router.py - Token service → Auth configuration: reads settings
backend/app/services/auth.py - Token service → Google OAuth: verifies token
backend/app/services/auth.py - Upload and scan routes → Token service: checks identity
backend/app/routers/upload.py - Upload and scan routes → Model and image files: saves and lists
backend/app/routers/upload.py - Upload and scan routes → Adversarial attacks: runs ML scan
backend/app/routers/upload.py - Adversarial attacks → Model and image files: loads model
backend/app/services/attack_service.py - Adversarial attacks → Scan schemas: creates results
backend/app/services/attack_service.py - Upload and scan routes → LLM security tests: runs LLM scan
backend/app/routers/upload.py - Upload and scan routes → Scan schemas: validates responses
backend/app/routers/upload.py - Upload and scan routes → Report generation: requests report
backend/app/routers/upload.py - Report generation → Gemini API: generates report
backend/app/services/reporter_service.py - Upload and scan routes → Scan history: stores and retrieves
backend/app/routers/upload.py - Auditor → Google OAuth: signs in