About this project

CytoScnPy is a high‑performance static analysis tool for Python codebases, implemented in Rust for speed and low memory usage. It offers comprehensive checks including dead‑code detection (unused functions, classes, imports, and variables with cascading and auto‑fix support), clone detection for duplicate code, security scanning (secret keys, taint analysis for SQL injection/XSS, and dangerous patterns like eval/exec), and a suite of code‑quality metrics (cyclomatic complexity, Halstead metrics, Maintainability Index, LOC/SLOC). The analyzer is framework‑aware, natively understanding Flask, Django, FastAPI, Pydantic, and Azure Functions v2 patterns, and it employs smart heuristics for dataclasses, __all__ exports, visitor patterns, and dynamic attributes. It tracks symbols across the entire project, ensuring accurate cross‑file usage detection. Users interact via a command‑line interface with options for JSON output, HTML reports, CI/CD quality gates, and configuration through .cytoscnpy.toml or pyproject.toml. Installation is available via a shell script, PowerShell, pip, or from source using maturin. The project includes an MCP server for AI assistant integration, a GitHub Action, and extensive documentation, benchmarks, and contributing guidelines. Performance benchmarks show high precision and recall across detection types, positioning CytoScnPy as a robust, fast alternative to traditional Python linters and analyzers.