pyre-check
A performant type checker and security-focused static analyzer for Python
What it is and what it does
Pysa is a security-focused static analyzer built on top of Pyrefly, Meta's Python type checker. It works by tracking how untrusted data (sources) flows through your code to dangerous operations (sinks), flagging paths that could lead to security vulnerabilities. The tool is designed to scale to large codebases and uses configurable models to identify sources and sinks relevant to your application.
You run Pysa after Pyrefly has successfully type-checked your code. It produces a report of potential security and privacy issues without executing your code. The tool ships as part of the pyre-check package and relies on a chain of dependencies including libcst for code parsing, click for CLI, and several typing utilities.
Use it for:
- Scan a web application for user input reaching SQL queries or shell commands.
- Identify privacy violations where sensitive data flows to external APIs or logs.
- Integrate security scanning into CI/CD pipelines via the GitHub Action.
- Analyze large Python codebases for data exfiltration or injection vulnerabilities.
- Enforce security policies by configuring custom taint sources and sinks for your domain.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pysa is a static analysis tool that tracks data flows through Python code to identify security and privacy vulnerabilities like SQL injection and remote code execution, scaling to codebases with millions of lines.
Yes, if you need automated security scanning for Python. Pysa is actively maintained, has no known vulnerabilities, and scales to large codebases. Install it when your team wants continuous data-flow analysis without manual code review. Requires Python 3.9+, Pyrefly setup, and willingness to configure models for your specific threats.
Install
pyre-check on PyPI
pip
pip install pyre-checkuv
uv add pyre-checkpoetry
poetry add pyre-checkInstalling pyre-check
Before you install
Medium install friction due to 12 runtime dependencies and platform-specific wheels (macOS ARM64, Linux x86_64). Active maintenance with recent release (8 days old) and ongoing repository activity supports reliability.
License in practice
MIT license is permissive; you can use, modify, and distribute Pysa with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install pyre-check
pyrefly check
pyre analyze
Requires Python 3.9 or later; Pyrefly must successfully type-check your code before Pysa can analyze it.
Verify before relying
- Whether Pysa's taint models cover your specific security concerns or require custom model writing.
- Performance characteristics when analyzing your specific codebase size and complexity.
- Integration workflow with existing CI/CD pipelines beyond the GitHub Action mentioned.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 12 — click, dataclasses-json, libcst, psutil, pyre-extensions, tabulate, testslide, typing-extensions, typing-inspect, tomli, tomli-w, pyrefly |
| Maintenance | actively maintained — 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 238,446/month — #8,937 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyre_check-0.10.0-py3-none-macosx_11_0_arm64.whl; pyre_check-0.10.0-py3-none-manylinux1_x86_64.whl
Keywords: typechecker, development
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pyreflyPyrefly is a fast type checker and language…
permissive · top 5,000 on PyPI
safetySafety CLI scans Python project dependencies…
permissive · top 5,000 on PyPI
flawfinderFlawfinder scans C/C++ source code to identify…
copyleft · top 15,000 on PyPI
zaproxyPython client library for the OWASP ZAP…
permissive · top 15,000 on PyPI
pylintPylint is a static code analyzer that checks…
copyleft · top 1,000 on PyPI
dodgyDodgy scans Python source code for suspicious…
permissive · top 15,000 on PyPI
cisco-ai-mcp-scannerScans MCP (Model Context Protocol) servers and…
unclear · top 15,000 on PyPI
uv-secureScans uv.lock, pylock.toml, and…
permissive · top 15,000 on PyPI
zizmorzizmor is a static analysis tool that scans…
permissive · top 5,000 on PyPI
pyre-extensionsProvides typing extensions for the Pyre type…
permissive · top 5,000 on PyPI