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 Downloads

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.0.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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for code_analyzer_b-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c3978d41c2af6dbc9c5535fad2a28e54bb7bfbc81ac06e6625fd259aa2e458a
MD5 f08c7d687d5d829d4e1224a5379b0566
BLAKE2b-256 72102512fa04cd7689fb5495ab56a0ee2ecc32560c64c116c724e0095d030ce2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for code_analyzer_b-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02d10777f4902fff4339378af17b83b60e2126a9fc9ec23ae5a85f259159164e
MD5 2376be9cb334050c2c9744316b39e95e
BLAKE2b-256 f3559d9a318c8cd841d3267f21714255402972807e13ddb47462be2cb5314b02

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