mirror of
https://github.com/anchore/syft.git
synced 2026-11-04 00:16:38 +01:00
Internalize CPE generation logic (#2541)
* migrate CPE generation logic to internal Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove create function Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
+3
-1
@@ -8,6 +8,8 @@ import (
|
||||
"github.com/facebookincubator/nvdtools/wfn"
|
||||
)
|
||||
|
||||
const Any = ""
|
||||
|
||||
type CPE struct {
|
||||
Part string
|
||||
Vendor string
|
||||
@@ -123,7 +125,7 @@ func normalizeField(field string) string {
|
||||
|
||||
// keep dashes and forward slashes unescaped
|
||||
if field == "*" {
|
||||
return wfn.Any
|
||||
return Any
|
||||
}
|
||||
return stripSlashes(field)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user