News for hackers. Stuff that matters.
Re:Pysa: An open source tool to detect and prevent security ... by dkarp on Friday August 07, 2020 @01:58PM (#24084735)
Does Pysa require the code to be fully type hinted? or will it work on non-type hinted code also?
Re:Pysa: An open source tool to detect and prevent security ... by gbleaney on Friday August 07, 2020 @03:03PM (#24085356)
In addition to what Sinan said, we've had success running on fully untyped codebases. These are you some strategies that you can use to get results on untyped codebases: https://pyre-check.org/docs/pysa-coverage.html

Types will definitely make Pysa find more issues, but you don't need 100% coverage, or really more than the minimal coverage described in that doc I linked, to start finding some issues.

Re:Pysa: An open source tool to detect and prevent security ... by sinancepel on Friday August 07, 2020 @02:02PM (#24084777)
Pysa will try to analyze all functions regardless of whether they have type hints, but it work better if the function under consideration is typed. Namely, without type hints, it won't be able to pick up on tainted method calls or attribute accesses. However, regular function calls, etc. and standard data structures like dicts and lists should still be tracked normally.