vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.54k stars 659 forks source link

Document Taint Flow Graph #7544

Open ohader opened 2 years ago

ohader commented 2 years ago

\Psalm\Internal\Codebase\TaintFlowGraph is somehow a mystery, however the central place for handling the taint-analysis mode. This issue collections the requirements/ideas for a potential documentation section on the taint graph:

All bellow is in the scope of Taint Graph - related documentation aspects can point to this reference.

Basics

Examples

Outline (current) Limitations

orklah commented 2 years ago

Feel free to ping me if you have questions. I'm certainly not an expert, but I had to bang my head against this once or twice already 😄

ohader commented 2 years ago

Feel free to ping me if you have questions. I'm certainly not an expert, but I had to bang my head against this once or twice already 😄

I tried to work around things with https://github.com/vimeo/psalm/pull/7468/commits/d48e58b061350878d9e3f8b77017dd1e88c080aa#diff-b59f43c20840fd89dc15850c51111379c9ce4aec5cdaff391c68c6ea0972ffabR45-R63 - however I'm not sure whether that's the correct way.

So that's why I'd like to

AndrolGenhald commented 2 years ago

It'll be great to have this better documented and tested, I'm always worried I'll break something and not notice when I touch anything taint related since it's not thoroughly tested.