Skip to main content

AI-powered code vulnerability scanner for GitHub repositories

Project description

Code Analyzer 🔍 | AI-Powered Security Analysis

PyPI Version Python Versions License: MIT

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

  1. Data Handling:

    • Temporary repository clones are deleted after analysis
    • No code storage or telemetry collection
    • API keys encrypted in configuration
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_analyzer_b-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_analyzer_b-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file code_analyzer_b-0.1.1.tar.gz.

File metadata

  • Download URL: code_analyzer_b-0.1.1.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

Hashes for code_analyzer_b-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3e4e4204fc90735c0f3da5e8e1d5208233e1de6bba688eefe21dc1e4166d6c13
MD5 9cd4054ce69ef38273b8919536eceafc
BLAKE2b-256 3016a279063f0cb593705116e58f58968a5711c95fa6c2454bb03b9a96351c44

See more details on using hashes here.

File details

Details for the file code_analyzer_b-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for code_analyzer_b-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 320be0ea8b47dc82e982d760c8b46f640f223d6940b395f1a4661fc08a06c8c1
MD5 174df53eecc25d0c6ce1b9d48f0bfab8
BLAKE2b-256 50a2effa0e35a70761e781b4544fd518f999d4e3aa3880747b160fc6ae50309d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page