jfrog / jfrog-vscode-extension

JFrog VS-Code Extension
https://jfrog.github.io/jfrog-vscode-extension
Apache License 2.0
189 stars 34 forks source link

Yarn - Fix incorrect impact graph #410

Closed Or-Geva closed 11 months ago

Or-Geva commented 11 months ago

In order to resolve this issue, this PR changes the following:

  1. Instead of constructing the entire dependency tree, we now compute only a partial tree. This partial tree specifically represents the paths from the project's root to the vulnerable dependencies only. This modification eliminates the need to calculate the entire tree, which not only reduces memory consumption but also aligns with our goal of displaying only paths to vulnerable dependencies.

  2. Rather than relying on yarn list, we have switched to using yarn why which provides the correct path to a specific dependency. This involves gathering all vulnerable dependencies and utilizing 'yarn why' to map out the path of each dependency from the root.