Problem
getRepositoryName assumes the github.com/<org>/<repo>/... pattern and extracts index 2. This may breaks for other GitHub URL packages constellations.
|
// getRepositoryName gets the repository name out of the package name. |
|
// For example: "github.com/golang-jwt/jwt/v5" -> "jwt" |
|
func getRepositoryName(packageName string) *string { |
Impact
Incorrect product_name in CSAF product tree, leading to mismatched product IDs and deduplication errors
Solution
Check if there are other patterns for GitHub URL and if so, fix the method.
Problem
getRepositoryNameassumes thegithub.qkg1.top/<org>/<repo>/...pattern and extracts index 2. This may breaks for other GitHub URL packages constellations.ghsa/service/converter/producttree.go
Lines 66 to 68 in 8dfd000
Impact
Incorrect product_name in CSAF product tree, leading to mismatched product IDs and deduplication errors
Solution
Check if there are other patterns for GitHub URL and if so, fix the method.