pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

Common taint configs and stubs?

Open 1one-w01f opened this issue 7 years ago • 6 comments

2 quick questions.

Was wondering if it would be possible to include some common taint configs and stubs in future releases, either in the default of taint/configuration.ml or as sample code in the documentation? This would make taint analysis more easily applicable to different software systems. taint/configuration.ml already contains some default rules.

Also, was wondering what do features: [] do in the taint config shown in https://pyre-check.org/docs/static-analysis.html?

1one-w01f avatar Apr 19 '19 23:04 1one-w01f

I have created a repo https://github.com/nwalsh1995/pyre-security-configs that we can contribute to in order to enumerate all of the source/sinks as possible.

I don't mind maintaining this repo, but I think it best for Facebook to be the maintainer of these checks in the pyre-check repository.

nwalsh1995 avatar Apr 21 '19 05:04 nwalsh1995

I think it is a good idea to maintain that. Let me check what we can do :)

the-storm avatar Apr 26 '19 19:04 the-storm

@fahndrich can answer the question about features :)

the-storm avatar Apr 29 '19 13:04 the-storm

I'd definitely like to see this maintained by pyre, even if on a different repository. I'm sure people would contribute sinks, sources, and sanitizers for the most popular frameworks in addition to the stdlib.

adrianbn avatar May 01 '19 18:05 adrianbn

Features are little bits of information we attach to flows that can be used to filter the resulting issues. E.g., you could write a taint-in-taint-out model for a particular function and on that annotation add a feature: TaintInTaintOut[Via[my-feature]]

Any flow that goes through that particular place will have my-feature attached. Similarly, you can attach features to source and sink specifications in .pysa files.

fahndrich avatar May 04 '19 03:05 fahndrich

Started adding some of our stubs with e4eafb8817c74c1d83db9c1609878d2460591a01. More contributions welcome. Will close this out for now.

dkgi avatar May 15 '19 05:05 dkgi