╔══════════════════════════════════════════════════╗
    ║                    PYSPECTOR                     ║
    ║              Next-Gen Security Scanner           ║
    ╚══════════════════════════════════════════════════╝
    
    ┌─────┐    ┌─────┐    ┌─────────────┐    ┌─────────┐
    │ AST │◄──►│RUST │◄──►│ TAINT FLOW  │◄──►│ RESULTS │
    │ GEN │    │CORE │    │   ANALYSIS  │    │ REPORT  │
    └─────┘    └─────┘    └─────────────┘    └─────────┘
         ▲                                         │
         │                                         ▼
    ┌─────────┐                               ┌─────────┐
    │ PYTHON  │                               │  JSON   │
    │   CLI   │                               │  HTML   │
    │ HANDLER │                               │  SARIF  │
    └─────────┘                               └─────────┘

The first hybrid SAST
for Real-World Python Codebases

PySpector is a static analysis security testing framework for Python, combining a Rust-powered analysis core with AST parsing, inter-procedural taint tracking, and first-class AI and LLM security rules.

240+Security Rules
45+AI and LLM Rules
6,000+PyPI Downloads
SARIFCI and CD Ready
OpenCommunity Driven
RustParallel Engine

Core Capabilities

Designed for security engineers and developers who need speed, transparency, and extensibility.

Rust-Powered Analysis

Parallel execution for large Python repositories.

Inter-Procedural Taint Tracking

Tracks data flows across call graphs.

AI and LLM Security

Rules for prompt injection and unsafe agents.

Multi-Layered Detection

Regex, AST, and semantic checks combined.

CI and CD Integration

JSON, HTML, and SARIF outputs.

Extensible Rules

TOML-based rule definitions.

Plugin System

Post-processing and custom workflows.

Interactive Triage

TUI-based triage and baseline management.

Hybrid Architecture

A clean separation between orchestration and analysis keeps PySpector fast and maintainable.

Python CLI

Configuration, AST generation, rule loading.

Rust Core

Parallel analysis engine with taint propagation.

Results Layer

Console, JSON, HTML, SARIF, and interactive TUI.

Quick Start

# Install from PyPI
pip install pyspector

# Scan a project
pyspector scan ./project

# Enable AI and LLM rules
pyspector scan ./project --ai

# Generate HTML report
pyspector scan ./project -f html -o report.html

# Scan remote repository
pyspector scan --url https://github.com/user/repo.git

# Interactive triage
pyspector triage report.json

API Playground

Try PySpector's REST API directly from your browser. Scan public repositories with customizable options.

Scan Results
Results will appear here...

Contribute to PySpector

PySpector is an open source security project built by practitioners. Contributions are welcome in rule development, Rust and Python core improvements, documentation, testing, and security research.