Skip to content

Commit

Permalink
Add documentation for analysis mode @AnalyzeAllOverrides
Browse files Browse the repository at this point in the history
Reviewed By: alexkassil

Differential Revision: D50422587

fbshipit-source-id: a4f4a093a6ef6034ba3b24ee13c00b13f9a773f7
  • Loading branch information
Tianhan Lu authored and facebook-github-bot committed Oct 19, 2023
1 parent 4dfed67 commit ff7e5a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions documentation/website/docs/pysa_advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,16 @@ By default, Pysa skips overrides on some functions that are typically
problematic. You can find the full list of default-skipped functions in
[`stubs/taint/skipped_overrides.pysa`](https://github.com/facebook/pyre-check/blob/main/stubs/taint/skipped_overrides.pysa)

## Force to analyze all overrides

We also allow the use of decorator `@AnalyzeAllOverrides` to force analyzing all overriding methods of a given method, regardless of the configured maximum number of overrides to analyze (e.g., via command line option `--maximum-overrides-to-analyze`), or if there simultaneously exists an `@SkipOverrides` on the given method. An example is:
```python
@AnalyzeAllOverrides
def BaseClass.method(self): ...
```

Decorator `@AnalyzeAllOverrides` is often used to reduce false negatives, by analyzing all overrides of some selected methods. This offers a more fine-grained option than tweaking `--maximum-overrides-to-analyze` for all methods. Adding decorator `@AnalyzeAllOverrides` to some selected methods is faster than using a large threshold of maximum overrides for all methods, but achieves better precision than using a small threshold.

## Limit the trace length for better signal and performance

By default, Pysa will find all flows from sources to sinks matching a rule.
Expand Down

0 comments on commit ff7e5a3

Please sign in to comment.