You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(local): only load advisories that are about the packages being scanned (#2241)
This updates the local matcher to have it skip advisories that don't
have at least one affected entry with a package name matching one of the
packages being scanned in the current run, which can greatly reduce the
peak memory usage for databases like Ubuntu (going from something like
10gb down to 1gb).
Since we cache databases based on their ecosystem only, this does mean
subsequent calls to `LocalMatcher#MatchVulnerabilities` will not give
any results for packages that were not present in the first call - while
this shouldn't be a problem currently since we handle creating the
`VulnerabilityMatcher` as part of scanning, I've added a basic guard
that returns an error if the function is called with any "partial"
database cached to catch this (be it on purpose or because of a bug)
This should not impact guided remediation since it explicitly loads the
database before doing any work meaning this change won't help it but
should also not hurt it
Resolves#2217 (again)
0 commit comments