CodeAudit Agent
by nimra-pixel
README.md
<div align="center">
# ๐ CodeAudit Agent
### AI-Powered Code Security, Quality & Performance Review
[](https://python.org)
[](https://langchain-ai.github.io/langgraph/)
[](https://github.com/jlowin/fastmcp)
[](https://groq.com)
[](https://github.com/nimra-pixel)
**Paste any code โ Get security vulnerabilities, quality issues, performance bottlenecks, auto-fix, and a graded report.**
Works as a Streamlit web app AND as an MCP server for VS Code.
</div>
---
## What it detects
| Category | Checks |
|----------|--------|
| ๐ **Security** | OWASP Top 10 ยท SQL injection ยท XSS ยท hardcoded secrets ยท eval() ยท weak crypto ยท debug mode |
| โจ **Quality** | SOLID violations ยท cyclomatic complexity ยท naming ยท DRY ยท magic numbers ยท error handling |
| โก **Performance** | O(nยฒ) loops ยท N+1 queries ยท memory leaks ยท blocking I/O ยท string concat in loops |
## Languages supported
Python ยท JavaScript ยท TypeScript ยท Java ยท C++ ยท C ยท C# ยท Go ยท Rust ยท PHP ยท Ruby ยท Swift ยท Kotlin ยท SQL ยท Bash
---
## Architecture
```
Code input (Streamlit UI or VS Code via MCP)
โ
LangGraph orchestrator
โ (parallel)
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Security โ Quality โ Performance โ
โ Agent โ Agent โ Agent โ
โ OWASP Top 10 โ SOLID/Clean โ Big-O/leaks โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
โ
Fix Agent (auto-generates fixed code)
โ
Scorer (computes grade A+ โ F)
โ
Report (.md + .json export)
```
---
## Quick Start
```bash
git clone https://github.com/nimra-pixel/codeaudit.git
cd codeaudit
pip install -r requirements.txt
cp .env.example .env # add GROQ_API_KEY
streamlit run app.py
```
## MCP Server (for VS Code)
```bash
python mcp/server.py
```
Then install the VS Code extension from `vscode/` folder.
Right-click any code โ **CodeAudit: Audit This File**
---
## MCP Tools exposed
| Tool | Description |
|------|-------------|
| `audit_code` | Full security + quality + performance audit |
| `quick_security_scan` | Security only (faster) |
| `detect_code_language` | Detect programming language |
Works with LangGraph, CrewAI, Claude Desktop, and any MCP client.
---
## Built by
**Nimra Tariq** โ AI Engineer & Assistant Professor, Superior University Lahore, Pakistan
[](https://github.com/nimra-pixel)
**Also built:** [MedAgent](https://github.com/nimra-pixel/medagent) ยท [DeepResearch](https://github.com/nimra-pixel/DeepResearch) ยท [VEMA](https://github.com/nimra-pixel/vema)
---
MIT License
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues