facebook / pyre-check

Performant type-checking for python.

Home Page:https://pyre-check.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to taint specific values of parameters?

FreddieMercuryyy opened this issue · comments

Looking through the documentation I wasn’t able to find anything that suggests it’s possible to taint a specific value of a parameter, as an example if a method has a parameter key_length and in an application it’s set to 10 however it can only be 9 or lower, is there a way to do this using Pysa?

Hi @FreddieMercuryyy,

There is no current way to conditionally taint a value based on the value of a parameter at a call site.
One workaround would be use a ViaValue feature: https://pyre-check.org/docs/pysa-features/#via-value-feature-using-viavalueof
This way, you would get a breadcrumb via-value:x on the issue. You can then filter out issues in the UI depending on that breadcrumb.

Thanks for the suggestion! @arthaud