How vijay-48/ai-generated-code-security-auditor works
AI Code Security Auditor scans code and repositories for vulnerabilities, enriches findings with remediation and AI analysis, and can generate and apply fixes. The primary user workflow is CLI or API submission → scanning → vulnerability analysis and patch suggestions → report or fix application. The README documents static, secret, and AI detection; multiple report formats; backups and interactive fixes; REST API; analytics; and optional Redis-backed caching. Source excerpts and the index support several internal links, but do not expose every CLI, report, or API implementation detail, so those links are omitted where unverified.
Main entry points: security_agent.py Security Agent · cli.py Auditor CLI · scan_worker.py Scan Worker · main.py REST API
Components 24
User Interfaces
- Auditor CLI
auditor/cli.py - REST API
app/main.py - Async API
app/api/async_endpoints.py
Scanning and Analysis
- Security Scanner
app/services/scanner.py - Security Agent
app/agents/security_agent.py - Repository Scan
app/workers/repo_scan_worker.py - Git Service
app/services/git_service.py
AI and Remediation
- Remediation Retrieval
app/services/rag_service.py - AI Analysis
app/services/llm_service.py - Model Client
app/services/llm_client.py - Fix Application
auditor/cli.py
Async Processing
- Scan Worker
app/workers/scan_worker.py - Task Queue
app/celery_app.py - Cache Service
app/services/cache_service.py - Progress Updates
app/websocket_manager.py
Results and Insights
- Analytics API
app/api/analytics_endpoints.py - Analytics Service
app/services/analytics_service.py - Analytics Models
app/models/analytics.py - Reports
app/utils/report_generator.py - CLI Visualizations
cli_visuals/charts.py - CLI Heatmap
cli_visuals/heatmap.py - Terminal Capabilities
cli_visuals/terminal.py
Other components
- User
- LLM Providers
Connections 27
- User → Auditor CLI: runs commands
README.md - User → REST API: submits scans
README.md - Auditor CLI → Security Agent: requests analysis
auditor/cli.py - REST API → Async API: routes requests
app/main.py - REST API → Security Agent: invokes analysis
app/main.py - Security Agent → Security Scanner: scans code
app/agents/security_agent.py - Security Agent → Remediation Retrieval: retrieves remediation
app/agents/security_agent.py - Security Agent → AI Analysis: generates fixes
app/agents/security_agent.py - AI Analysis → LLM Providers: calls models
app/services/llm_service.py - Model Client → LLM Providers: sends requests
app/services/llm_client.py - Auditor CLI → Fix Application: offers fix commands
README.md - Async API → Scan Worker: dispatches scans
app/api/async_endpoints.py - Async API → Repository Scan: dispatches repository scans
app/api/async_endpoints.py - Task Queue → Scan Worker: registers tasks
app/celery_app.py - Task Queue → Repository Scan: registers tasks
app/celery_app.py - Scan Worker → Security Agent: runs analysis
app/workers/scan_worker.py - Repository Scan → Git Service: clones repository
app/workers/repo_scan_worker.py - Repository Scan → Security Agent: analyzes files
app/workers/repo_scan_worker.py - Scan Worker → Cache Service: reads and writes progress
app/workers/scan_worker.py - Scan Worker → Progress Updates: publishes progress
app/workers/scan_worker.py - REST API → Analytics Service: stores scan results
app/main.py - Analytics API → Analytics Service: serves analytics
app/api/analytics_endpoints.py - Analytics Service → Analytics Models: uses data models
app/services/analytics_service.py - Auditor CLI → Reports: produces reports
README.md - Auditor CLI → CLI Visualizations: renders findings
- CLI Visualizations → Terminal Capabilities: uses capabilities
cli_visuals/charts.py - CLI Visualizations → CLI Heatmap: includes heatmaps