Skip to content

Commit

Permalink
Don't include nested vendored libs in determineversions query.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverchang committed Nov 8, 2023
1 parent 8fef787 commit 826a3a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/osvscanner/osvscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ func queryDetermineVersions(repoDir string) (*osv.DetermineVersionResponse, erro
// results with our regular git commit scanning.
return filepath.SkipDir
}
if _, ok := vendoredLibNames[strings.ToLower(info.Name())]; ok {
// Ignore nested vendored libraries, as they can cause bad matches.
return filepath.SkipDir
}

return nil
}
Expand Down

0 comments on commit 826a3a7

Please sign in to comment.