Skip to content

Commit e891d00

Browse files
authored
fix(vulnfeeds): Cache patch (#4876)
Sometimes vendor product combinations in the VPRepoCache are given "successful" repos in its cache that are unrelated to the project. I believe this is to do with how larger projects that are affected by the vuln (like Debian/RH etc) are also added to the record. With the cache, if a record earlier on resolves a repo, but saves it to a Vendor Product that is unrelated, this might cause a bad cache entry. This unfortunately might slow things down but its better than bad misses.
1 parent cbe20a4 commit e891d00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vulnfeeds/cves/versions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ func ReposFromReferences(cache *VPRepoCache, vp *VendorProduct, refs []models.Re
11331133
continue
11341134
}
11351135
repos = append(repos, repo)
1136-
cache.MaybeUpdate(vp, repo)
1136+
// cache.MaybeUpdate(vp, repo) // TODO: fix this so that only relevant repos to the project are added to cache
11371137
}
11381138
if len(repos) == 0 {
11391139
return repos

0 commit comments

Comments
 (0)