Observed since 21 Oct, 10:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI-powered security scanner with multi-model LLM integration for comprehensive code vulnerability detection and automated patch generation
Production-ready AI-powered security scanner with multi-model LLM integration, advanced analytics, and comprehensive vulnerability detection for modern development workflows.
# Install from PyPI (when published)
pip install ai-code-security-auditor
# Or install from wheel file
pip install ai_code_security_auditor-2.0.0-py3-none-any.whl
# List available models
auditor models
# Scan your code
auditor scan . --output-format github --save security-report.md
# Analyze specific code snippet
auditor analyze --code "import os; os.system(user_input)" --language python
# Start API server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# Access interactive documentation
open http://localhost:8000/docs
Install the Package
pip install ai-code-security-auditor
Set API Key
export OPENROUTER_API_KEY="your-api-key-here"
Get your free API key at: https://openrouter.ai/
Verify Installation
auditor --help
auditor models
Create a configuration file at ~/.config/auditor/config.yaml:
# AI Code Security Auditor Configuration
api:
host: "0.0.0.0"
port: 8000
workers: 4
scanning:
default_model: "agentica-org/deepcoder-14b-preview:free"
timeout: 300
max_file_size: "10MB"
analytics:
retention_days: 365
cache_ttl: 3600
output:
default_format: "table"
colors: true
progress_bars: true
filters:
default_excludes:
- "*/node_modules/*"
- "*/.git/*"
- "*/venv/*"
- "*/test*/*"
- "*/build/*"
- "*/dist/*"
models:
preferred:
code_patches: "agentica-org/deepcoder-14b-preview:free"
quality_assessment: "meta-llama/llama-3.3-70b-instruct:free"
fast_classification: "qwen/qwen-2.5-coder-32b-instruct:free"
security_explanations: "moonshotai/kimi-dev-72b:free"
For running the FastAPI server:
# server.py
import uvicorn
from app.main import app
if __name__ == "__main__":
uvicorn.run(
app,
host="0.0.0.0",
port=8000,
reload=True # Remove for production
)
Run with:
python server.py
For enhanced performance with caching:
# Install Redis
sudo apt-get install redis-server
# Or using Docker
docker run -d -p 6379:6379 redis:alpine
# Configure environment
export REDIS_URL="redis://localhost:6379/0"
Create a .env file for your project:
# Required
OPENROUTER_API_KEY=your_api_key_here
# Optional
OPENROUTER_REFERER=https://your-domain.com
OPENROUTER_TITLE=AI Code Security Auditor
# Redis (optional)
REDIS_URL=redis://localhost:6379/0
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
# Celery (for async processing)
CELERY_BROKER_URL=redis://localhost:6379/1
CELERY_RESULT_BACKEND=redis://localhost:6379/2
# GitHub (for repository scanning)
GITHUB_TOKEN=your_github_token
AI Code Security Auditor v2.0.0
├── 🚀 FastAPI REST API (Port 8000)
│ ├── Security scanning endpoints
│ ├── Advanced analytics API
│ └── Multi-model AI integration
├── 🖥️ CLI Tools (auditor command)
│ ├── 15+ professional commands
│ ├── Rich terminal interface
│ └── Multiple output formats
├── 🔄 Background Workers (Celery - Optional)
│ ├── Async job processing
│ └── Bulk repository scanning
├── 💾 Caching Layer (Redis - Optional)
│ ├── Performance optimization
│ └── Result caching
└── 📊 Analytics Engine
├── Trend forecasting
├── Performance insights
└── Executive reporting
# Scan current directory
auditor scan .
# Scan specific file
auditor scan /path/to/file.py
# Scan with advanced analysis
auditor scan . --advanced --output-format json
# Analyze code snippet
auditor analyze --code "exec(user_input)" --language python
# Analyze with specific model
auditor analyze --code "SELECT * FROM users WHERE id = $1" --language python --model "meta-llama/llama-3.3-70b-instruct:free"
# Generate GitHub Actions report
auditor scan . --output-format github --save security-report.md
# Generate comprehensive analytics report
auditor generate-report --period 30 --include-forecast --format markdown
# View vulnerability trends
auditor trends --period 90 --include-forecast
# Performance analysis
auditor performance --include-models --breakdown-language
# Top security rules
auditor top-rules --limit 20 --min-hits 5
curl -X POST "http://localhost:8000/audit" \
-H "Content-Type: application/json" \
-d '{
"code": "import os\nos.system(user_input)",
"language": "python",
"use_advanced_analysis": true
}'
# Submit async job
JOB_ID=$(curl -s -X POST "http://localhost:8000/async/audit" \
-H "Content-Type: application/json" \
-d '{
"code": "exec(user_data)",
"language": "python"
}' | jq -r '.job_id')
# Check status
curl "http://localhost:8000/async/jobs/$JOB_ID/status"
# Get results
curl "http://localhost:8000/async/jobs/$JOB_ID/results"
curl -X POST "http://localhost:8000/async/repo-scan" \
-H "Content-Type: application/json" \
-d '{
"repository_url": "https://github.com/user/repo.git",
"branch": "main",
"max_files": 100,
"use_advanced_analysis": true
}'
from app.agents.security_agent import SecurityAgent
# Create agent instance
agent = SecurityAgent()
# Analyze code
result = await agent.run(
code="import os; os.system(user_input)",
language="python",
use_advanced_analysis=True
)
print(f"Found {len(result['vulnerabilities'])} vulnerabilities")
for vuln in result['vulnerabilities']:
print(f"- {vuln['title']} (Severity: {vuln['severity']})")
from fastapi import FastAPI
from app.main import app as security_app
# Mount security auditor
app = FastAPI()
app.mount("/security", security_app)
# Or use as dependency
from app.agents.security_agent import SecurityAgent
@app.post("/custom-scan")
async def custom_scan(code: str, language: str):
agent = SecurityAgent()
result = await agent.run(code=code, language=language)
return {"vulnerabilities": result["vulnerabilities"]}
pip install ai-code-security-auditor
git clone <repository-url>
cd ai-code-security-auditor
pip install -e .
pip install ai_code_security_auditor-2.0.0-py3-none-any.whl
# Test CLI
auditor --help
auditor models
# Test API import
python -c "from app.main import app; print('✅ Installation successful')"
For detailed information, see the organized documentation in the docs/ folder:
| Priority | File | Description |
|---|---|---|
| START HERE | 00-DOCUMENTATION_INDEX.md | Complete documentation index and navigation |
| 🚀 Essential | 01-PROJECT_OVERVIEW.md | Executive summary and features overview |
| 🚀 Essential | 02-LOCAL_SETUP_GUIDE.md | Complete installation and setup instructions |
| 🚀 Essential | 03-LOCAL_TESTING_GUIDE.md | Step-by-step testing procedures |
| 📖 Core | 04-README.md | Detailed usage guides and examples |
| 📖 Core | 05-CLI_Commands.md | Complete CLI reference guide |
pip install ai-code-security-auditor"Reduced our security review time by 70% while catching 3x more vulnerabilities than manual reviews. The AI insights are game-changing." - Enterprise Security Team
"The CLI interface is beautiful and the reports are executive-ready. Perfect for our DevOps pipeline." - Startup CTO
"Best-in-class security scanning with the intelligence of modern AI models. This tool has transformed our security posture." - Security Consultant
/docs directoryThis project is licensed under the MIT License - see the LICENSE file for details.
📖 Read Complete Documentation • 🚀 Quick Setup Guide • 🧪 Testing Guide • 💻 CLI Reference
Made with ❤️ by the AI Security Team
Transforming code security through artificial intelligence
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.0.0 | 6 Aug 2025 | 47 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 10:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d09dc53d91696829772879ef9b3303b16ff398a24f4f74c1f8e811376012c8a0