Security-focused Python Static Analyzer
26
stars
18,850
commits
OCaml
primary language
Sep 11, 2026
updated
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.
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.
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.
See CONTRIBUTING.md for how to help out.
Pysa is licensed under the MIT license.
(top 30 of 188)
OCaml
66.1%
Python
29.1%
C
4.2%
Security-focused Python Static Analyzer
26
stars
18,850
commits
OCaml
primary language
Sep 11, 2026
updated
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.
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.
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.
See CONTRIBUTING.md for how to help out.
Pysa is licensed under the MIT license.
(top 30 of 188)
OCaml
66.1%
Python
29.1%
C
4.2%