CytoScnPy is a high-performance static analysis tool for Python built to help developers understand, clean, and secure their codebases with speed and precision.
At its core, CytoScnPy combines the safety and performance of Rust with a seamless Python interface, giving you deep insights into your Python projects without sacrificing efficiency.
It detects:
- Dead code
- Security risks
- Code quality issues
All through a simple CLI or integrated workflow.
β‘ Key Capabilities
π§Ή Dead Code Detection
Find unused functions, classes, imports, and variables with cross-file and nested scope awareness.
π Security Analysis
Detect secrets (API keys, credentials) and patterns of dangerous code. Includes basic taint analysis to flag potential injection vectors.
π Quality Metrics
Reports on:
- Cyclomatic complexity
- Maintainability Index (MI)
- Halstead metrics
- Nesting depth
π§ Framework Awareness
Special handling for popular Python frameworks like:
- Flask
- Django
- FastAPI
- Pydantic
- Azure Functions
π― Smart Heuristics
Supports:
- Dataclasses
- Dynamic attributes
- Nuanced export detection
π How It Works
CytoScnPy is built in Rust for performance but exposes a familiar Python-centric CLI and API.
Itβs designed to be:
- Fast & lightweight β optimized static analysis with minimal memory usage
- Comprehensive β combines quality, security, and dead code checks in one run
- CI-friendly β works in GitHub Actions and modern CI/CD pipelines
π Installation
Install via pip:
pip install cytoscnpy
Or use the cross-platform installer scripts:
curl -fsSL https://raw.githubusercontent.com/djinn09/CytoScnPy/main/install.sh | bash
Windows PowerShell:
irm https://raw.githubusercontent.com/djinn09/CytoScnPy/main/install.ps1 | iex
π Typical Usage
Run CytoScnPy against your project directory:
cytoscnpy . --secrets --danger --quality --json
Generate reports, filter findings by confidence, or integrate it into your CI pipeline to enforce quality and security gates.
π GitHub: https://github.com/djinn-soul/CytoScnPy
Top comments (0)