forked from facebook/pyre-check
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021step 3
Description
Outdated, please read later comment.
Pysa rules, sources, sinks and other taint information are specified in taint.config files. Multiple taint.config files can be specified in one project. When Pysa is run, it looks at all the taint.config files specified in the "taint_models_path" of the .pyre_configuration file for that project, and reads the rules, source/sink names, etc. from all of these files.
The goal of this project is to have some method to validate these taint.config files. This can be in the form of a Python script that we can run standalone, or something that is run at the start of invoking the Python client.
Some validation ideas to get started (feel free to think of more!):
- Make sure there are no duplicate warning codes. All Pysa rules should have a unique warning code. When there are multiple taint.config files, it can be confusing to keep track of the codes across different files, so we want to make sure no codes are repeated.
- Make sure the source/sink names used in rules exist.
- A regex validator for implicit string sources/sinks. Pyre/Pysa is written in OCaml and the regex engine used is re2. This is a non-backtracking engine which doesn't support a lot of features in other regex flavors like lookaheads, etc. (see https://github.com/google/re2/wiki/Syntax) so we want to make sure the regexes are valid re2 syntax. In addition, we want to make sure backslashes are escaped properly in these regexes, etc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021step 3