AI-powered code vulnerability scanner for GitHub repositories
Project description
Code Analyzer 🔍 | AI-Powered Security Analysis
Code Analyzer is an intelligent security scanning tool that leverages DeepSeek's AI to identify vulnerabilities, code smells, and potential security risks in GitHub repositories.
pip install code-analyzer-b
🚀 Quick Start
1. Initial Setup
code_analyzer setup
🔑 Enter your DeepSeek API key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2. Analyze Repository
code_analyzer analyze https://github.com/yourusername/your-repo
# Sample Output
🔍 Starting analysis of https://github.com/yourusername/your-repo
📁 Found 127 files to analyze
Analyzing Files: 100%|████████████████| 127/127 [03:45<00:00]
📝 Critical Findings (3) | Warnings (7) | Recommendations (12)
✨ Key Features
- Multi-Language Support - Python, JS/TS, Java, C/C++, Go, Rust, PHP, Ruby
- Smart Filtering - Auto-ignore binaries, generated files, and large assets
- AI-Powered Analysis - Context-aware vulnerability detection
- Prioritized Reporting - Risk-level categorized findings
- CI/CD Ready - Simple CLI interface for automation
📚 Documentation
Configuration Options
| Setting | Default | Description |
|---|---|---|
MAX_FILE_SIZE |
5MB | Maximum file size to analyze |
REQUEST_TIMEOUT |
30s | API request timeout |
SUPPORTED_EXT |
15+ extensions | File types to analyze |
Edit configuration at:
~/.code_analyzer/config.ini
🛠 How It Works
graph TD
A[GitHub URL] --> B(Download Repo)
B --> C{File Filter}
C --> D[Code Files]
C --> E[Ignored Files]
D --> F[AI Analysis]
F --> G[Security Checks]
F --> H[Best Practices]
F --> I[Vulnerability Scan]
G --> J(Generate Report)
H --> J
I --> J
🌐 Supported Languages
| Language | Extensions | Security Checks |
|---|---|---|
| Python | .py |
SQLi, XSS, dependency risks |
| JavaScript/TS | .js, .ts |
Prototype pollution, XSS |
| Java | .java |
Insecure deserialization |
| C/C++ | .c, .cpp |
Buffer overflow, memory leaks |
| Go | .go |
Goroutine leaks, race conditions |
| Rust | .rs |
Unsafe code, memory safety |
🔒 Security & Ethics
-
Data Handling:
- Temporary repository clones are deleted after analysis
- No code storage or telemetry collection
- API keys encrypted in configuration
-
Ethical Use:
- Only analyze repositories you own/have permission to scan
- Do not use for malicious purposes
- Respect software licenses and intellectual property
❓ FAQ
Q: How does this differ from static analysis tools?
A: Combines traditional SAST with AI context awareness for fewer false positives
Q: Analysis taking too long?
code_analyzer analyze URL --exclude tests,examples,dist
Q: Seeing API key errors?
rm ~/.code_analyzer/config.ini && code_analyzer setup
🤝 Contributing
We welcome contributions! Please see our Contribution Guidelines for:
- Feature requests
- Bug reports
- Documentation improvements
- Code contributions
📜 License
MIT License - See LICENSE for full text
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code_analyzer_b-0.1.0.tar.gz.
File metadata
- Download URL: code_analyzer_b-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c3978d41c2af6dbc9c5535fad2a28e54bb7bfbc81ac06e6625fd259aa2e458a
|
|
| MD5 |
f08c7d687d5d829d4e1224a5379b0566
|
|
| BLAKE2b-256 |
72102512fa04cd7689fb5495ab56a0ee2ecc32560c64c116c724e0095d030ce2
|
File details
Details for the file code_analyzer_b-0.1.0-py3-none-any.whl.
File metadata
- Download URL: code_analyzer_b-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02d10777f4902fff4339378af17b83b60e2126a9fc9ec23ae5a85f259159164e
|
|
| MD5 |
2376be9cb334050c2c9744316b39e95e
|
|
| BLAKE2b-256 |
f3559d9a318c8cd841d3267f21714255402972807e13ddb47462be2cb5314b02
|