Pysa is a security-focused static analysis tool for Python that tracks data flows to find security and privacy issues — for example, user-controlled input reaching a dangerous sink such as remote code execution or SQL injection. Pysa can analyze codebases with millions of lines of code. Refer to our documentation to get started.
Pysa relies on type information from Pyrefly, Meta's performant Python type checker.
Pysa is also available on the GitHub Marketplace as a GitHub Action.
Installation
Pysa requires Python 3.9 or later. Install it with pip:
$ pip install pyre-check
Pysa is currently distributed as part of the pyre-check package, since it was historically bundled with Pyre, Meta's (deprecated) type checker. In the future, Pysa will ship as its own PyPI package.
Running Pysa
Pysa relies on type information from Pyrefly. Before running Pysa, make sure Pyrefly can successfully check your code:
$ pyrefly check
Once Pyrefly runs cleanly, run Pysa from your project directory to find security and privacy issues:
$ pyre analyze
Pysa uses models to identify sources of taint (where untrusted data enters) and sinks (dangerous operations). For details on configuring Pysa, writing models, and interpreting results, see the Pysa documentation.
Join the Pysa community
See CONTRIBUTING.md for how to help out.
License
Pysa is licensed under the MIT license.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyre_check-0.10.0-py3-none-manylinux1_x86_64.whl.
File metadata
- Download URL: pyre_check-0.10.0-py3-none-manylinux1_x86_64.whl
- Upload date:
- Size: 46.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.12.0 requests/2.32.3+fb3 setuptools/70.0.0 requests-toolbelt/0.9.1 tqdm/4.67.3 CPython/3.12.13+meta
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
715d1c4ec3ab5823bb6c9168a4954cb419d995d637e3e9617d9af1ff49be18b6
|
|
| MD5 |
79bd00deef8bddfc7f30eb842d0afa68
|
|
| BLAKE2b-256 |
243bbea383248304b63dac47759378e729ba51a4a1f7d5ed216503753bbf034c
|
File details
Details for the file pyre_check-0.10.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyre_check-0.10.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 24.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.12.0 requests/2.32.3+fb3 setuptools/70.0.0 requests-toolbelt/0.9.1 tqdm/4.67.3 CPython/3.12.13+meta
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e458fa2926f462971016a421a22d0ab7658222cfc5c455d39df9ddfd85f242e1
|
|
| MD5 |
bef47a29c30f4687f0e3f1cdfdb92698
|
|
| BLAKE2b-256 |
a75b7921b13e19ff33efee2853536d4dfdbb6d95ecb806e27edc7d28e5bb7570
|