Sink analyser: Filter inaccessible callpath #1361
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following #1358 and #1359, this PR further reduce possible redundant in sink function callpath generations by an additional filtering. From #1359, base accessible information for java methods is provided from the frontend result. This PR adds a new filter to avoid generating callpaths HTML files for inaccessible callpaths, that is callpaths start with methods that are not directly callable by users. These inaccessible call paths are filtered out to reduce the number of possible call paths for each sink function discovered. This PR also change the max count for call path generation per sink functions to a configurable value in constants.py and significantly decreases the default value to 2. This could help avoid flooding a long list of possible call paths which are useless for analysis purposes.