Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more identifiers that are declared outside scope to parser output #519

Open
maxfisher-g opened this issue Dec 12, 2022 · 0 comments
Open
Assignees
Labels
enhancement New feature or request static analysis

Comments

@maxfisher-g
Copy link
Contributor

Currently, the parser tries to filter out identifier references and only report declarations. In particular, identifiers are parsed from variable, function, method and class declarations (and more), and this is good because it captures names that originate from the package.

On the other hand, names of variables that are simply written to or read from are ignored, and calls to functions or methods are ignored since they must have been defined elsewhere. The downside of this is that there might be telltale ('suspicious') function calls which are often associated with obfuscated code, such as exec.

So it might make sense to include some level of referenced identifiers in the parser output too, with some extra metadata that can be used to distinguish between what's been declared in the file vs what was simply referenced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request static analysis
Projects
None yet
Development

No branches or pull requests

1 participant