Skip to content

Commit 5473787

Browse files
authored
refactor: cve5 conversion to be more modular and extensible per CNA (#4094)
This PR: - Moves the cve5 conversion code out of the cmd folder - creates a common.go folder for reused/common functions by the conversion - initializes a factory-based design pattern for CNA based version extraction methods - Linux has its own extractor now - downside of this is that we may have to maintain multiple versions of the extractions, but we'll mitigate this by making sure code that is doing the same thing is abstracted into its own function. - splits apart some of the version extraction patterns into their own functions.
1 parent 67d9e8a commit 5473787

File tree

13 files changed

+694
-557
lines changed

13 files changed

+694
-557
lines changed

vulnfeeds/cmd/cve-bulk-converter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"strings"
1212
"sync"
1313

14-
"github.com/google/osv/vulnfeeds/cmd/cvelist2osv"
14+
"github.com/google/osv/vulnfeeds/cvelist2osv"
1515
"github.com/google/osv/vulnfeeds/cves"
1616
"github.com/google/osv/vulnfeeds/utility/logger"
1717
)

vulnfeeds/cmd/cve-single-converter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"log/slog"
88
"os"
99

10-
"github.com/google/osv/vulnfeeds/cmd/cvelist2osv"
10+
"github.com/google/osv/vulnfeeds/cvelist2osv"
1111
"github.com/google/osv/vulnfeeds/cves"
1212
"github.com/google/osv/vulnfeeds/utility/logger"
1313
)

0 commit comments

Comments
 (0)