[BE] Add limit to number of dependency paths fetched on vulnerability details page
Follow up for - !183487 (comment 2386006668)
While fetching dependency paths (on vulnerability details page) for a vulnerability mapped to a component, we noticed that a vulnerability can be present in many components (for example multiple versions of an NPM package, or a mono repo containing the same vulnerable package in multiple places). Since we start from a vulnerability and get all its occurrences and from them the dependency paths, there is a chance that there can be way too many components related to vulnerability, which becomes a performance issue. So the plan for now is to limit the number of occurrences we fetch the paths for.
Things to figure out -
- Limit - something like 20 maybe?
- How do we inform the user that the result set is incomplete? - UX
Edited by Rushik Subba