From 8235e8e5815366ec9c1bb0abeeb5106906205217 Mon Sep 17 00:00:00 2001 From: cpendery <35637443+cpendery@users.noreply.github.com> Date: Wed, 27 Jul 2022 09:06:37 -0400 Subject: [PATCH] fix: use generic instead of not generating purl (#1119) --- syft/pkg/url.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/syft/pkg/url.go b/syft/pkg/url.go index 19fd1e9c8..35b8f9c06 100644 --- a/syft/pkg/url.go +++ b/syft/pkg/url.go @@ -41,9 +41,7 @@ func URL(p Package, release *linux.Release) string { switch { case purlType == "": - // there is no purl type, don't attempt to craft a purl - // TODO: should this be a "generic" purl type instead? - return "" + purlType = packageurl.TypeGeneric case p.Type == GoModulePkg: re := regexp.MustCompile(`(/)[^/]*$`) fields := re.Split(p.Name, -1)