shivasurya / code-pathfinder

Code Pathfinder, the open-source alternative to CodeQL. Designed for precise flow analysis and advanced structural search, it identifies vulnerabilities in source code.
https://codepathfinder.dev/
GNU Affero General Public License v3.0
32 stars 6 forks source link

Pathfinder variable analysis: support `access` routine #23

Closed shivasurya closed 3 months ago

shivasurya commented 4 months ago

Access method accepts entity variable, method, class and additionally accepts scope and check if they're actually present in the code. It means if their presence occurs, it means it's actively being used.

  1. for variables, ensure LHS or RHS contains the variable in scope local, global
  2. for method, ensure method invocation occurs globally
  3. for class, ensure class declaration occurs globally through import / class name globally