Skip to content

Commit 4671f6e

Browse files
committed
refactor: only normalize the repo name once
1 parent c2535a1 commit 4671f6e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • internal/clients/clientimpl/localmatcher

internal/clients/clientimpl/localmatcher/zip.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ func mightAffectPackagesBytes(content []byte, names []string) bool {
173173

174174
for _, repos := range affected.Get("#.ranges.#.repo").Array() {
175175
for _, repo := range repos.Array() {
176+
repoName := vulns.NormalizeRepo(repo.String())
177+
176178
for _, name := range names {
177179
// "name" will be the git repository in the case of the GIT ecosystem
178-
if vulns.NormalizeRepo(repo.String()) == vulns.NormalizeRepo(name) {
180+
if repoName == vulns.NormalizeRepo(name) {
179181
return true
180182
}
181183
}

0 commit comments

Comments
 (0)