From 1a386eae2e71daac9b9d51c463798386cd018cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Go=C3=B1i?= Date: Thu, 6 Aug 2026 12:53:01 -0300 Subject: [PATCH 1/5] feat(sqlite): support SQLite alongside PostgreSQL in the vulnerability queries The service could not run against SQLite, and the two vulnerability queries could not run against the real schema at all. Both are rewritten as portable SQL, with the version matching moved into Go, and the tests now run on the production schema so this class of breakage cannot pass CI again. Queries ------- GetVulnsByPurlName joined cpes.id and nvd_match_criteria_ids.cpe_ids, neither of which the schema defines. The real path is purl -> short_cpe_purl.cpe_id -> nvd_match_criteria_ids.short_cpe_id -> match_criteria_id -> cves.match_criteria_ids, and both variants now share one query. CAST keeps the membership test working whether match_criteria_ids is TEXT or an array, and COALESCE guards the nullable columns. GetVulnsByPurlVersion used array_agg, the && array overlap operator and natural_sort_order, a custom PostgreSQL function. Version bounds are now compared in version_range.go with Masterminds/semver, the approach FilterCpesByRequirement already takes. Besides being portable this is more correct: versions order semantically, so 9.0.0 no longer sorts after 10.0.0. An exact match on an inclusive bound still short-circuits, preserving the old behaviour for versions that are not valid semver, and an unparseable bound is skipped rather than treated as a mismatch - missing a real vulnerability is worse than reporting a borderline one. versionBounds.covers deliberately does not log: it runs per row per request, and reaching the global zlog.S made a pure comparison panic wherever the logger was not initialised, which its own unit test hit immediately. Dates ----- utils.OnlyDate now implements sql.Scanner and driver.Valuer, accepting a string from a TEXT column and a time.Time from a PostgreSQL date. Without it, every query selecting cves.published failed on SQLite. Tests ----- Fixtures used to ship their own CREATE TABLE statements describing tables that do not exist - DATETIME dates, an integer[] cpe_ids array, surrogate id columns with AUTOINCREMENT. Queries were verified against invented tables, so the suite passed while the main query referenced columns the schema never had. - the schema now comes from testSchemaDDL in pkg/models/test_schema.go; fixtures carry data only, with all 960 inserts converted to the real column sets - added vulns_scenario.sql, a deterministic component whose match criteria cover each version-bound combination. The old fixtures could not exercise this path at all: every ndv_match_criteria_ids row has short_cpe_id = null, because the previous query joined through the non-existent cpe_ids column - dropped cpe_cve.sql, a table no query uses and the schema does not define - unified the test driver on modernc.org/sqlite, the one production uses. go-sqlite3 needed CGO and converted dates by decltype, which is precisely what hid the OnlyDate defect; it is no longer a direct dependency - tests now assert on results, not just on the absence of an error, at model and use case level Write paths ----------- saveLicense inserted is_sanitized, not a column in licenses, and saveVersion passed four arguments to a two-placeholder insert. Neither has a caller and the schema generates no ids, so rows go in without one; COALESCE(id, 0) keeps reads working without changing the public struct types. Notes ----- epss_data is included in the schema constant. While it was absent, enrichWithEPSS failed on every request and each vulnerability came back with epss.probability and epss.percentile reading 0, indistinguishable from a genuine zero. The schema constant is a transcription and can drift from the real database; the header of test_schema.go records the sqlite3 .schema command to diff against a live one. Two things found but deliberately left alone, both predating this work: - vulnerabilityWorker logs a query error and emits the component with no vulnerabilities, so the service answers Success with zero CVEs on failure - EXPLAIN QUERY PLAN shows cves scanned in full on every lookup, since matching a criterion inside a delimited list needs a leading-wildcard LIKE. Worth measuring against the production dataset; the structural fix is a cve to match_criteria_id bridge table Co-Authored-By: Claude Opus 5 (1M context) --- go.mod | 2 +- pkg/adapters/vulnerability_support_test.go | 2 +- pkg/models/common.go | 83 ++- pkg/models/common_test.go | 6 +- pkg/models/cpe_purl_test.go | 6 +- pkg/models/epss_test.go | 38 +- pkg/models/licenses.go | 10 +- pkg/models/licenses_test.go | 8 +- pkg/models/mines_test.go | 10 +- pkg/models/projects_test.go | 6 +- pkg/models/test_schema.go | 86 +++ pkg/models/tests/all_urls.sql | 45 +- pkg/models/tests/bad_sql.sql | 2 +- pkg/models/tests/cpe.sql | 773 ++++++++++---------- pkg/models/tests/cpe_cve.sql | 362 --------- pkg/models/tests/cve.sql | 70 +- pkg/models/tests/epss.sql | 10 +- pkg/models/tests/golang_projects.sql | 30 +- pkg/models/tests/licenses.sql | 33 +- pkg/models/tests/mines.sql | 10 +- pkg/models/tests/ndv_match_criteria_ids.sql | 36 +- pkg/models/tests/projects.sql | 84 +-- pkg/models/tests/purl.sql | 110 ++- pkg/models/tests/short_cpe.sql | 54 +- pkg/models/tests/short_cpe_purl.sql | 112 ++- pkg/models/tests/versions.sql | 637 ++++++++-------- pkg/models/tests/vulns_scenario.sql | 54 ++ pkg/models/version_range.go | 93 +++ pkg/models/version_range_test.go | 137 ++++ pkg/models/versions.go | 11 +- pkg/models/versions_test.go | 6 +- pkg/models/vulns_purl.go | 143 ++-- pkg/models/vulns_purl_scenario_test.go | 226 ++++++ pkg/models/vulns_purl_test.go | 12 +- pkg/service/vulnerability_service_test.go | 20 +- pkg/usecase/cpe_test.go | 4 +- pkg/usecase/local_use_case_scenario_test.go | 156 ++++ pkg/usecase/local_use_case_test.go | 4 +- pkg/usecase/vulnerability_use_case_test.go | 4 +- pkg/utils/only_date.go | 60 ++ pkg/utils/only_date_db_test.go | 61 ++ 41 files changed, 2041 insertions(+), 1575 deletions(-) create mode 100644 pkg/models/test_schema.go delete mode 100644 pkg/models/tests/cpe_cve.sql create mode 100644 pkg/models/tests/vulns_scenario.sql create mode 100644 pkg/models/version_range.go create mode 100644 pkg/models/version_range_test.go create mode 100644 pkg/models/vulns_purl_scenario_test.go create mode 100644 pkg/usecase/local_use_case_scenario_test.go create mode 100644 pkg/utils/only_date_db_test.go diff --git a/go.mod b/go.mod index 9253cfe..4872ca5 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.12.3 - github.com/mattn/go-sqlite3 v1.14.42 github.com/package-url/packageurl-go v0.1.5 github.com/pandatix/go-cvss v0.6.2 github.com/scanoss/go-component-helper v0.6.0 @@ -35,6 +34,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-sqlite3 v1.14.42 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect github.com/phuslu/iploc v1.0.20230201 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect diff --git a/pkg/adapters/vulnerability_support_test.go b/pkg/adapters/vulnerability_support_test.go index 40d6789..eee462f 100644 --- a/pkg/adapters/vulnerability_support_test.go +++ b/pkg/adapters/vulnerability_support_test.go @@ -22,9 +22,9 @@ import ( common "github.com/scanoss/papi/api/commonv2" - _ "github.com/mattn/go-sqlite3" pb "github.com/scanoss/papi/api/vulnerabilitiesv2" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" "scanoss.com/vulnerabilities/pkg/dtos" ) diff --git a/pkg/models/common.go b/pkg/models/common.go index 345d6d4..534b1f0 100644 --- a/pkg/models/common.go +++ b/pkg/models/common.go @@ -22,6 +22,7 @@ import ( "context" "fmt" "os" + "strings" "github.com/jmoiron/sqlx" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" @@ -34,32 +35,78 @@ func loadSQLData(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, filename str if err != nil { return err } + return execSQL(db, ctx, conn, string(file)) +} + +// execSQL runs the given SQL against either the supplied connection or the DB pool. +func execSQL(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, sql string) error { + var err error if conn != nil { - _, err = conn.ExecContext(ctx, string(file)) + _, err = conn.ExecContext(ctx, sql) } else { - _, err = db.Exec(string(file)) + _, err = db.Exec(sql) } - if err != nil { - return err + return err +} + +// idempotentDDL rewrites CREATE TABLE/INDEX into their IF NOT EXISTS form so a test +// can load the schema more than once. testSchemaDDL transcribes production and must not +// carry test-only clauses, so the rewrite happens here instead of in the constant. +func idempotentDDL(sql string) string { + for _, kind := range []string{"TABLE", "INDEX"} { + bare := "CREATE " + kind + " " + guarded := bare + "IF NOT EXISTS " + // Normalise first, so an already-guarded statement is not double-guarded. + sql = strings.ReplaceAll(sql, guarded, bare) + sql = strings.ReplaceAll(sql, bare, guarded) + } + return sql +} + +// testDataFiles are the data fixtures loaded on top of the schema. They carry data +// only; the tables come from testSchemaDDL in test_schema.go. Paths are relative to a +// package directory under pkg/. +var testDataFiles = []string{ + "../models/tests/cpe.sql", + "../models/tests/cve.sql", + "../models/tests/purl.sql", + "../models/tests/short_cpe_purl.sql", + "../models/tests/short_cpe.sql", + "../models/tests/versions.sql", + "../models/tests/ndv_match_criteria_ids.sql", + "../models/tests/all_urls.sql", + "../models/tests/mines.sql", + "../models/tests/licenses.sql", + "../models/tests/golang_projects.sql", + "../models/tests/projects.sql", + "../models/tests/epss.sql", + "../models/tests/vulns_scenario.sql", +} + +// LoadTestSchema creates the production schema in the supplied DB. Call this before +// loading any data fixture, since the fixtures do not define their own tables. +// It is safe to call more than once on the same DB. +func LoadTestSchema(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn) error { + if err := execSQL(db, ctx, conn, idempotentDDL(testSchemaDDL)); err != nil { + return fmt.Errorf("failed to load the test schema: %v", err) } return nil } -// LoadTestSQLData loads all the required test SQL files. +// LoadTestSQLData loads the production schema plus all the test data fixtures. func LoadTestSQLData(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn) error { - files := []string{ - "../models/tests/cpe.sql", - "../models/tests/cpe_cve.sql", - "../models/tests/cve.sql", - "../models/tests/purl.sql", - "../models/tests/short_cpe_purl.sql", - "../models/tests/short_cpe.sql", - "../models/tests/versions.sql", - "../models/tests/ndv_match_criteria_ids.sql", - "../models/tests/all_urls.sql", - "../models/tests/mines.sql", - "../models/tests/licenses.sql", - "../models/tests/golang_projects.sql", + if err := LoadTestSchema(db, ctx, conn); err != nil { + return err + } + return loadTestSQLDataFiles(db, ctx, conn, testDataFiles) +} + +// loadTestSQLDataFilesWithSchema loads the production schema followed by the given +// data fixtures. Use this instead of loadTestSQLDataFiles when a test only needs a +// subset of the fixtures, since the fixtures no longer create their own tables. +func loadTestSQLDataFilesWithSchema(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, files []string) error { + if err := LoadTestSchema(db, ctx, conn); err != nil { + return err } return loadTestSQLDataFiles(db, ctx, conn, files) } diff --git a/pkg/models/common_test.go b/pkg/models/common_test.go index 5ccceb3..a0c4240 100644 --- a/pkg/models/common_test.go +++ b/pkg/models/common_test.go @@ -22,7 +22,7 @@ import ( zlog "github.com/scanoss/zap-logging-helper/pkg/logger" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" + _ "modernc.org/sqlite" ) func TestDbLoad(t *testing.T) { @@ -32,12 +32,12 @@ func TestDbLoad(t *testing.T) { t.Fatal(err) } - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseDB(db) - err = loadSQLData(db, nil, nil, "./tests/mines.sql") + err = loadTestSQLDataFilesWithSchema(db, nil, nil, []string{"./tests/mines.sql"}) if err != nil { t.Errorf("failed to load SQL test data: %v", err) } diff --git a/pkg/models/cpe_purl_test.go b/pkg/models/cpe_purl_test.go index e35c89e..4e2c0e3 100644 --- a/pkg/models/cpe_purl_test.go +++ b/pkg/models/cpe_purl_test.go @@ -50,7 +50,7 @@ func setupTest(t *testing.T) (*sqlx.Conn, *CpePurlModel) { } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -160,7 +160,7 @@ func TestGetCpesByPurlString(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -235,7 +235,7 @@ func TestGetCpesByPurlStringVersion(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/models/epss_test.go b/pkg/models/epss_test.go index 84bc010..0cb2500 100644 --- a/pkg/models/epss_test.go +++ b/pkg/models/epss_test.go @@ -28,7 +28,7 @@ import ( zlog "github.com/scanoss/zap-logging-helper/pkg/logger" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" + _ "modernc.org/sqlite" ) func TestGetEPSSByCVEs(t *testing.T) { @@ -41,13 +41,13 @@ func TestGetEPSSByCVEs(t *testing.T) { s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseDB(db) - err = loadSQLData(db, nil, nil, "./tests/epss.sql") + err = loadTestSQLDataFilesWithSchema(db, nil, nil, []string{"./tests/epss.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -68,6 +68,26 @@ func TestGetEPSSByCVEs(t *testing.T) { if len(results) != 3 { t.Errorf("GetEPSSByCVEs() expected 3 results, got %d", len(results)) } + // The scores must survive the scan, not just the row count. epss_data columns are + // TEXT like the rest of the schema, so this covers the TEXT to float32 conversion. + want := map[string][2]float32{ + "CVE-2017-9302": {0.00143, 0.5124}, + "CVE-2015-0269": {0.00285, 0.6832}, + "CVE-2018-10083": {0.00891, 0.8215}, + } + for _, got := range results { + exp, ok := want[got.Cve] + if !ok { + t.Errorf("GetEPSSByCVEs() returned unexpected CVE %v", got.Cve) + continue + } + if got.Epss != exp[0] { + t.Errorf("GetEPSSByCVEs() %v epss = %v, want %v", got.Cve, got.Epss, exp[0]) + } + if got.Percentile != exp[1] { + t.Errorf("GetEPSSByCVEs() %v percentile = %v, want %v", got.Cve, got.Percentile, exp[1]) + } + } } func TestGetEPSSByCVEsEmpty(t *testing.T) { @@ -79,7 +99,7 @@ func TestGetEPSSByCVEsEmpty(t *testing.T) { defer zlog.SyncZap() s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -90,7 +110,7 @@ func TestGetEPSSByCVEsEmpty(t *testing.T) { t.Fatalf("failed to load Config: %v", err) } - err = loadSQLData(db, nil, nil, "./tests/epss.sql") + err = loadTestSQLDataFilesWithSchema(db, nil, nil, []string{"./tests/epss.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -116,7 +136,7 @@ func TestGetEPSSByCVEsNotFound(t *testing.T) { defer zlog.SyncZap() s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -127,7 +147,7 @@ func TestGetEPSSByCVEsNotFound(t *testing.T) { t.Fatalf("failed to load Config: %v", err) } - err = loadSQLData(db, nil, nil, "./tests/epss.sql") + err = loadTestSQLDataFilesWithSchema(db, nil, nil, []string{"./tests/epss.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -154,7 +174,7 @@ func TestGetEPSSByCVEsSingleCVE(t *testing.T) { defer zlog.SyncZap() s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -165,7 +185,7 @@ func TestGetEPSSByCVEsSingleCVE(t *testing.T) { t.Fatalf("failed to load Config: %v", err) } - err = loadSQLData(db, nil, nil, "./tests/epss.sql") + err = loadTestSQLDataFilesWithSchema(db, nil, nil, []string{"./tests/epss.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } diff --git a/pkg/models/licenses.go b/pkg/models/licenses.go index 17d07d7..04ec705 100644 --- a/pkg/models/licenses.go +++ b/pkg/models/licenses.go @@ -61,7 +61,7 @@ func (m *LicenseModel) GetLicenseByID(id int32) (License, error) { } var license License err := m.conn.GetContext(m.ctx, &license, - "SELECT id, license_name, spdx_id, is_spdx FROM licenses"+ + "SELECT COALESCE(id, 0) AS id, license_name, spdx_id, is_spdx FROM licenses"+ " WHERE id = $1", id) if err != nil { @@ -80,7 +80,7 @@ func (m *LicenseModel) GetLicenseByName(name string, create bool) (License, erro var license License m.s.Infof("CONNECTION GetLicenseByName %+v", m.conn) err := m.conn.GetContext(m.ctx, &license, - "SELECT id, license_name, spdx_id, is_spdx FROM licenses"+ + "SELECT COALESCE(id, 0) AS id, license_name, spdx_id, is_spdx FROM licenses"+ " WHERE license_name = $1", name) if create && len(license.LicenseName) == 0 { // No license found and requested to create an entry @@ -101,9 +101,11 @@ func (m *LicenseModel) saveLicense(name string) (License, error) { } m.s.Debugf("Attempting to save '%v' to the licenses table...", name) // TODO should we populate the spdx_id before inserting the license? + // is_sanitized is not a column in the licenses table, and the row goes in without an + // id since the schema generates none. No caller reaches this path today. _, err := m.conn.ExecContext(m.ctx, - "INSERT INTO licenses (license_name, spdx_id, is_spdx, is_sanitized) VALUES($1, $2, $3, $4)", - name, "", false, false, + "INSERT INTO licenses (license_name, spdx_id, is_spdx) VALUES($1, $2, $3)", + name, "", false, ) if err != nil { m.s.Warnf("Failed to insert new license name into licenses table for %v: %v", name, err) diff --git a/pkg/models/licenses_test.go b/pkg/models/licenses_test.go index f70f925..ce06a00 100644 --- a/pkg/models/licenses_test.go +++ b/pkg/models/licenses_test.go @@ -33,7 +33,7 @@ func TestLicensesSearch(t *testing.T) { if err != nil { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -44,7 +44,7 @@ func TestLicensesSearch(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseConn(conn) - err = loadTestSQLDataFiles(db, ctx, conn, []string{"../models/tests/licenses.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, conn, []string{"../models/tests/licenses.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -120,7 +120,7 @@ func TestLicensesSearchId(t *testing.T) { if err != nil { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -131,7 +131,7 @@ func TestLicensesSearchId(t *testing.T) { defer CloseConn(conn) defer CloseDB(db) defer zlog.SyncZap() - err = loadTestSQLDataFiles(db, ctx, conn, []string{"../models/tests/licenses.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, conn, []string{"../models/tests/licenses.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } diff --git a/pkg/models/mines_test.go b/pkg/models/mines_test.go index 45caec3..1b6ce90 100644 --- a/pkg/models/mines_test.go +++ b/pkg/models/mines_test.go @@ -25,7 +25,7 @@ import ( "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" + _ "modernc.org/sqlite" ) const NonexistentPurl = "NONEXISTENT" @@ -37,7 +37,7 @@ func TestMines(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -47,7 +47,7 @@ func TestMines(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseConn(conn) - err = loadTestSQLDataFiles(db, ctx, conn, []string{"../models/tests/mines.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, conn, []string{"../models/tests/mines.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -97,7 +97,7 @@ func TestMinesBadSql(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -107,7 +107,7 @@ func TestMinesBadSql(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseConn(conn) - err = loadTestSQLDataFiles(db, ctx, conn, []string{"../models/tests/mines.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, conn, []string{"../models/tests/mines.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } diff --git a/pkg/models/projects_test.go b/pkg/models/projects_test.go index 403a754..e982eef 100644 --- a/pkg/models/projects_test.go +++ b/pkg/models/projects_test.go @@ -34,7 +34,7 @@ func TestProjectsSearch(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -44,7 +44,7 @@ func TestProjectsSearch(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseConn(conn) - err = loadTestSQLDataFiles(db, ctx, conn, []string{"../models/tests/projects.sql", "../models/tests/mines.sql", "../models/tests/licenses.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, conn, []string{"../models/tests/projects.sql", "../models/tests/mines.sql", "../models/tests/licenses.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -119,7 +119,7 @@ func TestProjectsSearchBadSql(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/models/test_schema.go b/pkg/models/test_schema.go new file mode 100644 index 0000000..44075ca --- /dev/null +++ b/pkg/models/test_schema.go @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// The production schema, used to build the database the tests run against. +// +// Tests deliberately run on this schema rather than on per-fixture CREATE TABLE +// statements. The fixtures used to carry their own, describing tables that do not +// exist - DATETIME dates, an integer[] cpe_ids array, surrogate id columns - and that +// is what let queries referencing non-existent columns pass CI. Fixtures under tests/ +// now carry data only. +// +// Keep this in step with the real database. It is a transcription, so it can drift; +// when a query fails in production but passes here, suspect this file first. Dump the +// live schema with `sqlite3 .schema` to compare. + +package models + +// testSchemaDDL is the schema every DB-backed test is built from. +const testSchemaDDL = ` +CREATE TABLE db_version ( + package_name TEXT NOT NULL, + schema_version TEXT NOT NULL, + created_at TEXT NOT NULL, + db_release TEXT NOT NULL + ); +CREATE TABLE all_urls (package_hash TEXT, component TEXT, purl_name TEXT, mine_id TEXT, vendor TEXT, version TEXT, version_id TEXT, date TEXT, license_id TEXT, is_mined TEXT, indexed_date TEXT, version_status TEXT, version_status_change_date TEXT, total_files TEXT, indexed_files TEXT, source_files TEXT, ignored_files TEXT, package_size TEXT); +CREATE INDEX idx_allurls_name ON all_urls (purl_name, mine_id, license_id, version_id); +CREATE INDEX idx_allurls_comp ON all_urls (component, vendor, mine_id); +CREATE INDEX idx_allurls_phash ON all_urls (purl_name, package_hash, mine_id, version_id); +CREATE TABLE golang_projects (mine_id TEXT, purl_name TEXT, component TEXT, license_id TEXT, version_id TEXT, version_date TEXT, is_indexed TEXT); +CREATE INDEX idx_golang_projects_purl_name_is_indexed_license_id_version_id ON golang_projects (purl_name, is_indexed, license_id, version_id); +CREATE TABLE licenses (id TEXT, license_name TEXT, spdx_id TEXT, is_spdx TEXT); +CREATE INDEX idx_license_id_license_name_spdx_id_is_spdx ON licenses (id, license_name, spdx_id, is_spdx); +CREATE TABLE mines (id TEXT, purl_type TEXT, mine_name TEXT, can_download TEXT, repository_url TEXT); +CREATE INDEX idx_mines_purl_type ON mines (purl_type, id); +CREATE TABLE projects (mine_id TEXT, purl_name TEXT, vendor TEXT, component TEXT, versions TEXT, license_id TEXT, git_license_id TEXT, first_version_date TEXT, git_created_at TEXT, git_forks TEXT, git_stars TEXT, first_indexed_date TEXT, last_indexed_date TEXT, status TEXT, status_change_date TEXT, source_mine_id TEXT, source_purl_name TEXT); +CREATE INDEX idx_projects ON projects (purl_name, mine_id, license_id, git_license_id); +CREATE TABLE versions (id TEXT, version_name TEXT, semver TEXT); +CREATE INDEX idx_versions_version_name_id_semver ON versions (version_name, id, semver); +CREATE INDEX idx_versions_id_version_name_semver ON versions (id, version_name, semver); +CREATE TABLE countries (id TEXT, country_name TEXT); +CREATE INDEX idx_countries_id ON countries (id); +CREATE TABLE vendors (id TEXT, username TEXT, type TEXT, mine_id TEXT); +CREATE INDEX idx_vendors_username_type_mine_id ON vendors (username, type, mine_id); +CREATE TABLE github_contributors (purl_name TEXT, contributor TEXT); +CREATE INDEX idx_github_contributors_purl_name ON github_contributors (purl_name); +CREATE INDEX idx_github_contributors_contributor ON github_contributors (contributor); +CREATE TABLE vendor_locations (vendor_id TEXT, declared_location TEXT, curated_countries_ids TEXT); +CREATE INDEX idx_vendor_locations_vendor_id ON vendor_locations (vendor_id); +CREATE INDEX idx_vendor_locations_declared_location ON vendor_locations (declared_location); +CREATE TABLE cpes (cpe TEXT, version_id TEXT, short_cpe_id TEXT); +CREATE TABLE short_cpe_purl (cpe_id TEXT, purl_id TEXT, purl TEXT); +CREATE INDEX short_cpe_purl_purl ON short_cpe_purl (purl); +CREATE TABLE nvd_match_criteria_ids (match_criteria_id TEXT, short_cpe_id TEXT, version_start_including TEXT, version_start_excluding TEXT, version_end_including TEXT, version_end_excluding TEXT); +CREATE TABLE short_cpes (id TEXT); +CREATE TABLE cves (cve TEXT, severity TEXT, published TEXT, modified TEXT, summary TEXT, match_criteria_ids TEXT); +CREATE INDEX idx_cves_match_criteria_ids ON cves (match_criteria_ids); +CREATE TABLE purls (purl TEXT, id TEXT); +CREATE INDEX idx_purls_purl ON purls (purl); +CREATE TABLE composer_dependencies (purl_name TEXT, version TEXT, dep_data TEXT); +CREATE INDEX idx_composer_dependencies_purl_name_version ON composer_dependencies (purl_name, version); +CREATE TABLE crates_dependencies (purl_name TEXT, version TEXT, dep_data TEXT); +CREATE INDEX idx_crates_dependencies_purl_name_version ON crates_dependencies (purl_name, version); +CREATE TABLE maven_dependencies (purl_name TEXT, version TEXT, dep_data TEXT); +CREATE INDEX idx_maven_dependencies_purl_name_version ON maven_dependencies (purl_name, version); +CREATE TABLE npmjs_dependencies (purl_name TEXT, version TEXT, dep_data TEXT); +CREATE INDEX idx_npmjs_dependencies_purl_name_version ON npmjs_dependencies (purl_name, version); +CREATE TABLE ruby_dependencies (purl_name TEXT, version TEXT, dep_data TEXT); +CREATE INDEX idx_ruby_dependencies_purl_name_version ON ruby_dependencies (purl_name, version); +CREATE TABLE epss_data (cve TEXT, epss TEXT, percentile TEXT); +CREATE INDEX idx_epss_data_cve ON epss_data (cve); +CREATE INDEX idx_nmci_short_cpe_id ON nvd_match_criteria_ids (short_cpe_id); +` diff --git a/pkg/models/tests/all_urls.sql b/pkg/models/tests/all_urls.sql index 16e72db..b4629c8 100644 --- a/pkg/models/tests/all_urls.sql +++ b/pkg/models/tests/all_urls.sql @@ -1,32 +1,13 @@ -DROP TABLE IF EXISTS all_urls; -CREATE TABLE all_urls -( - package_hash text not null, - vendor text, - component text, - version text, - date text, - url text not null, - url_hash text not null, - mine_id integer, - license text, - version_id integer, - license_id integer, - purl_name text, - primary key (package_hash, url, url_hash) -); - -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('7b1cbed0ad866bd4ece1fc3719fb0c5d', 'goffice', 'goffice', '0.10.52-4', '2022-08-04', 'https://snapshot.debian.org/archive/debian-ports/20220804T151036Z/pool-powerpc/main/g/goffice/libgoffice-0.10-10-dbgsym_0.10.52-4_powerpc.deb', '3a56b97b0b9672a8b2482d028d3ef488', 10, 'GPL-2 or GPL-3', 'debian/goffice', 19836180, 15); - -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('b757a992ada86f72942aa7fc153a992f', 'scanoss', 'dependencies', 'v0.0.1', '2021-12-10', 'https://github.com/scanoss/dependencies/archive/v0.0.1.zip', 'd8fd0cd2822034a356c0e05a1c9c372d', 5, 'MIT', 'scanoss/dependencies',19541010,5614); - -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('4d66775f503b1e76582e7e5b2ea54d92', 'taballa.hp-PD', 'tablestyle', '0.0.10', '2013-08-26', 'https://rubygems.org/downloads/tablestyle-0.0.10.gem', '5a088240b44efa142be4b3c40f8ae9c1', 1, 'MIT', 'tablestyle', 19541011, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('bfada11fd2b2b8fa23943b8b6fe5cb3f', 'taballa.hp-PD', 'tablestyle', '0.0.12', '2013-08-26', 'https://rubygems.org/downloads/tablestyle-0.0.12.gem', '686dc352775b58652c9d9ddb2117f402', 1, 'MIT', 'tablestyle', 258510, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('f586d603a9cb2460c4517cffad6ad5e4', 'taballa.hp-PD', 'tablestyle', '0.0.7', null, 'https://rubygems.org/downloads/tablestyle-0.0.7.gem', '2a3251711e7010ca15d232ec4ec4fb16', 1, 'MIT', 'tablestyle', 14797, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('b1cd1444c2f76e7564f57b0e047994a4', 'taballa.hp-PD', 'tablestyle', '0.0.4', '2013-07-08', 'https://rubygems.org/downloads/tablestyle-0.0.4.gem', 'b494b3e367d26b6ab2785ad3aee8afb7', 1, 'MIT', 'tablestyle', 252547, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('952edab5837f5f0e59638dd791187725', 'taballa.hp-PD', 'tablestyle', '0.0.11', '2013-08-26', 'https://rubygems.org/downloads/tablestyle-0.0.11.gem', '59fc4cf45a7d1425303a5bb897a463f4', 1, 'MIT', 'tablestyle', 11435747, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('85ace696e6aec401c611eac8da439d75', 'taballa.hp-PD', 'tablestyle', '0.0.5', '2013-07-08', 'https://rubygems.org/downloads/tablestyle-0.0.5.gem', '2e60ef936150975ca2071cc8782c062a', 1, 'MIT', 'tablestyle', 14796, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('4986c6fed8d0b30daa9caaa0e94101ff', 'taballa.hp-PD', 'tablestyle', '0.0.9', '2013-08-26', 'https://rubygems.org/downloads/tablestyle-0.0.9.gem', 'bd2af9a9445fdd5bfe1ab28dd26f9c42', 1, 'MIT', 'tablestyle', 14302, 5614); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('33523708f7fbef1c554d340a5cfd42aa', 'taballa.hp-PD', 'tablestyle', '0.0.8', '2013-08-26', 'https://rubygems.org/downloads/tablestyle-0.0.8.gem', '5e2c89ddef74a0873169f2e13f5efba6', 1, 'MIT', 'tablestyle', 264714, 9999); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('7282b2348ff82296a9f84d399fd2799d', 'taballa.hp-PD', 'tablestyle', '0.0.1', '2013-07-05', 'https://rubygems.org/downloads/tablestyle-0.0.1.gem', 'ce63a5ed13cc0446f4b61cb779c9d4e0', 1, 'MIT', 'tablestyle', 19541010, 9999); -insert into all_urls (package_hash, vendor, component, version, date, url, url_hash, mine_id, license, purl_name, version_id, license_id) values ('abc123def456ghi789jkl012mno345pq', 'tseliot', 'screen-resolution-extra', '15.0.0', '2023-01-01', 'https://github.com/tseliot/screen-resolution-extra/archive/15.0.0.tar.gz', 'def456ghi789jkl012mno345pqr678st', 5, 'MIT', 'tseliot/screen-resolution-extra', 30001, 5614); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('7b1cbed0ad866bd4ece1fc3719fb0c5d', 'goffice', 'goffice', '0.10.52-4', '2022-08-04', 10, 'debian/goffice', 19836180, 15); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('b757a992ada86f72942aa7fc153a992f', 'scanoss', 'dependencies', 'v0.0.1', '2021-12-10', 5, 'scanoss/dependencies', 19541010, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('4d66775f503b1e76582e7e5b2ea54d92', 'taballa.hp-PD', 'tablestyle', '0.0.10', '2013-08-26', 1, 'tablestyle', 19541011, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('bfada11fd2b2b8fa23943b8b6fe5cb3f', 'taballa.hp-PD', 'tablestyle', '0.0.12', '2013-08-26', 1, 'tablestyle', 258510, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('f586d603a9cb2460c4517cffad6ad5e4', 'taballa.hp-PD', 'tablestyle', '0.0.7', null, 1, 'tablestyle', 14797, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('b1cd1444c2f76e7564f57b0e047994a4', 'taballa.hp-PD', 'tablestyle', '0.0.4', '2013-07-08', 1, 'tablestyle', 252547, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('952edab5837f5f0e59638dd791187725', 'taballa.hp-PD', 'tablestyle', '0.0.11', '2013-08-26', 1, 'tablestyle', 11435747, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('85ace696e6aec401c611eac8da439d75', 'taballa.hp-PD', 'tablestyle', '0.0.5', '2013-07-08', 1, 'tablestyle', 14796, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('4986c6fed8d0b30daa9caaa0e94101ff', 'taballa.hp-PD', 'tablestyle', '0.0.9', '2013-08-26', 1, 'tablestyle', 14302, 5614); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('33523708f7fbef1c554d340a5cfd42aa', 'taballa.hp-PD', 'tablestyle', '0.0.8', '2013-08-26', 1, 'tablestyle', 264714, 9999); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('7282b2348ff82296a9f84d399fd2799d', 'taballa.hp-PD', 'tablestyle', '0.0.1', '2013-07-05', 1, 'tablestyle', 19541010, 9999); +INSERT INTO all_urls (package_hash, vendor, component, version, date, mine_id, purl_name, version_id, license_id) VALUES ('abc123def456ghi789jkl012mno345pq', 'tseliot', 'screen-resolution-extra', '15.0.0', '2023-01-01', 5, 'tseliot/screen-resolution-extra', 30001, 5614); diff --git a/pkg/models/tests/bad_sql.sql b/pkg/models/tests/bad_sql.sql index 8bf8a8f..5872eb1 100644 --- a/pkg/models/tests/bad_sql.sql +++ b/pkg/models/tests/bad_sql.sql @@ -1,3 +1,3 @@ --- noinspection SyntaxErrorForFile +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. CREATE TABLE failed; \ No newline at end of file diff --git a/pkg/models/tests/cpe.sql b/pkg/models/tests/cpe.sql index 1391047..cd47e6f 100644 --- a/pkg/models/tests/cpe.sql +++ b/pkg/models/tests/cpe.sql @@ -1,391 +1,382 @@ -DROP TABLE IF EXISTS cpes; -CREATE TABLE "cpes" ( - "id" INTEGER NOT NULL UNIQUE, - "cpe" TEXT NOT NULL UNIQUE, - "short_cpe_id" INTEGER NOT NULL, - "version_id" INTEGER, - PRIMARY KEY("id") -); - - -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158765, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.2:*:*:*:*:wordpress:*:*', 40143, 13284); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158696, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.6:*:*:*:*:wordpress:*:*', 40143, 263168); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160884, 'cpe:2.3:a:cantemo:portal:3.4.5:*:*:*:*:*:*:*', 6591, 5811416); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158721, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9:*:*:*:*:wordpress:*:*', 40143, 19500087); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158716, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.5:*:*:*:*:wordpress:*:*', 40143, 13093993); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158760, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.8:*:*:*:*:wordpress:*:*', 40143, 13819035); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160202, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.3:*:*:*:*:*:*:*', 54486, 19501262); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159782, 'cpe:2.3:a:candlepinproject:candlepin:0.7.2:*:*:*:*:*:*:*', 23153, 14948); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158740, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.5:*:*:*:*:wordpress:*:*', 40143, 13146); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160814, 'cpe:2.3:a:cantemo:portal:2.3.4:*:*:*:*:*:*:*', 6591, 252221); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157224, 'cpe:2.3:a:cached_project:cached:0.2.0:*:*:*:*:rust:*:*', 54546, 265155); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160847, 'cpe:2.3:a:cantemo:portal:3.1.1:*:*:*:*:*:*:*', 6591, 253031); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157243, 'cpe:2.3:a:cached_project:cached:0.6.2:*:*:*:*:rust:*:*', 54546, 19491698); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160832, 'cpe:2.3:a:cantemo:portal:3.0.1:*:*:*:*:*:*:*', 6591, 263095); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159554, 'cpe:2.3:a:call_project:call:3.0.1:*:*:*:*:node.js:*:*', 50021, 263095); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159774, 'cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.2:*:*:*:*:wordpress:*:*', 8270, 264642); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159581, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.2:*:*:*:*:*:*:*', 32816, 264642); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158727, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.0.2:*:*:*:*:wordpress:*:*', 40143, 19462820); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160828, 'cpe:2.3:a:cantemo:portal:2.4.7:*:*:*:*:*:*:*', 6591, 8917); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160834, 'cpe:2.3:a:cantemo:portal:3.0.11:*:*:*:*:*:*:*', 6591, 13949); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160792, 'cpe:2.3:a:cantemo:portal:2.0.6:*:*:*:*:*:*:*', 6591, 19491044); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160868, 'cpe:2.3:a:cantemo:portal:3.2.8:*:*:*:*:*:*:*', 6591, 19468446); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160798, 'cpe:2.3:a:cantemo:portal:2.1.4:*:*:*:*:*:*:*', 6591, 13571); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158771, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.6.2:*:*:*:*:wordpress:*:*', 40143, 14251660); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158703, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.1:*:*:*:*:wordpress:*:*', 40143, 264337); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158729, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.1.2:*:*:*:*:wordpress:*:*', 40143, 6703009); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158698, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.8:*:*:*:*:wordpress:*:*', 40143, 251751); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160882, 'cpe:2.3:a:cantemo:portal:3.4.3:*:*:*:*:*:*:*', 6591, 19533308); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157081, 'cpe:2.3:a:c2fo:comb:0.2.7:*:*:*:*:node.js:*:*', 4772, 19487480); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160203, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.4:*:*:*:*:*:*:*', 54486, 254033); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159562, 'cpe:2.3:a:call_project:call:5.0.1:*:*:*:*:node.js:*:*', 50021, 1794); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160861, 'cpe:2.3:a:cantemo:portal:3.2.13:*:*:*:*:*:*:*', 6591, 14250461); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157053, 'cpe:2.3:a:c2fo:comb:0.0.2:*:*:*:*:node.js:*:*', 4772, 264721); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157094, 'cpe:2.3:a:c2fo:comb:1.0.1:*:*:*:*:node.js:*:*', 4772, 265154); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157206, 'cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.1:*:*:*:*:node.js:*:*', 6930, 265154); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160877, 'cpe:2.3:a:cantemo:portal:3.3.7:*:*:*:*:*:*:*', 6591, 6544148); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157089, 'cpe:2.3:a:c2fo:comb:0.3.5:*:*:*:*:node.js:*:*', 4772, 6155011); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160860, 'cpe:2.3:a:cantemo:portal:3.2.12:*:*:*:*:*:*:*', 6591, 19480103); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159549, 'cpe:2.3:a:call_project:call:1.0.0:*:*:*:*:node.js:*:*', 50021, 265153); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157093, 'cpe:2.3:a:c2fo:comb:1.0.0:*:*:*:*:node.js:*:*', 4772, 265153); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160826, 'cpe:2.3:a:cantemo:portal:2.4.5:*:*:*:*:*:*:*', 6591, 15145); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157205, 'cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.0:*:*:*:*:node.js:*:*', 6930, 265153); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160812, 'cpe:2.3:a:cantemo:portal:2.3.2:*:*:*:*:*:*:*', 6591, 244660); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159584, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.5:*:*:*:*:*:*:*', 32816, 13616284); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159777, 'cpe:2.3:a:candlepinproject:candlepin:0.4.11:*:*:*:*:*:*:*', 23153, 19485263); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158739, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.5.3:*:*:*:*:wordpress:*:*', 40143, 10499956); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160872, 'cpe:2.3:a:cantemo:portal:3.3.2:*:*:*:*:*:*:*', 6591, 19525948); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158701, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.0:*:*:*:*:wordpress:*:*', 40143, 264339); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160816, 'cpe:2.3:a:cantemo:portal:2.3.6:*:*:*:*:*:*:*', 6591, 8878); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160791, 'cpe:2.3:a:cantemo:portal:2.0.5:*:*:*:*:*:*:*', 6591, 262138); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158714, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.3:*:*:*:*:wordpress:*:*', 40143, 13877853); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158693, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.3:*:*:*:*:wordpress:*:*', 40143, 265149); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158713, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.2:*:*:*:*:wordpress:*:*', 40143, 13934859); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157236, 'cpe:2.3:a:cached_project:cached:0.4.1:*:*:*:*:rust:*:*', 54546, 262603); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157092, 'cpe:2.3:a:c2fo:comb:0.4.1:*:*:*:*:node.js:*:*', 4772, 262603); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157237, 'cpe:2.3:a:cached_project:cached:0.4.2:*:*:*:*:rust:*:*', 54546, 247658); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157228, 'cpe:2.3:a:cached_project:cached:0.22.0:*:*:*:*:rust:*:*', 54546, 5127876); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157070, 'cpe:2.3:a:c2fo:comb:0.1.8:*:*:*:*:node.js:*:*', 4772, 15211); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160851, 'cpe:2.3:a:cantemo:portal:3.1.5:*:*:*:*:*:*:*', 6591, 9154); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160204, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.5:*:*:*:*:*:*:*', 54486, 19299214); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159587, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:2.1:*:*:*:*:*:*:*', 32816, 12690234); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158757, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.5:*:*:*:*:wordpress:*:*', 40143, 1999301); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158746, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.4.1:*:*:*:*:wordpress:*:*', 40143, 19478045); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160823, 'cpe:2.3:a:cantemo:portal:2.4.2:*:*:*:*:*:*:*', 6591, 251178); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160793, 'cpe:2.3:a:cantemo:portal:2.0.7:*:*:*:*:*:*:*', 6591, 257434); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160801, 'cpe:2.3:a:cantemo:portal:2.2.0:*:*:*:*:*:*:*', 6591, 251179); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160862, 'cpe:2.3:a:cantemo:portal:3.2.2:*:*:*:*:*:*:*', 6591, 14619); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159780, 'cpe:2.3:a:candlepinproject:candlepin:0.5.5:*:*:*:*:*:*:*', 23153, 19487460); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160835, 'cpe:2.3:a:cantemo:portal:3.0.12:*:*:*:*:*:*:*', 6591, 13961); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157057, 'cpe:2.3:a:c2fo:comb:0.0.6:*:*:*:*:node.js:*:*', 4772, 263449); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157067, 'cpe:2.3:a:c2fo:comb:0.1.5:*:*:*:*:node.js:*:*', 4772, 252546); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160587, 'cpe:2.3:a:canonical:ubuntu-core-launcher:1.0.27:*:*:*:*:*:*:*', 4970, 19475780); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160803, 'cpe:2.3:a:cantemo:portal:2.2.2:*:*:*:*:*:*:*', 6591, 252703); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158707, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.5:*:*:*:*:wordpress:*:*', 40143, 14540); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160597, 'cpe:2.3:a:canonical:update-manager:1\:0.142.23.1:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160598, 'cpe:2.3:a:canonical:update-manager:1\:0.150:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157066, 'cpe:2.3:a:c2fo:comb:0.1.4:*:*:*:*:node.js:*:*', 4772, 15000); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160858, 'cpe:2.3:a:cantemo:portal:3.2.10:*:*:*:*:*:*:*', 6591, 19480292); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158747, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.4:*:*:*:*:wordpress:*:*', 40143, 13279); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157062, 'cpe:2.3:a:c2fo:comb:0.1.10:*:*:*:*:node.js:*:*', 4772, 19487577); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160796, 'cpe:2.3:a:cantemo:portal:2.1.2:*:*:*:*:*:*:*', 6591, 263539); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158712, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.1:*:*:*:*:wordpress:*:*', 40143, 19487278); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160794, 'cpe:2.3:a:cantemo:portal:2.1.0:*:*:*:*:*:*:*', 6591, 264251); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158763, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.1:*:*:*:*:wordpress:*:*', 40143, 15231); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160772, 'cpe:2.3:a:cantemo:portal:1.5.1:*:*:*:*:*:*:*', 6591, 15231); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157059, 'cpe:2.3:a:c2fo:comb:0.0.8:*:*:*:*:node.js:*:*', 4772, 264714); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160850, 'cpe:2.3:a:cantemo:portal:3.1.4:*:*:*:*:*:*:*', 6591, 8723); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157074, 'cpe:2.3:a:c2fo:comb:0.2.11:*:*:*:*:node.js:*:*', 4772, 5482104); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157247, 'cpe:2.3:a:cached_project:cached:0.9.0:*:*:*:*:rust:*:*', 54546, 14944); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160822, 'cpe:2.3:a:cantemo:portal:2.4.10:*:*:*:*:*:*:*', 6591, 16550345); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158726, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.0.1:*:*:*:*:wordpress:*:*', 40143, 19462818); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159582, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.3:*:*:*:*:*:*:*', 32816, 264113); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159775, 'cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.3:*:*:*:*:wordpress:*:*', 8270, 264113); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157246, 'cpe:2.3:a:cached_project:cached:0.8.1:*:*:*:*:rust:*:*', 54546, 249774); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160827, 'cpe:2.3:a:cantemo:portal:2.4.6:*:*:*:*:*:*:*', 6591, 19497916); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160804, 'cpe:2.3:a:cantemo:portal:2.2.3:*:*:*:*:*:*:*', 6591, 251176); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158724, 'cpe:2.3:a:calderalabs:caldera_forms:1.2.2:*:*:*:*:wordpress:*:*', 40143, 258303); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160842, 'cpe:2.3:a:cantemo:portal:3.0.6.1:*:*:*:*:*:*:*', 6591, 6357014); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160844, 'cpe:2.3:a:cantemo:portal:3.0.8:*:*:*:*:*:*:*', 6591, 13940); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160824, 'cpe:2.3:a:cantemo:portal:2.4.3:*:*:*:*:*:*:*', 6591, 15029); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160771, 'cpe:2.3:a:cantemo:portal:1.5.0:*:*:*:*:*:*:*', 6591, 264098); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158762, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0:*:*:*:*:wordpress:*:*', 40143, 264098); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160773, 'cpe:2.3:a:cantemo:portal:1.5.2:*:*:*:*:*:*:*', 6591, 13284); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157215, 'cpe:2.3:a:cached_project:cached:0.14.0:*:*:*:*:rust:*:*', 54546, 7405670); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158722, 'cpe:2.3:a:calderalabs:caldera_forms:1.2.0:*:*:*:*:wordpress:*:*', 40143, 263438); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160840, 'cpe:2.3:a:cantemo:portal:3.0.5:*:*:*:*:*:*:*', 6591, 15003); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158752, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.8:*:*:*:*:wordpress:*:*', 40143, 7083951); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158731, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.2.1:*:*:*:*:wordpress:*:*', 40143, 19491331); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160887, 'cpe:2.3:a:cantemo:portal:3.4.8:*:*:*:*:*:*:*', 6591, 9540297); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160805, 'cpe:2.3:a:cantemo:portal:2.2.4:*:*:*:*:*:*:*', 6591, 14621); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160289, 'cpe:2.3:a:canonical:selinux:1\:0.10:*:*:*:*:*:*:*', 48168, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158711, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.10:*:*:*:*:wordpress:*:*', 40143, 13117909); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160859, 'cpe:2.3:a:cantemo:portal:3.2.11:*:*:*:*:*:*:*', 6591, 12192601); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158706, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.4:*:*:*:*:wordpress:*:*', 40143, 19490036); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160769, 'cpe:2.3:a:cantemo:portal:1.4.0:*:*:*:*:*:*:*', 6591, 260652); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158741, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.0:*:*:*:*:wordpress:*:*', 40143, 260652); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160099, 'cpe:2.3:a:canonical:checkinstall:1.6.2:*:*:*:*:*:*:*', 17559, 261941); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158780, 'cpe:2.3:a:calderalabs:caldera_forms:1.6.2:*:*:*:*:wordpress:*:*', 40143, 261941); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160781, 'cpe:2.3:a:cantemo:portal:1.6.2:*:*:*:*:*:*:*', 6591, 261941); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160845, 'cpe:2.3:a:cantemo:portal:3.0.9:*:*:*:*:*:*:*', 6591, 13904); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157072, 'cpe:2.3:a:c2fo:comb:0.2.0:*:*:*:*:node.js:*:*', 4772, 265155); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160820, 'cpe:2.3:a:cantemo:portal:2.4.0:*:*:*:*:*:*:*', 6591, 251181); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157231, 'cpe:2.3:a:cached_project:cached:0.2.3:*:*:*:*:rust:*:*', 54546, 253139); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160807, 'cpe:2.3:a:cantemo:portal:2.3.0:*:*:*:*:*:*:*', 6591, 257513); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158695, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.5:*:*:*:*:wordpress:*:*', 40143, 264114); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160806, 'cpe:2.3:a:cantemo:portal:2.2.5:*:*:*:*:*:*:*', 6591, 254832); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157090, 'cpe:2.3:a:c2fo:comb:0.3.6:*:*:*:*:node.js:*:*', 4772, 6138488); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160879, 'cpe:2.3:a:cantemo:portal:3.4.0:*:*:*:*:*:*:*', 6591, 243167); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159779, 'cpe:2.3:a:candlepinproject:candlepin:0.4.5:*:*:*:*:*:*:*', 23153, 12797296); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160888, 'cpe:2.3:a:cantemo:portal:3.4.9:*:*:*:*:*:*:*', 6591, 19481914); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158738, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.5.2:*:*:*:*:wordpress:*:*', 40143, 17151752); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160873, 'cpe:2.3:a:cantemo:portal:3.3.3:*:*:*:*:*:*:*', 6591, 19508585); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158790, 'cpe:2.3:a:calendarscripts:konnichiwa:0.8.3:*:*:*:*:wordpress:*:*', 31044, 5670099); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157056, 'cpe:2.3:a:c2fo:comb:0.0.5:*:*:*:*:node.js:*:*', 4772, 14796); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160889, 'cpe:2.3:a:cantemo:portal:4.0.0:*:*:*:*:*:*:*', 6591, 252612); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159558, 'cpe:2.3:a:call_project:call:4.0.0:*:*:*:*:node.js:*:*', 50021, 252612); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159556, 'cpe:2.3:a:call_project:call:3.0.3:*:*:*:*:node.js:*:*', 50021, 1394); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160838, 'cpe:2.3:a:cantemo:portal:3.0.3:*:*:*:*:*:*:*', 6591, 1394); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160874, 'cpe:2.3:a:cantemo:portal:3.3.4:*:*:*:*:*:*:*', 6591, 15028); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158748, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.5.1:*:*:*:*:wordpress:*:*', 40143, 9909761); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157091, 'cpe:2.3:a:c2fo:comb:0.4.0:*:*:*:*:node.js:*:*', 4772, 249755); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160784, 'cpe:2.3:a:cantemo:portal:1.6.5:*:*:*:*:*:*:*', 6591, 19541079); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158733, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.3.1:*:*:*:*:wordpress:*:*', 40143, 19469911); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160800, 'cpe:2.3:a:cantemo:portal:2.1.6:*:*:*:*:*:*:*', 6591, 250722); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159585, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.6:*:*:*:*:*:*:*', 32816, 19532572); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157225, 'cpe:2.3:a:cached_project:cached:0.21.0:*:*:*:*:rust:*:*', 54546, 5128616); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158720, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.9:*:*:*:*:wordpress:*:*', 40143, 8912914); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159563, 'cpe:2.3:a:call_project:call:5.0.2:*:*:*:*:node.js:*:*', 50021, 15193); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160808, 'cpe:2.3:a:cantemo:portal:2.3.1:*:*:*:*:*:*:*', 6591, 264996); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157220, 'cpe:2.3:a:cached_project:cached:0.17.0:*:*:*:*:rust:*:*', 54546, 6895007); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157083, 'cpe:2.3:a:c2fo:comb:0.2.9:*:*:*:*:node.js:*:*', 4772, 19487481); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160192, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha4:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160849, 'cpe:2.3:a:cantemo:portal:3.1.3:*:*:*:*:*:*:*', 6591, 9113); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158737, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.5.1:*:*:*:*:wordpress:*:*', 40143, 19532557); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158743, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.2:*:*:*:*:wordpress:*:*', 40143, 257682); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160785, 'cpe:2.3:a:cantemo:portal:1.6.6:*:*:*:*:*:*:*', 6591, 5617453); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157082, 'cpe:2.3:a:c2fo:comb:0.2.8:*:*:*:*:node.js:*:*', 4772, 19487482); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158749, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.5:*:*:*:*:wordpress:*:*', 40143, 7892814); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157209, 'cpe:2.3:a:cached_project:cached:0.10.0:*:*:*:*:rust:*:*', 54546, 249772); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158723, 'cpe:2.3:a:calderalabs:caldera_forms:1.2.1:*:*:*:*:wordpress:*:*', 40143, 264897); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158728, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.0:*:*:*:*:wordpress:*:*', 40143, 264338); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158766, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.3.1:*:*:*:*:wordpress:*:*', 40143, 19462971); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157234, 'cpe:2.3:a:cached_project:cached:0.3.1:*:*:*:*:rust:*:*', 54546, 252261); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157085, 'cpe:2.3:a:c2fo:comb:0.3.1:*:*:*:*:node.js:*:*', 4772, 252261); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157055, 'cpe:2.3:a:c2fo:comb:0.0.4:*:*:*:*:node.js:*:*', 4772, 252547); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158704, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.2:*:*:*:*:wordpress:*:*', 40143, 22072); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160790, 'cpe:2.3:a:cantemo:portal:2.0.4:*:*:*:*:*:*:*', 6591, 2683); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159557, 'cpe:2.3:a:call_project:call:3.0.4:*:*:*:*:node.js:*:*', 50021, 252066); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (161218, 'cpe:2.3:a:capstone-engine:capstone:3.0.4:*:*:*:*:*:*:*', 8296, 252066); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160839, 'cpe:2.3:a:cantemo:portal:3.0.4:*:*:*:*:*:*:*', 6591, 252066); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157088, 'cpe:2.3:a:c2fo:comb:0.3.4:*:*:*:*:node.js:*:*', 4772, 252638); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158705, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.3:*:*:*:*:wordpress:*:*', 40143, 249058); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157073, 'cpe:2.3:a:c2fo:comb:0.2.10:*:*:*:*:node.js:*:*', 4772, 11466378); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160843, 'cpe:2.3:a:cantemo:portal:3.0.7:*:*:*:*:*:*:*', 6591, 13967); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160870, 'cpe:2.3:a:cantemo:portal:3.3.0:*:*:*:*:*:*:*', 6591, 15264); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160833, 'cpe:2.3:a:cantemo:portal:3.0.10:*:*:*:*:*:*:*', 6591, 13943); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160886, 'cpe:2.3:a:cantemo:portal:3.4.7:*:*:*:*:*:*:*', 6591, 8873); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158725, 'cpe:2.3:a:calderalabs:caldera_forms:1.2.3:*:*:*:*:wordpress:*:*', 40143, 247848); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157054, 'cpe:2.3:a:c2fo:comb:0.0.3:*:*:*:*:node.js:*:*', 4772, 264643); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158773, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.7.1:*:*:*:*:wordpress:*:*', 40143, 19469924); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157071, 'cpe:2.3:a:c2fo:comb:0.1.9:*:*:*:*:node.js:*:*', 4772, 233375); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159552, 'cpe:2.3:a:call_project:call:2.0.2:*:*:*:*:node.js:*:*', 50021, 262155); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160788, 'cpe:2.3:a:cantemo:portal:2.0.2:*:*:*:*:*:*:*', 6591, 262155); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160797, 'cpe:2.3:a:cantemo:portal:2.1.3:*:*:*:*:*:*:*', 6591, 252640); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160863, 'cpe:2.3:a:cantemo:portal:3.2.3:*:*:*:*:*:*:*', 6591, 249253); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159583, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.4:*:*:*:*:*:*:*', 32816, 19487001); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158734, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.3:*:*:*:*:wordpress:*:*', 40143, 11418); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157242, 'cpe:2.3:a:cached_project:cached:0.6.1:*:*:*:*:rust:*:*', 54546, 256416); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159773, 'cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.1:*:*:*:*:wordpress:*:*', 8270, 263265); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158750, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.6:*:*:*:*:wordpress:*:*', 40143, 13517); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160837, 'cpe:2.3:a:cantemo:portal:3.0.2:*:*:*:*:*:*:*', 6591, 19491083); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158767, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.3:*:*:*:*:wordpress:*:*', 40143, 10817733); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158772, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.6:*:*:*:*:wordpress:*:*', 40143, 19291862); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160777, 'cpe:2.3:a:cantemo:portal:1.5.6:*:*:*:*:*:*:*', 6591, 19291862); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160881, 'cpe:2.3:a:cantemo:portal:3.4.2:*:*:*:*:*:*:*', 6591, 1365); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158754, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.10:*:*:*:*:wordpress:*:*', 40143, 10429338); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157244, 'cpe:2.3:a:cached_project:cached:0.7.0:*:*:*:*:rust:*:*', 54546, 264249); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159577, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:0.8:*:*:*:*:*:*:*', 32816, 244764); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158778, 'cpe:2.3:a:calderalabs:caldera_forms:1.6.1.1:*:*:*:*:wordpress:*:*', 40143, 19490475); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160779, 'cpe:2.3:a:cantemo:portal:1.6.0:*:*:*:*:*:*:*', 6591, 263437); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158777, 'cpe:2.3:a:calderalabs:caldera_forms:1.6.0:*:*:*:*:wordpress:*:*', 40143, 263437); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157240, 'cpe:2.3:a:cached_project:cached:0.5.0:*:*:*:*:rust:*:*', 54546, 252454); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157077, 'cpe:2.3:a:c2fo:comb:0.2.3:*:*:*:*:node.js:*:*', 4772, 253139); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160846, 'cpe:2.3:a:cantemo:portal:3.1.0:*:*:*:*:*:*:*', 6591, 262607); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159580, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.1:*:*:*:*:*:*:*', 32816, 263265); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159555, 'cpe:2.3:a:call_project:call:3.0.2:*:*:*:*:node.js:*:*', 50021, 19491083); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157078, 'cpe:2.3:a:c2fo:comb:0.2.4:*:*:*:*:node.js:*:*', 4772, 15235); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157232, 'cpe:2.3:a:cached_project:cached:0.2.4:*:*:*:*:rust:*:*', 54546, 15235); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160876, 'cpe:2.3:a:cantemo:portal:3.3.6:*:*:*:*:*:*:*', 6591, 9111); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159576, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:0.7:*:*:*:*:*:*:*', 32816, 5835723); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160809, 'cpe:2.3:a:cantemo:portal:2.3.10:*:*:*:*:*:*:*', 6591, 19324110); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160818, 'cpe:2.3:a:cantemo:portal:2.3.8:*:*:*:*:*:*:*', 6591, 8720); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157087, 'cpe:2.3:a:c2fo:comb:0.3.3:*:*:*:*:node.js:*:*', 4772, 19487573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160830, 'cpe:2.3:a:cantemo:portal:2.4.9:*:*:*:*:*:*:*', 6591, 19518492); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158755, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.1-3:*:*:*:*:wordpress:*:*', 40143, 13695671); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160869, 'cpe:2.3:a:cantemo:portal:3.2.9:*:*:*:*:*:*:*', 6591, 19480553); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158776, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.9:*:*:*:*:wordpress:*:*', 40143, 19460749); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160774, 'cpe:2.3:a:cantemo:portal:1.5.3:*:*:*:*:*:*:*', 6591, 10817733); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160603, 'cpe:2.3:a:canonical:update-manager:1\:0.87.31.1:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157241, 'cpe:2.3:a:cached_project:cached:0.6.0:*:*:*:*:rust:*:*', 54546, 248486); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159586, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:2.0:*:*:*:*:*:*:*', 32816, 19494556); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158690, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.0:*:*:*:*:wordpress:*:*', 40143, 265153); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160588, 'cpe:2.3:a:canonical:ubuntu_download_manager:-:*:*:*:*:*:*:*', 48783, 19513403); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159776, 'cpe:2.3:a:candlepinproject:candlepin:-:*:*:*:*:*:*:*', 23153, 19513403); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160813, 'cpe:2.3:a:cantemo:portal:2.3.3:*:*:*:*:*:*:*', 6591, 252815); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158756, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.4:*:*:*:*:wordpress:*:*', 40143, 10522622); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160848, 'cpe:2.3:a:cantemo:portal:3.1.2:*:*:*:*:*:*:*', 6591, 13150); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160817, 'cpe:2.3:a:cantemo:portal:2.3.7:*:*:*:*:*:*:*', 6591, 17890); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160811, 'cpe:2.3:a:cantemo:portal:2.3.12:*:*:*:*:*:*:*', 6591, 11647042); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158718, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.7:*:*:*:*:wordpress:*:*', 40143, 19478693); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160854, 'cpe:2.3:a:cantemo:portal:3.1.8:*:*:*:*:*:*:*', 6591, 19468629); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160775, 'cpe:2.3:a:cantemo:portal:1.5.4:*:*:*:*:*:*:*', 6591, 14946); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160829, 'cpe:2.3:a:cantemo:portal:2.4.8:*:*:*:*:*:*:*', 6591, 19323850); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158745, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.3:*:*:*:*:wordpress:*:*', 40143, 256715); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158768, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.4:*:*:*:*:wordpress:*:*', 40143, 14946); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158736, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.4.2:*:*:*:*:wordpress:*:*', 40143, 6277397); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157210, 'cpe:2.3:a:cached_project:cached:0.1.0:*:*:*:*:rust:*:*', 54546, 265156); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157061, 'cpe:2.3:a:c2fo:comb:0.1.0:*:*:*:*:node.js:*:*', 4772, 265156); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159551, 'cpe:2.3:a:call_project:call:2.0.1:*:*:*:*:node.js:*:*', 50021, 265075); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160787, 'cpe:2.3:a:cantemo:portal:2.0.1:*:*:*:*:*:*:*', 6591, 265075); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160187, 'cpe:2.3:a:canonical:lxd:2.0.1:*:*:*:*:*:*:*', 36858, 265075); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160864, 'cpe:2.3:a:cantemo:portal:3.2.4:*:*:*:*:*:*:*', 6591, 19500948); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157068, 'cpe:2.3:a:c2fo:comb:0.1.6:*:*:*:*:node.js:*:*', 4772, 14867); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158709, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.7:*:*:*:*:wordpress:*:*', 40143, 252657); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160878, 'cpe:2.3:a:cantemo:portal:3.3.8:*:*:*:*:*:*:*', 6591, 14268199); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158775, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.8:*:*:*:*:wordpress:*:*', 40143, 10371); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160778, 'cpe:2.3:a:cantemo:portal:1.5.7:*:*:*:*:*:*:*', 6591, 19531474); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157069, 'cpe:2.3:a:c2fo:comb:0.1.7:*:*:*:*:node.js:*:*', 4772, 15188); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158774, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.7:*:*:*:*:wordpress:*:*', 40143, 19531474); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157065, 'cpe:2.3:a:c2fo:comb:0.1.3:*:*:*:*:node.js:*:*', 4772, 250884); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158717, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.6:*:*:*:*:wordpress:*:*', 40143, 8474638); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159572, 'cpe:2.3:a:calmquist.static-server_project:calmquist.static-server:0.1.1:*:*:*:*:node.js:*:*', 24723, 265151); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157063, 'cpe:2.3:a:c2fo:comb:0.1.1:*:*:*:*:node.js:*:*', 4772, 265151); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157229, 'cpe:2.3:a:cached_project:cached:0.2.2:*:*:*:*:rust:*:*', 54546, 263698); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157076, 'cpe:2.3:a:c2fo:comb:0.2.2:*:*:*:*:node.js:*:*', 4772, 263698); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160789, 'cpe:2.3:a:cantemo:portal:2.0.3:*:*:*:*:*:*:*', 6591, 263699); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157245, 'cpe:2.3:a:cached_project:cached:0.8.0:*:*:*:*:rust:*:*', 54546, 15081); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160883, 'cpe:2.3:a:cantemo:portal:3.4.4:*:*:*:*:*:*:*', 6591, 12448282); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157217, 'cpe:2.3:a:cached_project:cached:0.15.0:*:*:*:*:rust:*:*', 54546, 15050); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160786, 'cpe:2.3:a:cantemo:portal:2.0.0:*:*:*:*:*:*:*', 6591, 265076); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159550, 'cpe:2.3:a:call_project:call:2.0.0:*:*:*:*:node.js:*:*', 50021, 265076); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157097, 'cpe:2.3:a:c2fo:comb:2.0.0:*:*:*:*:node.js:*:*', 4772, 265076); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157080, 'cpe:2.3:a:c2fo:comb:0.2.6:*:*:*:*:node.js:*:*', 4772, 6140300); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160866, 'cpe:2.3:a:cantemo:portal:3.2.6:*:*:*:*:*:*:*', 6591, 8889); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160871, 'cpe:2.3:a:cantemo:portal:3.3.1:*:*:*:*:*:*:*', 6591, 237532); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157214, 'cpe:2.3:a:cached_project:cached:0.13.1:*:*:*:*:rust:*:*', 54546, 264231); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157221, 'cpe:2.3:a:cached_project:cached:0.18.0:*:*:*:*:rust:*:*', 54546, 11098064); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157162, 'cpe:2.3:a:c97:cart_engine:3.0:*:*:*:*:*:*:*', 40676, 1795); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159578, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:0.9:*:*:*:*:*:*:*', 32816, 19487340); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160795, 'cpe:2.3:a:cantemo:portal:2.1.1:*:*:*:*:*:*:*', 6591, 263266); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160875, 'cpe:2.3:a:cantemo:portal:3.3.5:*:*:*:*:*:*:*', 6591, 15302); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160815, 'cpe:2.3:a:cantemo:portal:2.3.5:*:*:*:*:*:*:*', 6591, 8918); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160856, 'cpe:2.3:a:cantemo:portal:3.2.0:*:*:*:*:*:*:*', 6591, 2025); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157233, 'cpe:2.3:a:cached_project:cached:0.3.0:*:*:*:*:rust:*:*', 54546, 252814); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157084, 'cpe:2.3:a:c2fo:comb:0.3.0:*:*:*:*:node.js:*:*', 4772, 252814); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158770, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.6.1:*:*:*:*:wordpress:*:*', 40143, 13917822); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158710, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.8:*:*:*:*:wordpress:*:*', 40143, 252983); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158764, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.2.1:*:*:*:*:wordpress:*:*', 40143, 19465563); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160782, 'cpe:2.3:a:cantemo:portal:1.6.3:*:*:*:*:*:*:*', 6591, 19486979); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158781, 'cpe:2.3:a:calderalabs:caldera_forms:1.6.3:*:*:*:*:wordpress:*:*', 40143, 19486979); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160885, 'cpe:2.3:a:cantemo:portal:3.4.6:*:*:*:*:*:*:*', 6591, 14489); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160201, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.2:*:*:*:*:*:*:*', 54486, 14051023); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160596, 'cpe:2.3:a:canonical:update-manager:1\:0.142.19:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160831, 'cpe:2.3:a:cantemo:portal:3.0.0:*:*:*:*:*:*:*', 6591, 265074); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157235, 'cpe:2.3:a:cached_project:cached:0.4.0:*:*:*:*:rust:*:*', 54546, 249755); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160602, 'cpe:2.3:a:canonical:update-manager:1\:0.87.24:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160195, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:beta2:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158744, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.3.1:*:*:*:*:wordpress:*:*', 40143, 19471530); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158691, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.1:*:*:*:*:wordpress:*:*', 40143, 265154); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160595, 'cpe:2.3:a:canonical:update-manager:1\:0.134.7:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160601, 'cpe:2.3:a:canonical:update-manager:1\:0.152.25.5:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160594, 'cpe:2.3:a:canonical:update-manager:1\:0.134.11.1:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160600, 'cpe:2.3:a:canonical:update-manager:1\:0.152.25:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160599, 'cpe:2.3:a:canonical:update-manager:1\:0.150.5.1:*:*:*:*:*:*:*', 11798, null); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158719, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.8:*:*:*:*:wordpress:*:*', 40143, 10333707); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160825, 'cpe:2.3:a:cantemo:portal:2.4.4:*:*:*:*:*:*:*', 6591, 19502604); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157060, 'cpe:2.3:a:c2fo:comb:0.0.9:*:*:*:*:node.js:*:*', 4772, 14302); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160799, 'cpe:2.3:a:cantemo:portal:2.1.5:*:*:*:*:*:*:*', 6591, 15189); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160865, 'cpe:2.3:a:cantemo:portal:3.2.5:*:*:*:*:*:*:*', 6591, 14400); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157211, 'cpe:2.3:a:cached_project:cached:0.11.0:*:*:*:*:rust:*:*', 54546, 252639); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160855, 'cpe:2.3:a:cantemo:portal:3.1.9:*:*:*:*:*:*:*', 6591, 19484821); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160783, 'cpe:2.3:a:cantemo:portal:1.6.4:*:*:*:*:*:*:*', 6591, 8481); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158694, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.4:*:*:*:*:wordpress:*:*', 40143, 265152); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157216, 'cpe:2.3:a:cached_project:cached:0.14.1:*:*:*:*:rust:*:*', 54546, 8952136); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157239, 'cpe:2.3:a:cached_project:cached:0.4.4:*:*:*:*:rust:*:*', 54546, 7256833); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160880, 'cpe:2.3:a:cantemo:portal:3.4.1:*:*:*:*:*:*:*', 6591, 11379260); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160196, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc1:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160194, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:beta1:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160190, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha2:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160199, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc4:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160191, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha3:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160189, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha1:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160188, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:-:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160197, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc2:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160198, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc3:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160193, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha5:*:*:*:*:*:*', 54486, 215573); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157226, 'cpe:2.3:a:cached_project:cached:0.21.1:*:*:*:*:rust:*:*', 54546, 19491213); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157219, 'cpe:2.3:a:cached_project:cached:0.16.0:*:*:*:*:rust:*:*', 54546, 3720103); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157213, 'cpe:2.3:a:cached_project:cached:0.13.0:*:*:*:*:rust:*:*', 54546, 14943); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157222, 'cpe:2.3:a:cached_project:cached:0.19.0:*:*:*:*:rust:*:*', 54546, 19269674); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158702, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.10:*:*:*:*:wordpress:*:*', 40143, 19529343); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157212, 'cpe:2.3:a:cached_project:cached:0.12.0:*:*:*:*:rust:*:*', 54546, 241746); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157058, 'cpe:2.3:a:c2fo:comb:0.0.7:*:*:*:*:node.js:*:*', 4772, 14797); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158759, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.7:*:*:*:*:wordpress:*:*', 40143, 11283815); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159561, 'cpe:2.3:a:call_project:call:5.0.0:*:*:*:*:node.js:*:*', 50021, 252059); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158697, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.7:*:*:*:*:wordpress:*:*', 40143, 253846); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160852, 'cpe:2.3:a:cantemo:portal:3.1.6:*:*:*:*:*:*:*', 6591, 19484820); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159559, 'cpe:2.3:a:call_project:call:4.0.1:*:*:*:*:node.js:*:*', 50021, 1998); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157238, 'cpe:2.3:a:cached_project:cached:0.4.3:*:*:*:*:rust:*:*', 54546, 14945); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157223, 'cpe:2.3:a:cached_project:cached:0.20.0:*:*:*:*:rust:*:*', 54546, 7818861); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158742, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.1:*:*:*:*:wordpress:*:*', 40143, 264115); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160770, 'cpe:2.3:a:cantemo:portal:1.4.1:*:*:*:*:*:*:*', 6591, 264115); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157064, 'cpe:2.3:a:c2fo:comb:0.1.2:*:*:*:*:node.js:*:*', 4772, 263169); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158751, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.7:*:*:*:*:wordpress:*:*', 40143, 8795532); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159560, 'cpe:2.3:a:call_project:call:4.0.2:*:*:*:*:node.js:*:*', 50021, 12882); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160819, 'cpe:2.3:a:cantemo:portal:2.3.9:*:*:*:*:*:*:*', 6591, 19503485); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158692, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.2:*:*:*:*:wordpress:*:*', 40143, 265150); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157207, 'cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.2:*:*:*:*:node.js:*:*', 6930, 265150); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158735, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.4.1:*:*:*:*:wordpress:*:*', 40143, 5600056); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160841, 'cpe:2.3:a:cantemo:portal:3.0.6:*:*:*:*:*:*:*', 6591, 19501164); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158758, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.6:*:*:*:*:wordpress:*:*', 40143, 7235805); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160821, 'cpe:2.3:a:cantemo:portal:2.4.1:*:*:*:*:*:*:*', 6591, 15337); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158761, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.0.9:*:*:*:*:wordpress:*:*', 40143, 11562873); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159553, 'cpe:2.3:a:call_project:call:3.0.0:*:*:*:*:node.js:*:*', 50021, 265074); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157218, 'cpe:2.3:a:cached_project:cached:0.15.1:*:*:*:*:rust:*:*', 54546, 19487206); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160802, 'cpe:2.3:a:cantemo:portal:2.2.1:*:*:*:*:*:*:*', 6591, 19487479); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157227, 'cpe:2.3:a:cached_project:cached:0.2.1:*:*:*:*:rust:*:*', 54546, 264557); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157075, 'cpe:2.3:a:c2fo:comb:0.2.1:*:*:*:*:node.js:*:*', 4772, 264557); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159574, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:0.5:*:*:*:*:*:*:*', 32816, 19487504); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157079, 'cpe:2.3:a:c2fo:comb:0.2.5:*:*:*:*:node.js:*:*', 4772, 14851); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160857, 'cpe:2.3:a:cantemo:portal:3.2.1:*:*:*:*:*:*:*', 6591, 13152); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159772, 'cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.0:*:*:*:*:wordpress:*:*', 8270, 265157); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159579, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:1.0:*:*:*:*:*:*:*', 32816, 265157); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159778, 'cpe:2.3:a:candlepinproject:candlepin:0.4.27:*:*:*:*:*:*:*', 23153, 19295050); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158708, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.6:*:*:*:*:wordpress:*:*', 40143, 14744); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159575, 'cpe:2.3:a:cambridge_enterprise:jbig-kit:0.6:*:*:*:*:*:*:*', 32816, 252413); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160810, 'cpe:2.3:a:cantemo:portal:2.3.11:*:*:*:*:*:*:*', 6591, 9123); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157230, 'cpe:2.3:a:cached_project:cached:0.23.0:*:*:*:*:rust:*:*', 54546, 12136986); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157096, 'cpe:2.3:a:c2fo:comb:1.2.0:*:*:*:*:node.js:*:*', 4772, 263438); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160836, 'cpe:2.3:a:cantemo:portal:3.0.13:*:*:*:*:*:*:*', 6591, 13966); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158779, 'cpe:2.3:a:calderalabs:caldera_forms:1.6.1:*:*:*:*:wordpress:*:*', 40143, 15232); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160780, 'cpe:2.3:a:cantemo:portal:1.6.1:*:*:*:*:*:*:*', 6591, 15232); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158730, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.1:*:*:*:*:wordpress:*:*', 40143, 263171); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158753, 'cpe:2.3:a:calderalabs:caldera_forms:1.4.9:*:*:*:*:wordpress:*:*', 40143, 19467646); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159564, 'cpe:2.3:a:call_project:call:5.0.3:*:*:*:*:node.js:*:*', 50021, 1993); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160288, 'cpe:2.3:a:canonical:screen-resolution-extra:0.17.2:*:*:*:*:*:*:*', 20819, 19295009); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (170001, 'cpe:2.3:a:canonical:screen-resolution-extra:15.0.0:*:*:*:*:*:*:*', 20819, 30001); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158700, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.9:*:*:*:*:wordpress:*:*', 40143, 263333); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158715, 'cpe:2.3:a:calderalabs:caldera_forms:1.1.9.4:*:*:*:*:wordpress:*:*', 40143, 10206536); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160853, 'cpe:2.3:a:cantemo:portal:3.1.7:*:*:*:*:*:*:*', 6591, 19468627); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158699, 'cpe:2.3:a:calderalabs:caldera_forms:1.0.91:*:*:*:*:wordpress:*:*', 40143, 19258660); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159588, 'cpe:2.3:a:campaign_monitor_project:campaign_monitor:7.x-1.0:*:*:*:*:drupal:*:*', 44876, 19459307); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158769, 'cpe:2.3:a:calderalabs:caldera_forms:1.5.5:*:*:*:*:wordpress:*:*', 40143, 8660478); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160776, 'cpe:2.3:a:cantemo:portal:1.5.5:*:*:*:*:*:*:*', 6591, 8660478); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157095, 'cpe:2.3:a:c2fo:comb:1.1.0:*:*:*:*:node.js:*:*', 4772, 264339); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157208, 'cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.1.0:*:*:*:*:node.js:*:*', 6930, 264339); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (159781, 'cpe:2.3:a:candlepinproject:candlepin:0.6.3:*:*:*:*:*:*:*', 23153, 10907584); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (157086, 'cpe:2.3:a:c2fo:comb:0.3.2:*:*:*:*:node.js:*:*', 4772, 255921); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (158732, 'cpe:2.3:a:calderalabs:caldera_forms:1.3.2:*:*:*:*:wordpress:*:*', 40143, 252611); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160867, 'cpe:2.3:a:cantemo:portal:3.2.7:*:*:*:*:*:*:*', 6591, 19532454); -INSERT INTO "cpes" ("id", "cpe", "short_cpe_id", "version_id") VALUES (160200, 'cpe:2.3:a:canonical:metal_as_a_service:1.9.1:*:*:*:*:*:*:*', 54486, 19322787); \ No newline at end of file +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.2:*:*:*:*:wordpress:*:*', 40143, 13284); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.6:*:*:*:*:wordpress:*:*', 40143, 263168); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.5:*:*:*:*:*:*:*', 6591, 5811416); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9:*:*:*:*:wordpress:*:*', 40143, 19500087); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.5:*:*:*:*:wordpress:*:*', 40143, 13093993); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.8:*:*:*:*:wordpress:*:*', 40143, 13819035); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.3:*:*:*:*:*:*:*', 54486, 19501262); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.7.2:*:*:*:*:*:*:*', 23153, 14948); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.5:*:*:*:*:wordpress:*:*', 40143, 13146); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.4:*:*:*:*:*:*:*', 6591, 252221); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.2.0:*:*:*:*:rust:*:*', 54546, 265155); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.1:*:*:*:*:*:*:*', 6591, 253031); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.6.2:*:*:*:*:rust:*:*', 54546, 19491698); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.1:*:*:*:*:*:*:*', 6591, 263095); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:3.0.1:*:*:*:*:node.js:*:*', 50021, 263095); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.2:*:*:*:*:wordpress:*:*', 8270, 264642); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.2:*:*:*:*:*:*:*', 32816, 264642); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.0.2:*:*:*:*:wordpress:*:*', 40143, 19462820); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.7:*:*:*:*:*:*:*', 6591, 8917); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.11:*:*:*:*:*:*:*', 6591, 13949); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.6:*:*:*:*:*:*:*', 6591, 19491044); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.8:*:*:*:*:*:*:*', 6591, 19468446); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.4:*:*:*:*:*:*:*', 6591, 13571); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.6.2:*:*:*:*:wordpress:*:*', 40143, 14251660); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.1:*:*:*:*:wordpress:*:*', 40143, 264337); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.1.2:*:*:*:*:wordpress:*:*', 40143, 6703009); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.8:*:*:*:*:wordpress:*:*', 40143, 251751); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.3:*:*:*:*:*:*:*', 6591, 19533308); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.7:*:*:*:*:node.js:*:*', 4772, 19487480); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.4:*:*:*:*:*:*:*', 54486, 254033); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:5.0.1:*:*:*:*:node.js:*:*', 50021, 1794); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.13:*:*:*:*:*:*:*', 6591, 14250461); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.2:*:*:*:*:node.js:*:*', 4772, 264721); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:1.0.1:*:*:*:*:node.js:*:*', 4772, 265154); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.1:*:*:*:*:node.js:*:*', 6930, 265154); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.7:*:*:*:*:*:*:*', 6591, 6544148); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.5:*:*:*:*:node.js:*:*', 4772, 6155011); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.12:*:*:*:*:*:*:*', 6591, 19480103); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:1.0.0:*:*:*:*:node.js:*:*', 50021, 265153); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:1.0.0:*:*:*:*:node.js:*:*', 4772, 265153); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.5:*:*:*:*:*:*:*', 6591, 15145); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.0:*:*:*:*:node.js:*:*', 6930, 265153); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.2:*:*:*:*:*:*:*', 6591, 244660); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.5:*:*:*:*:*:*:*', 32816, 13616284); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.4.11:*:*:*:*:*:*:*', 23153, 19485263); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.5.3:*:*:*:*:wordpress:*:*', 40143, 10499956); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.2:*:*:*:*:*:*:*', 6591, 19525948); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.0:*:*:*:*:wordpress:*:*', 40143, 264339); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.6:*:*:*:*:*:*:*', 6591, 8878); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.5:*:*:*:*:*:*:*', 6591, 262138); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.3:*:*:*:*:wordpress:*:*', 40143, 13877853); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.3:*:*:*:*:wordpress:*:*', 40143, 265149); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.2:*:*:*:*:wordpress:*:*', 40143, 13934859); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.4.1:*:*:*:*:rust:*:*', 54546, 262603); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.4.1:*:*:*:*:node.js:*:*', 4772, 262603); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.4.2:*:*:*:*:rust:*:*', 54546, 247658); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.22.0:*:*:*:*:rust:*:*', 54546, 5127876); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.8:*:*:*:*:node.js:*:*', 4772, 15211); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.5:*:*:*:*:*:*:*', 6591, 9154); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.5:*:*:*:*:*:*:*', 54486, 19299214); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:2.1:*:*:*:*:*:*:*', 32816, 12690234); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.5:*:*:*:*:wordpress:*:*', 40143, 1999301); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.4.1:*:*:*:*:wordpress:*:*', 40143, 19478045); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.2:*:*:*:*:*:*:*', 6591, 251178); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.7:*:*:*:*:*:*:*', 6591, 257434); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.0:*:*:*:*:*:*:*', 6591, 251179); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.2:*:*:*:*:*:*:*', 6591, 14619); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.5.5:*:*:*:*:*:*:*', 23153, 19487460); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.12:*:*:*:*:*:*:*', 6591, 13961); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.6:*:*:*:*:node.js:*:*', 4772, 263449); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.5:*:*:*:*:node.js:*:*', 4772, 252546); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:ubuntu-core-launcher:1.0.27:*:*:*:*:*:*:*', 4970, 19475780); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.2:*:*:*:*:*:*:*', 6591, 252703); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.5:*:*:*:*:wordpress:*:*', 40143, 14540); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.142.23.1:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.150:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.4:*:*:*:*:node.js:*:*', 4772, 15000); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.10:*:*:*:*:*:*:*', 6591, 19480292); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.4:*:*:*:*:wordpress:*:*', 40143, 13279); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.10:*:*:*:*:node.js:*:*', 4772, 19487577); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.2:*:*:*:*:*:*:*', 6591, 263539); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.1:*:*:*:*:wordpress:*:*', 40143, 19487278); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.0:*:*:*:*:*:*:*', 6591, 264251); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.1:*:*:*:*:wordpress:*:*', 40143, 15231); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.1:*:*:*:*:*:*:*', 6591, 15231); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.8:*:*:*:*:node.js:*:*', 4772, 264714); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.4:*:*:*:*:*:*:*', 6591, 8723); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.11:*:*:*:*:node.js:*:*', 4772, 5482104); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.9.0:*:*:*:*:rust:*:*', 54546, 14944); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.10:*:*:*:*:*:*:*', 6591, 16550345); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.0.1:*:*:*:*:wordpress:*:*', 40143, 19462818); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.3:*:*:*:*:*:*:*', 32816, 264113); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.3:*:*:*:*:wordpress:*:*', 8270, 264113); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.8.1:*:*:*:*:rust:*:*', 54546, 249774); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.6:*:*:*:*:*:*:*', 6591, 19497916); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.3:*:*:*:*:*:*:*', 6591, 251176); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.2.2:*:*:*:*:wordpress:*:*', 40143, 258303); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.6.1:*:*:*:*:*:*:*', 6591, 6357014); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.8:*:*:*:*:*:*:*', 6591, 13940); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.3:*:*:*:*:*:*:*', 6591, 15029); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.0:*:*:*:*:*:*:*', 6591, 264098); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0:*:*:*:*:wordpress:*:*', 40143, 264098); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.2:*:*:*:*:*:*:*', 6591, 13284); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.14.0:*:*:*:*:rust:*:*', 54546, 7405670); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.2.0:*:*:*:*:wordpress:*:*', 40143, 263438); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.5:*:*:*:*:*:*:*', 6591, 15003); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.8:*:*:*:*:wordpress:*:*', 40143, 7083951); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.2.1:*:*:*:*:wordpress:*:*', 40143, 19491331); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.8:*:*:*:*:*:*:*', 6591, 9540297); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.4:*:*:*:*:*:*:*', 6591, 14621); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:selinux:1\:0.10:*:*:*:*:*:*:*', 48168, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.10:*:*:*:*:wordpress:*:*', 40143, 13117909); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.11:*:*:*:*:*:*:*', 6591, 12192601); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.4:*:*:*:*:wordpress:*:*', 40143, 19490036); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.4.0:*:*:*:*:*:*:*', 6591, 260652); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.0:*:*:*:*:wordpress:*:*', 40143, 260652); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:checkinstall:1.6.2:*:*:*:*:*:*:*', 17559, 261941); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.6.2:*:*:*:*:wordpress:*:*', 40143, 261941); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.2:*:*:*:*:*:*:*', 6591, 261941); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.9:*:*:*:*:*:*:*', 6591, 13904); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.0:*:*:*:*:node.js:*:*', 4772, 265155); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.0:*:*:*:*:*:*:*', 6591, 251181); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.2.3:*:*:*:*:rust:*:*', 54546, 253139); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.0:*:*:*:*:*:*:*', 6591, 257513); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.5:*:*:*:*:wordpress:*:*', 40143, 264114); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.5:*:*:*:*:*:*:*', 6591, 254832); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.6:*:*:*:*:node.js:*:*', 4772, 6138488); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.0:*:*:*:*:*:*:*', 6591, 243167); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.4.5:*:*:*:*:*:*:*', 23153, 12797296); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.9:*:*:*:*:*:*:*', 6591, 19481914); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.5.2:*:*:*:*:wordpress:*:*', 40143, 17151752); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.3:*:*:*:*:*:*:*', 6591, 19508585); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calendarscripts:konnichiwa:0.8.3:*:*:*:*:wordpress:*:*', 31044, 5670099); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.5:*:*:*:*:node.js:*:*', 4772, 14796); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:4.0.0:*:*:*:*:*:*:*', 6591, 252612); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:4.0.0:*:*:*:*:node.js:*:*', 50021, 252612); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:3.0.3:*:*:*:*:node.js:*:*', 50021, 1394); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.3:*:*:*:*:*:*:*', 6591, 1394); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.4:*:*:*:*:*:*:*', 6591, 15028); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.5.1:*:*:*:*:wordpress:*:*', 40143, 9909761); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.4.0:*:*:*:*:node.js:*:*', 4772, 249755); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.5:*:*:*:*:*:*:*', 6591, 19541079); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.3.1:*:*:*:*:wordpress:*:*', 40143, 19469911); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.6:*:*:*:*:*:*:*', 6591, 250722); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.6:*:*:*:*:*:*:*', 32816, 19532572); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.21.0:*:*:*:*:rust:*:*', 54546, 5128616); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.9:*:*:*:*:wordpress:*:*', 40143, 8912914); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:5.0.2:*:*:*:*:node.js:*:*', 50021, 15193); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.1:*:*:*:*:*:*:*', 6591, 264996); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.17.0:*:*:*:*:rust:*:*', 54546, 6895007); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.9:*:*:*:*:node.js:*:*', 4772, 19487481); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha4:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.3:*:*:*:*:*:*:*', 6591, 9113); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.5.1:*:*:*:*:wordpress:*:*', 40143, 19532557); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.2:*:*:*:*:wordpress:*:*', 40143, 257682); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.6:*:*:*:*:*:*:*', 6591, 5617453); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.8:*:*:*:*:node.js:*:*', 4772, 19487482); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.5:*:*:*:*:wordpress:*:*', 40143, 7892814); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.10.0:*:*:*:*:rust:*:*', 54546, 249772); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.2.1:*:*:*:*:wordpress:*:*', 40143, 264897); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.0:*:*:*:*:wordpress:*:*', 40143, 264338); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.3.1:*:*:*:*:wordpress:*:*', 40143, 19462971); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.3.1:*:*:*:*:rust:*:*', 54546, 252261); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.1:*:*:*:*:node.js:*:*', 4772, 252261); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.4:*:*:*:*:node.js:*:*', 4772, 252547); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.2:*:*:*:*:wordpress:*:*', 40143, 22072); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.4:*:*:*:*:*:*:*', 6591, 2683); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:3.0.4:*:*:*:*:node.js:*:*', 50021, 252066); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:capstone-engine:capstone:3.0.4:*:*:*:*:*:*:*', 8296, 252066); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.4:*:*:*:*:*:*:*', 6591, 252066); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.4:*:*:*:*:node.js:*:*', 4772, 252638); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.3:*:*:*:*:wordpress:*:*', 40143, 249058); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.10:*:*:*:*:node.js:*:*', 4772, 11466378); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.7:*:*:*:*:*:*:*', 6591, 13967); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.0:*:*:*:*:*:*:*', 6591, 15264); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.10:*:*:*:*:*:*:*', 6591, 13943); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.7:*:*:*:*:*:*:*', 6591, 8873); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.2.3:*:*:*:*:wordpress:*:*', 40143, 247848); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.3:*:*:*:*:node.js:*:*', 4772, 264643); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.7.1:*:*:*:*:wordpress:*:*', 40143, 19469924); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.9:*:*:*:*:node.js:*:*', 4772, 233375); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:2.0.2:*:*:*:*:node.js:*:*', 50021, 262155); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.2:*:*:*:*:*:*:*', 6591, 262155); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.3:*:*:*:*:*:*:*', 6591, 252640); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.3:*:*:*:*:*:*:*', 6591, 249253); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.4:*:*:*:*:*:*:*', 32816, 19487001); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.3:*:*:*:*:wordpress:*:*', 40143, 11418); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.6.1:*:*:*:*:rust:*:*', 54546, 256416); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.1:*:*:*:*:wordpress:*:*', 8270, 263265); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.6:*:*:*:*:wordpress:*:*', 40143, 13517); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.2:*:*:*:*:*:*:*', 6591, 19491083); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.3:*:*:*:*:wordpress:*:*', 40143, 10817733); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.6:*:*:*:*:wordpress:*:*', 40143, 19291862); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.6:*:*:*:*:*:*:*', 6591, 19291862); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.2:*:*:*:*:*:*:*', 6591, 1365); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.10:*:*:*:*:wordpress:*:*', 40143, 10429338); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.7.0:*:*:*:*:rust:*:*', 54546, 264249); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:0.8:*:*:*:*:*:*:*', 32816, 244764); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.6.1.1:*:*:*:*:wordpress:*:*', 40143, 19490475); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.0:*:*:*:*:*:*:*', 6591, 263437); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.6.0:*:*:*:*:wordpress:*:*', 40143, 263437); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.5.0:*:*:*:*:rust:*:*', 54546, 252454); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.3:*:*:*:*:node.js:*:*', 4772, 253139); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.0:*:*:*:*:*:*:*', 6591, 262607); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.1:*:*:*:*:*:*:*', 32816, 263265); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:3.0.2:*:*:*:*:node.js:*:*', 50021, 19491083); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.4:*:*:*:*:node.js:*:*', 4772, 15235); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.2.4:*:*:*:*:rust:*:*', 54546, 15235); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.6:*:*:*:*:*:*:*', 6591, 9111); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:0.7:*:*:*:*:*:*:*', 32816, 5835723); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.10:*:*:*:*:*:*:*', 6591, 19324110); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.8:*:*:*:*:*:*:*', 6591, 8720); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.3:*:*:*:*:node.js:*:*', 4772, 19487573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.9:*:*:*:*:*:*:*', 6591, 19518492); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.1-3:*:*:*:*:wordpress:*:*', 40143, 13695671); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.9:*:*:*:*:*:*:*', 6591, 19480553); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.9:*:*:*:*:wordpress:*:*', 40143, 19460749); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.3:*:*:*:*:*:*:*', 6591, 10817733); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.87.31.1:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.6.0:*:*:*:*:rust:*:*', 54546, 248486); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:2.0:*:*:*:*:*:*:*', 32816, 19494556); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.0:*:*:*:*:wordpress:*:*', 40143, 265153); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:ubuntu_download_manager:-:*:*:*:*:*:*:*', 48783, 19513403); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:-:*:*:*:*:*:*:*', 23153, 19513403); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.3:*:*:*:*:*:*:*', 6591, 252815); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.4:*:*:*:*:wordpress:*:*', 40143, 10522622); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.2:*:*:*:*:*:*:*', 6591, 13150); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.7:*:*:*:*:*:*:*', 6591, 17890); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.12:*:*:*:*:*:*:*', 6591, 11647042); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.7:*:*:*:*:wordpress:*:*', 40143, 19478693); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.8:*:*:*:*:*:*:*', 6591, 19468629); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.4:*:*:*:*:*:*:*', 6591, 14946); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.8:*:*:*:*:*:*:*', 6591, 19323850); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.3:*:*:*:*:wordpress:*:*', 40143, 256715); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.4:*:*:*:*:wordpress:*:*', 40143, 14946); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.4.2:*:*:*:*:wordpress:*:*', 40143, 6277397); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.1.0:*:*:*:*:rust:*:*', 54546, 265156); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.0:*:*:*:*:node.js:*:*', 4772, 265156); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:2.0.1:*:*:*:*:node.js:*:*', 50021, 265075); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.1:*:*:*:*:*:*:*', 6591, 265075); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:lxd:2.0.1:*:*:*:*:*:*:*', 36858, 265075); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.4:*:*:*:*:*:*:*', 6591, 19500948); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.6:*:*:*:*:node.js:*:*', 4772, 14867); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.7:*:*:*:*:wordpress:*:*', 40143, 252657); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.8:*:*:*:*:*:*:*', 6591, 14268199); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.8:*:*:*:*:wordpress:*:*', 40143, 10371); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.7:*:*:*:*:*:*:*', 6591, 19531474); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.7:*:*:*:*:node.js:*:*', 4772, 15188); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.7:*:*:*:*:wordpress:*:*', 40143, 19531474); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.3:*:*:*:*:node.js:*:*', 4772, 250884); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.6:*:*:*:*:wordpress:*:*', 40143, 8474638); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calmquist.static-server_project:calmquist.static-server:0.1.1:*:*:*:*:node.js:*:*', 24723, 265151); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.1:*:*:*:*:node.js:*:*', 4772, 265151); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.2.2:*:*:*:*:rust:*:*', 54546, 263698); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.2:*:*:*:*:node.js:*:*', 4772, 263698); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.3:*:*:*:*:*:*:*', 6591, 263699); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.8.0:*:*:*:*:rust:*:*', 54546, 15081); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.4:*:*:*:*:*:*:*', 6591, 12448282); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.15.0:*:*:*:*:rust:*:*', 54546, 15050); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.0.0:*:*:*:*:*:*:*', 6591, 265076); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:2.0.0:*:*:*:*:node.js:*:*', 50021, 265076); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:2.0.0:*:*:*:*:node.js:*:*', 4772, 265076); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.6:*:*:*:*:node.js:*:*', 4772, 6140300); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.6:*:*:*:*:*:*:*', 6591, 8889); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.1:*:*:*:*:*:*:*', 6591, 237532); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.13.1:*:*:*:*:rust:*:*', 54546, 264231); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.18.0:*:*:*:*:rust:*:*', 54546, 11098064); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c97:cart_engine:3.0:*:*:*:*:*:*:*', 40676, 1795); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:0.9:*:*:*:*:*:*:*', 32816, 19487340); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.1:*:*:*:*:*:*:*', 6591, 263266); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.3.5:*:*:*:*:*:*:*', 6591, 15302); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.5:*:*:*:*:*:*:*', 6591, 8918); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.0:*:*:*:*:*:*:*', 6591, 2025); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.3.0:*:*:*:*:rust:*:*', 54546, 252814); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.0:*:*:*:*:node.js:*:*', 4772, 252814); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.6.1:*:*:*:*:wordpress:*:*', 40143, 13917822); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.8:*:*:*:*:wordpress:*:*', 40143, 252983); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.2.1:*:*:*:*:wordpress:*:*', 40143, 19465563); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.3:*:*:*:*:*:*:*', 6591, 19486979); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.6.3:*:*:*:*:wordpress:*:*', 40143, 19486979); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.6:*:*:*:*:*:*:*', 6591, 14489); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.2:*:*:*:*:*:*:*', 54486, 14051023); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.142.19:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.0:*:*:*:*:*:*:*', 6591, 265074); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.4.0:*:*:*:*:rust:*:*', 54546, 249755); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.87.24:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:beta2:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.3.1:*:*:*:*:wordpress:*:*', 40143, 19471530); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.1:*:*:*:*:wordpress:*:*', 40143, 265154); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.134.7:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.152.25.5:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.134.11.1:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.152.25:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:update-manager:1\:0.150.5.1:*:*:*:*:*:*:*', 11798, null); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.8:*:*:*:*:wordpress:*:*', 40143, 10333707); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.4:*:*:*:*:*:*:*', 6591, 19502604); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.9:*:*:*:*:node.js:*:*', 4772, 14302); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.1.5:*:*:*:*:*:*:*', 6591, 15189); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.5:*:*:*:*:*:*:*', 6591, 14400); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.11.0:*:*:*:*:rust:*:*', 54546, 252639); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.9:*:*:*:*:*:*:*', 6591, 19484821); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.4:*:*:*:*:*:*:*', 6591, 8481); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.4:*:*:*:*:wordpress:*:*', 40143, 265152); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.14.1:*:*:*:*:rust:*:*', 54546, 8952136); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.4.4:*:*:*:*:rust:*:*', 54546, 7256833); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.4.1:*:*:*:*:*:*:*', 6591, 11379260); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc1:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:beta1:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha2:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc4:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha3:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha1:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:-:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc2:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:rc3:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.0:alpha5:*:*:*:*:*:*', 54486, 215573); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.21.1:*:*:*:*:rust:*:*', 54546, 19491213); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.16.0:*:*:*:*:rust:*:*', 54546, 3720103); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.13.0:*:*:*:*:rust:*:*', 54546, 14943); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.19.0:*:*:*:*:rust:*:*', 54546, 19269674); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.10:*:*:*:*:wordpress:*:*', 40143, 19529343); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.12.0:*:*:*:*:rust:*:*', 54546, 241746); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.0.7:*:*:*:*:node.js:*:*', 4772, 14797); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.7:*:*:*:*:wordpress:*:*', 40143, 11283815); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:5.0.0:*:*:*:*:node.js:*:*', 50021, 252059); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.7:*:*:*:*:wordpress:*:*', 40143, 253846); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.6:*:*:*:*:*:*:*', 6591, 19484820); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:4.0.1:*:*:*:*:node.js:*:*', 50021, 1998); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.4.3:*:*:*:*:rust:*:*', 54546, 14945); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.20.0:*:*:*:*:rust:*:*', 54546, 7818861); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.1:*:*:*:*:wordpress:*:*', 40143, 264115); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.4.1:*:*:*:*:*:*:*', 6591, 264115); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.1.2:*:*:*:*:node.js:*:*', 4772, 263169); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.7:*:*:*:*:wordpress:*:*', 40143, 8795532); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:4.0.2:*:*:*:*:node.js:*:*', 50021, 12882); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.9:*:*:*:*:*:*:*', 6591, 19503485); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.2:*:*:*:*:wordpress:*:*', 40143, 265150); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.0.2:*:*:*:*:node.js:*:*', 6930, 265150); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.4.1:*:*:*:*:wordpress:*:*', 40143, 5600056); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.6:*:*:*:*:*:*:*', 6591, 19501164); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.6:*:*:*:*:wordpress:*:*', 40143, 7235805); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.4.1:*:*:*:*:*:*:*', 6591, 15337); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.0.9:*:*:*:*:wordpress:*:*', 40143, 11562873); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:3.0.0:*:*:*:*:node.js:*:*', 50021, 265074); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.15.1:*:*:*:*:rust:*:*', 54546, 19487206); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.2.1:*:*:*:*:*:*:*', 6591, 19487479); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.2.1:*:*:*:*:rust:*:*', 54546, 264557); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.1:*:*:*:*:node.js:*:*', 4772, 264557); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:0.5:*:*:*:*:*:*:*', 32816, 19487504); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.2.5:*:*:*:*:node.js:*:*', 4772, 14851); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.1:*:*:*:*:*:*:*', 6591, 13152); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candidate-application-form_project:candidate-application-form:1.0:*:*:*:*:wordpress:*:*', 8270, 265157); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:1.0:*:*:*:*:*:*:*', 32816, 265157); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.4.27:*:*:*:*:*:*:*', 23153, 19295050); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.6:*:*:*:*:wordpress:*:*', 40143, 14744); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cambridge_enterprise:jbig-kit:0.6:*:*:*:*:*:*:*', 32816, 252413); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:2.3.11:*:*:*:*:*:*:*', 6591, 9123); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached_project:cached:0.23.0:*:*:*:*:rust:*:*', 54546, 12136986); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:1.2.0:*:*:*:*:node.js:*:*', 4772, 263438); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.0.13:*:*:*:*:*:*:*', 6591, 13966); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.6.1:*:*:*:*:wordpress:*:*', 40143, 15232); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.6.1:*:*:*:*:*:*:*', 6591, 15232); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.1:*:*:*:*:wordpress:*:*', 40143, 263171); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.4.9:*:*:*:*:wordpress:*:*', 40143, 19467646); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:call_project:call:5.0.3:*:*:*:*:node.js:*:*', 50021, 1993); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:screen-resolution-extra:0.17.2:*:*:*:*:*:*:*', 20819, 19295009); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:screen-resolution-extra:15.0.0:*:*:*:*:*:*:*', 20819, 30001); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.9:*:*:*:*:wordpress:*:*', 40143, 263333); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.1.9.4:*:*:*:*:wordpress:*:*', 40143, 10206536); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.1.7:*:*:*:*:*:*:*', 6591, 19468627); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.0.91:*:*:*:*:wordpress:*:*', 40143, 19258660); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:campaign_monitor_project:campaign_monitor:7.x-1.0:*:*:*:*:drupal:*:*', 44876, 19459307); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.5.5:*:*:*:*:wordpress:*:*', 40143, 8660478); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:1.5.5:*:*:*:*:*:*:*', 6591, 8660478); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:1.1.0:*:*:*:*:node.js:*:*', 4772, 264339); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cached-path-relative_project:cached-path-relative:1.1.0:*:*:*:*:node.js:*:*', 6930, 264339); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:candlepinproject:candlepin:0.6.3:*:*:*:*:*:*:*', 23153, 10907584); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:c2fo:comb:0.3.2:*:*:*:*:node.js:*:*', 4772, 255921); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:calderalabs:caldera_forms:1.3.2:*:*:*:*:wordpress:*:*', 40143, 252611); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:cantemo:portal:3.2.7:*:*:*:*:*:*:*', 6591, 19532454); +INSERT INTO cpes (cpe, short_cpe_id, version_id) VALUES ('cpe:2.3:a:canonical:metal_as_a_service:1.9.1:*:*:*:*:*:*:*', 54486, 19322787); diff --git a/pkg/models/tests/cpe_cve.sql b/pkg/models/tests/cpe_cve.sql deleted file mode 100644 index f80c0fa..0000000 --- a/pkg/models/tests/cpe_cve.sql +++ /dev/null @@ -1,362 +0,0 @@ -DROP TABLE IF EXISTS cpe_cve; -CREATE TABLE "cpe_cve" ( - "cpe_id" INTEGER NOT NULL, - "cve_id" INTEGER NOT NULL, - PRIMARY KEY("cpe_id","cve_id") -); - -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157053, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157054, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157055, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157056, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157057, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157058, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157059, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157060, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157061, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157062, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157063, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157064, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157065, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157066, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157067, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157068, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157069, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157070, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157071, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157072, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157073, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157074, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157075, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157076, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157077, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157078, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157079, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157080, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157081, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157082, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157083, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157084, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157085, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157086, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157087, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157088, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157089, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157090, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157091, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157092, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157093, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157094, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157095, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157096, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157097, 155978); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157162, 68981); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157162, 68982); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157162, 68983); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157205, 108629); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157205, 155966); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157206, 108629); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157206, 155966); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (157207, 155966); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158690, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158691, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158692, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158693, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158694, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158695, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158696, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158697, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158698, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158699, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158700, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158701, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158702, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158703, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158704, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158705, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158706, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158707, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158708, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158709, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158710, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158711, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158712, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158713, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158714, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158715, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158716, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158717, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158718, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158719, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158720, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158721, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158722, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158723, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158724, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158725, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158726, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158727, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158728, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158729, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158730, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158731, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158732, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158733, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158734, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158735, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158736, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158737, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158738, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158739, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158740, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158741, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158742, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158743, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158744, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158745, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158746, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158747, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158748, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158749, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158750, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158751, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158752, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158753, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158754, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158755, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158756, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158757, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158758, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158759, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158760, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158761, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158762, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158763, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158764, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158765, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158766, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158767, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158768, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158769, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158770, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158771, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158772, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158773, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158774, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158775, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (158776, 116241); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159551, 79792); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159552, 79792); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159553, 79792); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159554, 79792); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159572, 93681); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159574, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159575, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159576, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159577, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159578, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159579, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159580, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159581, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159582, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159583, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159584, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159585, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159586, 61182); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159588, 73992); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159772, 71233); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159776, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159776, 74684); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159777, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159778, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159779, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159780, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159781, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (159782, 55512); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160099, 142125); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160187, 80810); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160187, 80811); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160188, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160188, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160188, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160188, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160189, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160189, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160189, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160189, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160190, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160190, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160190, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160190, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160191, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160191, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160191, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160191, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160192, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160192, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160192, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160192, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160193, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160193, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160193, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160193, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160194, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160194, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160194, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160194, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160195, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160195, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160195, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160195, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160196, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160196, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160196, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160196, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160197, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160197, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160197, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160197, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160198, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160198, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160198, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160198, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160199, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160199, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160199, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160199, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160200, 63264); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160200, 63265); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160200, 63266); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160200, 71530); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160288, 117075); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160587, 80809); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160588, 80808); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160595, 48612); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160595, 48614); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160596, 48612); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160596, 48614); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160598, 48612); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160598, 48614); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160600, 48612); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160600, 48614); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160602, 48612); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160602, 48614); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160769, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160770, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160771, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160772, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160773, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160774, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160775, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160776, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160777, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160778, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160779, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160780, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160781, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160782, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160783, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160784, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160785, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160786, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160787, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160788, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160789, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160790, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160791, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160792, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160793, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160794, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160795, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160796, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160797, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160798, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160799, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160800, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160801, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160802, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160803, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160804, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160805, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160806, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160807, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160808, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160809, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160810, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160811, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160812, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160813, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160814, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160815, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160816, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160817, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160818, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160819, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160820, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160821, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160822, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160823, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160824, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160825, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160826, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160827, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160828, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160829, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160830, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160831, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160832, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160833, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160834, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160835, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160836, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160837, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160838, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160839, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160840, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160841, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160842, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160843, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160844, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160845, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160846, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160847, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160848, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160849, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160850, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160851, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160852, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160853, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160854, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160855, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160856, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160857, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160858, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160859, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160860, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160862, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160863, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160864, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160865, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160866, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160867, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160868, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160869, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160870, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160871, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160872, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160873, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160874, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160875, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160876, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160877, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160879, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160880, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160881, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160882, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160883, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160884, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160885, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160886, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (160887, 131065); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (161218, 85525); -INSERT INTO cpe_cve ("cpe_id", "cve_id") VALUES (161218, 99297); diff --git a/pkg/models/tests/cve.sql b/pkg/models/tests/cve.sql index 224ac29..de26f34 100644 --- a/pkg/models/tests/cve.sql +++ b/pkg/models/tests/cve.sql @@ -1,40 +1,30 @@ -DROP TABLE IF EXISTS cve; -CREATE TABLE "cves" ( - "id" INTEGER, - "cve" TEXT NOT NULL UNIQUE , - "severity" TEXT, - "published" DATETIME , - "summary" TEXT(500), - "modified" DATETIME, - "match_criteria_ids" TEXT(500), - PRIMARY KEY ("id") -); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (48612, 'CVE-2017-9302', 'MEDIUM', '2017-05-29', '2024-11-21', 'RealPlayer 16.0.2.32 allows remote attackers to cause a denial of service (divide-by-zero error and ...', '{7A5620A0-8DAF-4FE6-8955-FA4B96ACF955}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (48614, 'CVE-2015-0269', 'MEDIUM', '2017-05-26', '2024-11-21', 'Directory traversal vulnerability in Contao before 3.2.19, and 3.4.x before 3.4.4 allows remote auth...', '{4F2A2A58-FA38-4930-86E3-07239AC98EE6,560647AE-9AA0-4A9F-AF6C-81CA20C4B120,E2D73046-F8FE-489F-850D-C01A2F20064C,102364AF-FC62-40D0-8318-EA2530D68F9D,342AC8F9-0F65-4901-AD0B-BFDA4EB57122,A753375D-F536-49B5-9476-F1C6D86BDCCA}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (55512, 'CVE-2001-0128', 'HIGH', '2001-03-12', '2024-11-20', 'Zope before 2.2.4 does not properly compute local roles, which could allow users to bypass specified...', '{BAEE3A85-0A4C-4763-A141-AC27ECFDC2AA,A5AE3BF4-237D-4D84-9753-512A642141A0,C50F9824-A12E-488E-A735-14696E11F847,0C7B8C8F-0A2D-4C55-9648-DA2B583EBA44,612AC3B1-8E55-437F-9600-67EA1A8BAD48,537A5C29-D770-4755-A6AB-8916754E14DB,E3AC05A9-04DA-4ED3-94D8-3254384CB724,DCE4BBA3-7332-45EE-8C29-BE5A473B559D,58B90124-0543-4226-BFF4-13CCCBCCB243,32FCB0B3-8FBE-49FA-B17E-0D5462C9E5B4,3EC1FF5D-5EAB-44D5-B281-770547C70D68,0A8FBD5A-2FD0-43CD-AC4B-1D6984D336FE,2EC4D3AB-38FA-4D44-AF5C-2DCD15994E76,0633B5A6-7A88-4A96-9462-4C09D124ED36,29B186E5-7C2F-466E-AA4A-8F2B618F8A14}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (61182, 'CVE-2010-3773', 'MEDIUM', '2010-12-10', '2024-11-21', 'Mozilla Firefox before 3.5.16 and 3.6.x before 3.6.13, and SeaMonkey before 2.0.11, when the XMLHttp...', '{F3782354-7EB7-49D2-B240-1871F6CB84C7,30D47263-03AD-4060-91E3-90F997B3D174,AFD775DF-277E-4D5B-B980-B8E6E782467D,C8587BFD-417D-42BE-A5F8-22FDC68FA9E6,D7364FAB-EEE9-4064-A8AD-6547239F9AB3,4C50485F-BC7B-4B70-A47B-1712E2DBAC5A,51EE386B-0833-484E-A2AB-86B4470D4D45,C3EF1B4D-6556-4B3C-BDD0-6348A4D4A91D,68C5C7CF-005B-42FC-B950-90303F0CC115,0B2FA2CF-7FE4-43B1-96A0-C14666EDBD7B,30290F6D-55CA-47EB-8F41-7BBB745C7A34,D6CD332E-490C-45B8-91BC-8A1DD1107F2E,09E18FC0-0C8C-4FA1-85B9-B868D00F002F,4A97B6E1-EABA-4977-A3FC-64DF0392AA95,CB01A97F-ACE1-4A99-8939-6DF8FE5B5E8E,6521C877-63C9-4B6E-9FC9-1263FFBB7950,D949DF0A-CBC2-40E1-AE6C-60E6F58D2481,3C5CDA57-1A50-4EDB-80E2-D3EBB44EA653,22D33486-4956-4E2C-BA16-FA269A9D02BD,3104343E-93B6-4D4A-BC95-ED9F7E91FB6A,381313EF-DF84-4F66-9962-DE8F45029D79,A0228476-14E4-443C-BBAE-2C9CD8594DC0,A803A500-DCE2-44FC-ABEB-A90A1D39D85C,022274DE-5251-49C9-B6E5-1D8CEDC34E7D,B9F84CB7-93F7-4912-BC87-497867B96491,8992E9C6-09B3-492E-B7DA-899D5238EC18,D58B704B-F06E-44C1-BBD1-A090D1E6583A,40270FBD-744A-49D9-9FFA-1DCD897210D7,20E01097-F60A-4FB2-BA47-84A267EE87D6,7F65732F-317B-49A2-B9B0-FA1102B8B45C,DB430F19-069A-43FD-9097-586D4449D327,76AD0439-3BFB-4AD1-8E2C-99D0B099FA8C,1E6D7528-E591-48A6-8165-BE42F8EBF6B6,BA710423-0075-44B8-9DCB-6380FA974486,C5521DA3-E6AF-4350-B971-10B4A1C9B1D1,DDD15752-A253-47B1-BCE0-B55B84B47C9F,60B39A9D-44A4-4D7F-9004-C44066BBE277,F203EC52-2126-4227-AF3B-23857E5BB222,E951567B-8402-42EA-AE33-EBA9235A868F,82A94198-7EBF-4D8A-A99A-A32A8561FF2F,1BFFBC58-ACD2-449D-B010-5026D6022F86,83EED5D2-EC40-4253-991B-0C746FBEF6A5,0F73092C-1458-4278-A30D-C0F89B1F82F6,AAB559BD-4BF7-417F-962F-B8971FF1614B,7B528A25-003F-4614-B55B-AF46B66EDB44,0078D890-6456-4F45-A3AE-B1A2BFAC6A4C,69DD17EC-99EB-46C1-98E9-16A2EDB8E224,F35F7EA1-8C98-4A3E-8767-89DBC26A32B9,EF89719E-C415-45A3-A1CC-FAFDFCAE3055,58EB8E8A-84DE-43AA-B8F0-B585FB73D724,C19C0BF7-390D-4E2E-BA32-28DFF73C55F6,5FE5E50C-80ED-4CA7-BC85-8BD2E324D527,FEBF912C-A12E-4DBD-84AC-8B440E190BCE,9B8EDED6-29EF-4A9F-955D-F5E6611C2141,EDC9C82D-586A-48F4-B540-1E2AE79806B3,51FCF83B-630A-4413-BFAA-0C24A6B8F4F4,84B2AA0A-0220-49DD-82CD-37FDC563F146,D754AF10-1E43-46C8-A444-E7DB3401509D,34182167-F1DF-455B-BFDB-0A8491590479,B8ECA6CE-20D0-4A4F-B376-888A9328B044,1FEFCAB0-E57A-46E8-94C7-8510BB87C6B2,9FB5C972-AF7B-4EC7-BCE5-867CACCF5C19,C68DBB31-7804-446E-9A53-073E4B74E851,31ADCC51-CE05-4EB6-BE8F-B64FD62946A1,387390AE-CF25-47ED-BD36-F42455DE1A4B,78D5F0AD-9974-40A1-942F-0F03A278DAD9,F368F41E-0371-4790-9197-61ED793022C8,7C7AA88B-638A-451A-B235-A1A1444BE417,9C01AD7C-8470-47AB-B8AE-670E3A381E89,7E43F2F1-9252-4B44-8A61-D05305915A5F,3BB9D48B-DC7B-4D92-BB26-B6DE629A2506,A360D595-A829-4DDE-932E-9995626917E5,6E9B5349-FAA7-4CDA-9533-1AD1ACDFAC4E,07243837-C353-4C25-A5B1-4DA32807E97D,B832C034-F793-415F-BFC8-D97A18BA6BC7,83CD1A13-66CB-49CC-BD84-5D8334DB774A,93C142C5-3A85-432B-80D6-2E7B1B4694F4,2434FCE7-A50B-4527-9970-C7224B31141C,5633FB6E-D623-49D4-9858-4E20E64DE458,429ECA02-DBCD-45FB-942C-CA4BC1BC8A72,B5F0DC80-5473-465C-9D7F-9589F1B78E12,567FF916-7DE0-403C-8528-7931A43E0D18,010B34F4-910E-4515-990B-8E72DF009578,8FAA1A89-E8D9-46D0-8E2C-9259920ACBFE,5A545A77-2198-4685-A87F-E0F2DAECECF6,438AACF8-006F-4522-853F-30DBBABD8C15,778FAE0C-A5CF-4B67-93A9-1A803E3E699F,E7447185-7509-449D-8907-F30A42CF7EB5,0EDBAC37-9D08-44D1-B279-BC6ACF126CAF,3FFF89FA-2020-43CC-BACD-D66117B3DD26,834BB391-5EB5-43A8-980A-D305EDAE6FA7,9A38AD88-BAA6-4FBE-885B-69E951BD1EFE,B500EE6C-99DB-49A3-A1F1-AFFD7FE28068,4F2938F2-A801-45E5-8E06-BE03DE03C8A7,F18A45C0-419C-4723-AB7D-5880EF668CE9,ABB88E86-6E83-4A59-9266-8B98AA91774D,E19ED1CA-DEBD-4786-BA7B-C122C7D2E5B7,66BE50FE-EA21-4633-A181-CD35196DF06E,7D6BF5B1-86D1-47FE-9D9C-735718F94874,84D15CE0-69DF-4EFD-801E-96A4D6AABEDB,CEE203DE-6C0E-4FDE-9C3A-0E73430F17DA,F2F38886-C25A-4C6B-93E7-36461405BA99,C65D2670-F37F-48CB-804A-D35BB1C27D9F,DE8E5194-7B34-4802-BDA6-6A86EB5EDE05,FABA5F56-99F7-4F8F-9CC1-5B0B2EB72922,2917BD67-CE81-4B94-B241-D4A9DDA60319,A524A94E-F19B-42B9-AA8E-171751C339AA,F71436CF-F756-44E0-8E69-6951F6B3E54A,582EE839-B83F-4908-9780-D0C92DC44FD0,824369CF-00A0-434E-94BC-71CA1317012C,BCB35099-B04E-4796-A25D-953329FE62F3,5DBEBCFD-80D6-466A-BAEF-C75E65A3B12E,C30ACBCA-4FA1-46DE-8F15-4830BC27E160,9453EF65-7C69-449E-BF7C-4FECFB56713E,4AA75825-21CF-475B-8040-126A13FA2216,CA97C80E-17FA-4866-86CE-29886145ED80,7DE24BED-202E-416D-B5F2-8207D97B9939,04198E04-CE1D-4A5A-A20C-D1E135B45F94,717DB967-F658-4699-A224-5B261BFEC10A,3487FA64-BE04-42CA-861E-3DAC097D7D32,F3D956DC-C73B-439F-8D79-8239207CC76F,57E2C7E7-56C0-466C-BB08-5EB43922C4F9,462E135A-5616-46CC-A9C0-5A7A0526ACC6,6121F9C1-F4DF-4AAB-9E51-AC1592AA5639,58D44634-A0B5-4F05-8983-B08D392EC742,EB3AC3D3-FDD7-489F-BDCF-BDB55DF33A8B,4105171B-9C90-4ABF-B220-A35E7BA9EE40,20985549-DB24-4B69-9D40-208A47AE658E,43A13026-416F-4308-8A1B-E989BD769E12,612B015E-9F96-4CE6-83E4-23848FD609E5,1E391619-0967-43E1-8CBC-4D54F72A85C2,0544D626-E269-4677-9B05-7DAB23BD103B,C95F7B2C-80FC-4DF2-9680-F74634DCE3E6,863C140E-DC15-4A88-AB8A-8AEF9F4B8164,38CD049A-5333-4FF7-AD34-6B74E19BADCB,0066576D-D66A-4B59-B5C3-471EEBEE8B9A,60ED6DAA-9194-4829-BC1A-00F04BE7930A,13BEB9A6-EFD5-4793-9603-84DB84F1CF7D,461163C6-4CA8-4BA9-95A1-136E612CBA6B,275E9D96-1290-44AB-BF9B-E9E4A803F593,412DF091-7604-4110-87A0-3488116A97E5,11E07FED-ABDB-4B0A-AB2E-4CBF1EAC4301,9A6558F1-9E0D-4107-909A-8EF4BC8A9C2F,63DF3D65-C992-44CF-89B4-893526C6242E,A9024117-2E8B-4240-9E21-CC501F3879B5,FBC3CAD3-2F54-4E32-A0C9-0D826C45AC23,52624B41-AB34-40AD-8709-D9646B618AB0,917E9856-9556-4FD6-A834-858F8837A6B4,98BBD74D-930C-4D80-A91B-0D61347BAA63,FAF2E696-883D-4DE5-8B79-D8E5D9470253,94E04FD9-38E8-462D-82C2-729F7F7F0465,5888517E-3C57-4A0A-9895-EA4BCB0A0ED5,0BB21291-B9F3-445E-A9E9-EA1822083DD3,D595F649-ECBE-45E0-8AAD-BCBC65A654B9,4FE6E920-9A4C-431B-89EA-683A22F15ACD,18B6CC9F-6295-4598-B28B-0CA19D1D9F45,C9F0434D-C84F-49FD-9F44-66D3ACD7B601,F6AAB416-E865-4EEE-8FCB-A91253BEB52B,76CD3BDF-A079-4EF3-ABDE-43CBDD08DB1F,031E8624-5161-43AF-AF19-6BAB5A94FDD8,54186D4A-C6F0-44AD-94FB-73B4346ABB6B,47E50AD9-BA35-4817-BD4D-5D678FC5A3C5,DD09DE40-8C9B-41EA-B372-9E4E4830E8F4,F223FB83-0EDB-4429-94B9-1AEEF314B73F,BC6B977F-292F-4981-95A0-6065A3C487D5,342226B9-2C0C-416C-81FE-19C49F03AA88,2A6A28E0-F67A-4275-B0D9-A02822E9EF7E,ECAB4696-76F3-458C-B33B-D7F8690C60A0,BBB444FD-15F3-4447-9EA8-1669779A5749,F92E2EF3-A612-476F-9D31-1EEC240C7EA7,0F175D30-2416-4172-BF11-DA78D252D608,5DD3F168-3EF4-492E-BBAA-EACB1357C709,4B46BA97-2860-45E4-9FD3-F418A202E4F0}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (63264, 'CVE-2018-10083', 'HIGH', '2018-04-13', '2024-11-21', 'CMS Made Simple (CMSMS) through 2.2.7 contains an arbitrary file deletion vulnerability in the admin...', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (63265, 'CVE-2018-10029', 'MEDIUM', '2018-04-11', '2024-11-21', 'CMS Made Simple (aka CMSMS) 2.2.7 has Reflected XSS in admin/moduleinterface.php via the m1_name par...', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (63266, 'CVE-2018-10030', 'HIGH', '2018-04-11', '2024-11-21', 'CMS Made Simple (aka CMSMS) 2.2.7 has CSRF in admin/siteprefs.php.', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (68981, 'CVE-2018-18887', 'CRITICAL', '2018-11-01', '2024-11-21', 'S-CMS PHP 1.0 has SQL injection in member/member_news.php via the type parameter (aka the $N_type fi...', '{4B6BD148-38BC-4577-8467-2333C2466F90}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (68982, 'CVE-2018-12243', 'HIGH', '2018-09-19', '2024-11-21', 'The Symantec Messaging Gateway product prior to 10.6.6 may be susceptible to a XML external entity (...', '{D25EDB76-F75D-4C5E-9122-EB4F520D569D}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (68983, 'CVE-2018-12242', 'CRITICAL', '2018-09-19', '2024-11-21', 'The Symantec Messaging Gateway product prior to 10.6.6 may be susceptible to an authentication bypas...', '{D25EDB76-F75D-4C5E-9122-EB4F520D569D}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (71233, 'CVE-2015-6175', 'HIGH', '2015-12-09', '2024-11-21', 'The kernel in Microsoft Windows 10 Gold allows local users to gain privileges via a crafted applicat...', '{542DAEEC-73CC-46C6-A630-BF474A3446AC}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (71530, 'CVE-2008-3104', 'MEDIUM', '2008-07-09', '2024-11-21', 'Multiple unspecified vulnerabilities in Sun Java Runtime Environment (JRE) in JDK and JRE 6 before U...', '{7E7CD268-A083-43B5-80B7-B7837202CF29,94A87B01-2F20-4E1C-8572-395A96C35D79,BC9476DD-9B56-4811-A248-711C25181F29,6BB00A29-FEBB-4139-9E96-691EC1410EFE,DD8CC179-F76E-4CC2-9CBD-69CBBA5BD532,C2DC7389-9697-4EF0-9C4E-153731CDD75D,C5F476C8-5466-4E6B-B73B-4ACFBB02AD5C,D8C7C8C1-AA0D-4BD9-A8EC-85BBE627DE13,BAF0844B-ECB1-4AF0-AA32-1B8789AC5042,25322D24-C5D9-43A6-87CC-1BF7FA6A3E76,400FDCDE-16DE-4BD6-81E2-4A5DA12E99CA,82C49C78-ACE3-407D-AE21-EA180633C437,5F91F8A2-D473-48DC-81DA-21291DE7B6E8,3E46B3B4-9E1C-4C87-A4CD-C4CE7FBCA7F6,0F69C703-8541-4AA8-A66A-0292E0FCB749,99E08AB2-49AD-42C6-967F-773F2C6E188A,9459F130-A3DD-4A4E-9582-4FB82619EB5A,9C9F6EA8-6A88-4485-89A3-0FDF84AB51DA,67E0818A-3675-4293-89FE-5001E36C0F38,95112B98-B6B2-43FA-BF76-F518649CF3BE,3A18341A-3688-48E7-95AD-283EC9C95B4A,E301C59A-47F5-4861-9091-D0002CBA5B7A,AAB87D43-2860-43DD-94EE-886D7D75A351,399B06AC-E101-48EE-A362-D75F7072FF5E,FD3AC618-7B66-4167-ABE5-87BE6907FB5A,2B0EAF17-18D3-45F2-9B6F-66BEC0F49FB6,5F861B32-B878-4DFC-A9D1-350B1013AA1F,5A469586-4106-48BB-BF92-8FFDC8AA4C44,89E95205-DB64-44AD-81A4-B77BD7595AAF,62E772B9-8E41-476F-81F5-87B41F1827A1,7CE78463-2CE8-43C6-BB06-AA40C72B1A4F,31A04480-92DF-49AD-9B36-7F1FCB29DE90,E2FD0B72-683D-4FF6-BCF5-5DE85BF3064B,F78CD4B5-4B1D-4128-8AEA-2F967C38C6C4,62CAA3E7-9D65-48F3-ACF7-9D705D94DE54,477C310B-50AD-4D40-8EDB-4A80F0BF321D,60A1F526-6B28-47A3-8D2C-06CA067E9164,17F09D9E-B04B-477E-86E6-E1B1F9650973,6F929C59-9602-4962-95B4-4165D66E5935,E8B76949-9282-44D0-8075-74E482CE9A82,B9B072DD-FC4F-4E07-9837-0E16017CA4AB,969BE4EC-4D13-4B74-8137-FA0F83F0FDC3,81F47561-F59C-4904-8E05-D8A9629405A8,D5E6F92A-FC59-4CE7-B7F8-94CBF3DC8F21,496901D5-014D-4920-A343-91A56F6FEFA0,1EEAB662-644A-4D7B-8237-64142CF48724,D9598A49-95F2-42DB-B92C-CD026F739B83,BED1009E-AE60-43A0-A0F5-38526EFCF423,D011585C-0E62-4233-85FA-F29A07D68DA7,F226D898-F0E8-41D8-BF40-54DE9FB5426D,4CB9CCD1-A67D-4800-9EC5-6E1A0B0B76E7,CE28C283-447A-4F83-B96B-69F96E663C1C,D102063B-2434-4141-98E7-2DE501AE1728,03B8CD03-CD31-4F4D-BA90-59435578A4F9,41A994BF-1F64-480A-8AA5-748DDD0AB68C,88519F2D-AD06-4F05-BEDA-A09216F1B481,AC728978-368D-4B36-B149-70473E92BD1B,FD5187B1-CB86-48E8-A595-9FCFD9822C0C,6C660DE4-543A-4E9B-825D-CD099D08CBD8,98C1942E-16C0-4EB2-AB57-43EC6EC9C3A2,318719C9-7B01-4021-B2EF-8341254DFE6A,DB8FA9BA-51CA-4473-9FE1-9A32FB8C8041,6718104E-82B3-4160-9968-4980C309EC8B,34710306-D6CF-4D07-84BF-71A8839BE416,87BF46A9-8E4A-4583-B35F-052FD481DF66,32B351BB-6CA6-4CEF-9F5D-ED47774FC676,CDA40FCD-1D34-4C47-908F-697433236153,00639A84-BD03-4BD9-A655-F806693DBC8B,14824B23-FF9F-4D6D-9D02-12B79BE346A0,6493744C-A69D-4377-937E-85E7F5535EA9,C09019B1-B873-41CE-951E-4777F324729C,EC4209A0-E73F-4B5A-9925-B5D20F879455,297DF5AD-FC22-432B-AE6A-2B1E6CFE1BE4,BFB8516D-03C4-478D-AFE2-824867FDC739,F82AED17-FEC3-47D0-A395-26ACD07FBE52,9630BC7B-9039-4FA6-86F8-5274783F3EB1,F1A6A15C-216A-42B1-84EF-B3D9A313D4A2,EC39C819-9439-4029-8377-F6D58B3DFDFB,A053DEF6-1317-4DA8-91D7-E1970DA62351,F0DBFDD8-40AE-44F2-8F02-FB7A4FAE5235,EB0605FF-3DDC-4F3A-8171-F3A447E9C292,801FF3B4-0729-4710-BFC2-4B078029944F,8EB8591E-3D6E-489B-B0D6-CEBB9D09EA68,8A411676-6666-4B54-A008-443B9B42F670,0AEDC9B2-8AA6-4DA2-A187-49A1DD106725,002CA86D-3090-4C7A-947A-21CB5D1ADD98,E6C4CA79-9D0A-4E47-A1A4-9CBEDDCFE05E,AF4E34FD-D927-42BB-8A16-031D77CB4B9E,37A3D49A-BE20-47BF-A85F-122357BAB098,F45DB5D3-7F35-4531-9A82-24EB50034787,4695F707-12E8-4BA4-BBE1-C21CB7213A2A,C918FB49-DA13-4326-BE86-6F6BEA4CE4E1,5573CAD1-39D1-4ADB-BB95-EBB554B43B4E,DD02EBDF-6E51-4538-9EDD-B1DE914D09C9,53C3C0E3-5F40-412B-A4AD-A7A291DE2A08,36888382-79C8-4C97-A654-C668CD68556F,F34C99E6-F9F0-4EF3-8601-B47EAE3D7273,A74DD08D-CEDB-460E-BED5-78F6CAF18BF5,E60560EC-6DBD-4A17-BFFA-FAD9193A0BC7,E4F64FBC-DC97-4FE3-A235-18B87945AF7A,85048406-9051-4E69-94A8-5C449F3B89E7,B1C88DD7-0B46-4405-BD35-60D27E2DBA14}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (73992, 'CVE-2006-3359', 'HIGH', '2006-07-06', '2024-11-21', 'Multiple SQL injection vulnerabilities in index.php in NewsPHP 2006 PRO allow remote attackers to in...', '{B67A384A-1976-4A28-AFCD-AE1E3F383BF6}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (74684, 'CVE-2006-1888', 'MEDIUM', '2006-04-20', '2024-11-21', 'phpGraphy 0.9.11 and earlier allows remote attackers to bypass authentication and gain administrator...', '{93CB15FA-0081-4273-B158-FB1B6AFDB9DC,F83775BB-7D82-4E5F-9501-EF405F246BDC,63F46B5E-2D7A-46FB-87FE-CB866341C9B1}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (79792, 'CVE-2016-3218', 'HIGH', '2016-06-16', '2024-11-21', 'The kernel-mode drivers in Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, Windows ...', '{21540673-614A-4D40-8BD7-3F07723803B0,232581CC-130A-4C62-A7E9-2EC9A9364D53,7519928D-0FF2-4584-8058-4C7764CD5671,A7F51B5F-AA19-4D31-89FA-6DFAC4BA8F0F,197E82CB-81AF-40F1-A55C-7B596891A783,0C28897B-044A-447B-AD76-6397F8190177,2ACA9287-B475-4AF7-A4DA-A7143CEF9E57,A7DF96F8-BA6A-4780-9CA3-F719B3F81074,DB18C4CE-5917-401E-ACF7-2747084FD36E,0A0D2704-C058-420B-B368-372D1129E914}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (80808, 'CVE-2013-1315', 'HIGH', '2013-09-11', '2024-11-21', 'Microsoft SharePoint Server 2007 SP3, 2010 SP1 and SP2, and 2013; Office Web Apps 2010; Excel 2003 S...', '{CEBB33CD-CACF-4EB8-8B5F-8E1CB8D7A440,94F5E2F8-0D37-4FCC-B55A-9F09C421272C,96EBA20F-201E-43AA-9F83-B73FB31696C6,5E01525C-A3AB-4AB7-82F9-B91E4D552FD7,3C4CFF7E-7170-4A6B-9A59-9815EE896C62,0390EFCA-87B4-42D6-817A-603765F49816,08795370-2A25-4F0D-970D-9B087F980BBD,78F27907-6FAB-4A9D-B100-B3D170520A74,971EC323-267F-4DAF-BA3B-10A47A9F1ADA,0D84FC39-29AA-4EF2-ACE7-E72635126F2B,44BC7B7B-7191-431C-8CAE-83B3F0EFF03E,0C86EA4A-7108-4A3A-A447-19CB3CA76B08,0C86EA4A-7108-4A3A-A447-19CB3CA76B08,81443CAD-F47E-4FD1-8E0E-8D646C90E4E3,D133FB73-C7F6-481C-B050-C242C771ED21,6B7AEA5E-C3D7-4E6D-96F0-5F9A175631C9,6FA65D4A-00C8-47E2-AF9F-6B420017CD29,9A57C675-05A9-4BC2-AE95-7CA5CA6B1F73,858F70F4-3128-477D-ACAA-73F0AFA23A2B,55C05DB1-03DC-454B-85E5-715938F0E13E,343EEB54-C1B1-4D7B-8780-5B5A5F2F840C,A8235774-4B57-4793-BE26-2CDE67532EDD}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (80809, 'CVE-2013-1313', 'HIGH', '2013-02-13', '2024-11-21', 'Object Linking and Embedding (OLE) Automation in Microsoft Windows XP SP3 does not properly allocate...', '{CE477A73-4EE4-41E9-8694-5A3D5DC88656}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (80810, 'CVE-2013-1312', 'HIGH', '2013-05-15', '2024-11-21', 'Use-after-free vulnerability in Microsoft Internet Explorer 9 and 10 allows remote attackers to exec...', '{C043EDDD-41BF-4718-BDCF-158BBBDB6360,D5808661-A082-4CBE-808C-B253972487B4}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (80811, 'CVE-2013-1311', 'HIGH', '2013-05-15', '2024-11-21', 'Use-after-free vulnerability in Microsoft Internet Explorer 8 allows remote attackers to execute arb...', '{A52E757F-9B41-43B4-9D67-3FEDACA71283}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (85525, 'CVE-2006-2656', 'HIGH', '2006-05-30', '2024-11-21', 'Stack-based buffer overflow in the tiffsplit command in libtiff 3.8.2 and earlier might might allow ...', '{36B8B853-0FF0-4E2F-983D-683A0951CEF3,CCA5EEB8-9D2C-49A9-BB08-CE5017B79D81,261FAE51-5207-4136-9FFE-2330A281266C,B32C83B9-F7DA-450A-A687-9A73734CD712,9485283A-B73E-4567-914A-42A86F5FFCB4,95892168-0FB6-4E3F-9303-2F9B3CF60D2B,A5021564-5E0A-4DDC-BC68-200B6050043E,11C50750-FE1D-42BA-9125-7D8E872AA2DB,19AA66E5-FDDD-4243-B945-DFEBDD25F258,62F359CD-5DC4-4919-B8E1-95BDDBD27EFC,D2C8C550-3313-4266-B4B3-E9E9047CFE04,ABEEBA7B-81D5-4148-912B-9AD448BBE741,448555FE-8E91-4EA7-BA05-6915F5508319,44BC5E2C-B6A6-4999-A1EA-B91DA5C350C7,F2850FD9-8BE8-410E-8A24-28549DAACEB3}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (93681, 'CVE-2018-13895', 'HIGH', '2019-05-24', '2024-11-21', 'Due to the missing permissions on several content providers of the RCS app in its android manifest f...', '{4E2F2D26-2833-45A4-81F0-8E9F338C1E13,4EB171B1-D163-4801-A241-8DD7193A5DCB,A960B86A-C397-4ACB-AEE6-55F316D32949,D79B8959-3D1E-4B48-9181-D75FE90AAF98,A35FECFB-60AE-42A8-BCBB-FEA7D5826D49,E9765187-8653-4D66-B230-B2CE862AC5C0,35B7E25E-FA92-4C36-883C-CFF36F4B3507,ECD99C6F-2444-4A5E-A517-0C8023DDF23D,FE28A59C-7AA6-4B85-84E8-07852B96108E,5DEE828B-09A7-4AC1-8134-491A7C87C118,8CA1E7B0-782B-4757-B118-802943798984,95CB08EC-AE12-4A54-AA3C-998F01FC8763,B05FD66D-13A6-40E9-A64B-E428378F237E,D0D665C1-3EBA-42F2-BF56-55E6C365F7DF,F18CD1F1-C36A-4840-88CD-8F00BD68EF1A,6A01800E-994E-4095-AD86-F02DC9D9C86E,0FA80D57-3191-47CF-AD3F-9F2D64E443FE,B2AFB212-F01A-4CEB-8DB4-2E0CC2308CB6,E0986EF1-0974-488E-84C4-6880F876CE55,8C08BA58-2EBC-4A22-85A4-2ECD54693B9B,27110478-4C08-49E6-BD53-8BAAD9D5BD65,3664D302-D22A-4B25-B534-3097AE2F8573,C56BC939-2FE8-4AB4-B638-35C83B224005,E36C12E2-7064-41E6-B357-3F0E6E6D0A0F,8DE3EA03-0373-4FEF-B1FC-123A8073520B,A64D3E69-0784-4DEA-96C1-2D41EAFA1906,B11CE0F1-29BD-46E1-ACFE-D076192F138E,D205DB4E-68C2-4B13-8373-128870DF83D8,E07C621F-0BC0-40C1-9678-1AF6498AC487,9C621A62-E346-406B-9D20-8FF6C2B0851F,549E6F7E-A54F-423F-BD4A-A8FB97DBD39E,992C3835-7183-4D96-8647-DD9916880323,A7B95CCC-37F1-4768-8D64-CA2028E93E03,D1426161-4F7C-44B1-AA9E-EA661AA68947,ECF81213-DE2D-4C4B-99E8-71AFD87E92CD,95E826EF-343B-47FA-AB54-F13E868CE6A7,06E0CC35-AC20-42D7-8FEA-CA4685E33E72,4A2C4DED-2367-4736-A0AF-C8356F1271AD,F2126866-3B02-42B4-A57A-4EFF30848B55,F832FE19-8D65-4779-B6F5-BD90BD131FD4,CE94E380-CB75-462E-B411-BF38F17D53B2,0947F38F-3DC2-45F1-B3B3-963922F32054,BC1650DB-FDF8-4BE5-9437-8ADA11A07116,B51DD51F-4BDE-497B-89E5-551D10CF3442,0752054B-2C29-4490-ADC8-29F82BAA17E6,005038B5-BCB7-4A23-8562-ACEF6E156C1F,6BFF8872-645F-4A05-BAF9-7797CFBE37C6,9CB91AFF-C149-4F5C-92EC-E78E66935528,2B529780-DB0A-4F9C-AE63-6DEC593B86E5,669E7360-E8C3-4BB8-A3B6-61BD58AFAF62,D49606C5-7306-4F33-864C-C1905594F09C,B43964AF-7CEC-420A-935B-D3895B2BAC70,E077FC03-F86F-417A-A3E6-BC88CB85C6F0,E016356C-94ED-4CDD-8351-97D265FE036E,E08016A2-E4FE-4E9C-A915-C66BE157AFB5,018452D0-007C-4740-B2AF-E5C8BBAC310F,1CFF35A3-1472-4665-9DAB-1ABC45C0D5B4,F930E9BF-C502-49C6-8BE8-9A711B89FA1B,0A2D2B3B-CB28-46AA-9117-A7FA371FDE80,DE18BF66-B0DB-48BB-B43A-56F01821F5A3,0C10C7CB-3B66-4F17-8146-6A85611E2BA9,B9DA765F-53DE-4FB0-B825-6C11B3177641,91400943-3D25-4E44-9FFD-9E3076305D80,57B16867-710D-4748-8636-635E2C6F7389,A2326BD7-28A5-4244-8501-B109913E7AE6,532D244B-8B5A-4923-B7F1-9DC0A5FC0E9D,84289E6D-DA2A-4D04-9DDA-E8C46DDDD056,C0B56360-7AC3-410A-B7F8-1BE8514B3781,8EA0D645-80F6-48C3-AF0D-99198ADC8778,814FF3F3-CD5A-45A3-988C-6457D2CEB48C,24D7B67C-6FEC-48F8-9D46-778E4528BC20,05006807-D961-446C-B8DC-C87507F1316E,A0CE1B23-6FE3-41C4-B264-C7A9E8BDBEC1,794BA13C-3C63-4695-AA45-676F85D904BE}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (99297, 'CVE-2018-14788', 'MEDIUM', '2018-10-01', '2024-11-21', 'Fuji Electric Alpha5 Smart Loader Versions 3.7 and prior. A buffer overflow information disclosure v...', '{4494AD60-80C3-4B40-87A8-4D119AB77C69,5319594A-AD04-4A71-875A-16EE68D28661}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (108629, 'CVE-2019-15222', 'MEDIUM', '2019-08-19', '2024-11-21', 'An issue was discovered in the Linux kernel before 5.2.8. There is a NULL pointer dereference caused...', '{4D264E92-50E9-46B2-8633-23B9F861EEDA,234DEFE0-5CE5-4B0A-96B8-5D227CB8ED31,CDDF61B7-EC5C-467C-B710-B89F502CD04F,3A756737-1CC4-42C2-A4DF-E1C893B4E2D5,0EF46487-B64A-454E-AECC-D74B83170ACD,D6D700C5-F67F-4FFB-BE69-D524592A3D2E,090AA6F4-4404-4E26-82AB-C3A22636F276,F1E78106-58E6-4D59-990F-75DA575BFAD9,B620311B-34A3-48A6-82DF-6F078D7A4493}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (116241, 'CVE-2020-5603', 'HIGH', '2020-06-30', '2024-11-21', 'Uncontrolled resource consumption vulnerability in Mitsubishi Electoric FA Engineering Software (CPU...', '{5AA4BCF9-CE1B-4A53-BBBD-396FE7D8D410,892E3CDC-AFC4-4EF1-AF46-3F161603DDB1,AD8B6AFD-17BE-4657-9F55-B0CA52E2578A,567CE406-0FCE-44DC-B210-1E54EDB6FE11,591B76E1-665F-4473-8A65-B8549B61807F,7CCB1E6D-333D-458E-AE2D-974E16195811,20F14A8B-E42D-4621-8BCC-A6D28A8A0D7A,35D76E9B-394E-47A1-B6F1-4854909A8D59,37B4823F-E257-4CFF-A20B-FAB4A60D49D9,4116C452-19C3-4F48-8A05-864BD884BDD0,BB41FBDD-2785-4012-AB84-2B1F947E9512,6DBBC676-19E1-4780-8D23-6888884E67A4,56B1A257-F1C6-4213-92A0-7476E3EB6207,76A6CCE9-ACB8-4A24-A4E5-0F8DCBC4475B,DA012067-3CF9-46E8-9C5D-C64D92C2574D,19CEBFB8-E23E-4ABB-9337-221D6749D456,6998E84B-0EFC-4ACB-BFC6-FFC1A675F1B3,0303271B-F016-4D0E-A862-313A31B8CD60,5BD4EC4A-ACF7-45F2-893D-569B4F8F8909,5E66C5F1-23BF-42F9-8A25-FE8A7E66B07D}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (117075, 'CVE-2020-1301', 'HIGH', '2020-06-09', '2024-11-21', 'A remote code execution vulnerability exists in the way that the Microsoft Server Message Block 1.0 ...', '{21540673-614A-4D40-8BD7-3F07723803B0,E01A4CCA-4C43-46E0-90E6-3E4DBFBACD64,83B14968-3985-43C3-ACE5-8307196EFAE3,7CB85C75-4D35-480E-843D-60579EC75FCB,6B8F3DD2-A145-4AF1-8545-CC42892DA3D1,3FB5CDAE-C713-4D9D-9D6A-2C2E8924A4BB,E9273B95-20ED-4547-B0A8-95AD15B30372,AAE74AF3-C559-4645-A6C0-25C3D647AAC8,C2B1C231-DE19-4B8F-A4AA-5B3A65276E46,E93068DB-549B-45AB-8E5C-00EB5D8B5CF8,C6CE5198-C498-4672-AF4C-77AB4BE06C5C,5F422A8C-2C4E-42C8-B420-E0728037E15C,B320A104-9037-487E-BC9A-62B4A6B49FD0,AF07A81D-12E5-4B1D-BFF9-C8D08C32FF4F,A7DF96F8-BA6A-4780-9CA3-F719B3F81074,DB18C4CE-5917-401E-ACF7-2747084FD36E,041FF8BA-0B12-4A1F-B4BF-9C4F33B7C1E7,CAACE735-003E-4ACB-A82E-C0CF97D7F013,5B921FDB-8E7D-427E-82BE-4432585080CF,C253A63F-03AB-41CB-A03A-B2674DEA98AA,0B60D940-80C7-49F0-8F4E-3F99AC15FA82,DB79EE26-FC32-417D-A49C-A1A63165A968}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (131065, 'CVE-2007-5326', 'HIGH', '2007-10-13', '2024-11-21', 'Multiple buffer overflows in (1) RPC and (2) rpcx.dll in CA BrightStor ARCServe BackUp v9.01 through...', '{F52790F8-0D23-47F4-B7F7-6CB0F7B6EA14,E37161BE-6AF5-40E0-BD63-2C17431D8B36,477EE032-D183-478F-A2BF-6165277A7414,78AA54EA-DAF1-4635-AA1B-E2E49C4BB597,328E1C42-488A-43FC-8DF2-758DC73B74AF,A8781759-7B4C-47C3-8A60-8CA5520360C5,6E236148-4A57-4FDC-A072-A77D3DD2DB53,1366038C-7552-44C7-BB01-316AA0D088F9,D24EEBF9-8301-4E8E-8AE1-E41774EDEFD9}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (142125, 'CVE-2020-9248', 'MEDIUM', '2020-07-31', '2024-11-21', 'Huawei FusionComput 8.0.0 have an improper authorization vulnerability. A module does not verify som...', '{5D251AD0-6227-4190-815F-B526F40D8A43}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (155966, 'CVE-2022-26417', 'HIGH', '2022-04-01', '2024-11-21', 'Omron CX-Position (versions 2.5.3 and prior) is vulnerable to a use after free memory condition whil...', '{7D8E2155-0F09-4E95-8D64-3E2D779191F3}'); -INSERT INTO cves (id, cve, severity, published, modified, summary, match_criteria_ids) VALUES (155978, 'CVE-2017-5095', 'HIGH', '2017-10-27', '2024-11-21', 'Stack overflow in PDFium in Google Chrome prior to 60.0.3112.78 for Linux, Windows, and Mac allowed ...', '{6E6FC5B1-DB09-4BF0-88CA-E5E2C42FAA37,387021A0-AF36-463C-A605-32EA7DAC172E,703AF700-7A70-47E2-BC3A-7FD03B3CA9C1,A2572D17-1DE6-457B-99CC-64AFD54487EA,DEECE5FC-CACF-4496-A3E7-164736409252,EE249E1B-A1FD-4E08-AA71-A0E1F10FFE97,9BBCD86A-E6C7-4444-9D74-F861084090F0,E5ED5807-55B7-47C5-97A6-03233F4FBC3A}'); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2017-9302', 'MEDIUM', '2017-05-29', '2024-11-21', 'RealPlayer 16.0.2.32 allows remote attackers to cause a denial of service (divide-by-zero error and ...', '{7A5620A0-8DAF-4FE6-8955-FA4B96ACF955}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2015-0269', 'MEDIUM', '2017-05-26', '2024-11-21', 'Directory traversal vulnerability in Contao before 3.2.19, and 3.4.x before 3.4.4 allows remote auth...', '{4F2A2A58-FA38-4930-86E3-07239AC98EE6,560647AE-9AA0-4A9F-AF6C-81CA20C4B120,E2D73046-F8FE-489F-850D-C01A2F20064C,102364AF-FC62-40D0-8318-EA2530D68F9D,342AC8F9-0F65-4901-AD0B-BFDA4EB57122,A753375D-F536-49B5-9476-F1C6D86BDCCA}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2001-0128', 'HIGH', '2001-03-12', '2024-11-20', 'Zope before 2.2.4 does not properly compute local roles, which could allow users to bypass specified...', '{BAEE3A85-0A4C-4763-A141-AC27ECFDC2AA,A5AE3BF4-237D-4D84-9753-512A642141A0,C50F9824-A12E-488E-A735-14696E11F847,0C7B8C8F-0A2D-4C55-9648-DA2B583EBA44,612AC3B1-8E55-437F-9600-67EA1A8BAD48,537A5C29-D770-4755-A6AB-8916754E14DB,E3AC05A9-04DA-4ED3-94D8-3254384CB724,DCE4BBA3-7332-45EE-8C29-BE5A473B559D,58B90124-0543-4226-BFF4-13CCCBCCB243,32FCB0B3-8FBE-49FA-B17E-0D5462C9E5B4,3EC1FF5D-5EAB-44D5-B281-770547C70D68,0A8FBD5A-2FD0-43CD-AC4B-1D6984D336FE,2EC4D3AB-38FA-4D44-AF5C-2DCD15994E76,0633B5A6-7A88-4A96-9462-4C09D124ED36,29B186E5-7C2F-466E-AA4A-8F2B618F8A14}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2010-3773', 'MEDIUM', '2010-12-10', '2024-11-21', 'Mozilla Firefox before 3.5.16 and 3.6.x before 3.6.13, and SeaMonkey before 2.0.11, when the XMLHttp...', '{F3782354-7EB7-49D2-B240-1871F6CB84C7,30D47263-03AD-4060-91E3-90F997B3D174,AFD775DF-277E-4D5B-B980-B8E6E782467D,C8587BFD-417D-42BE-A5F8-22FDC68FA9E6,D7364FAB-EEE9-4064-A8AD-6547239F9AB3,4C50485F-BC7B-4B70-A47B-1712E2DBAC5A,51EE386B-0833-484E-A2AB-86B4470D4D45,C3EF1B4D-6556-4B3C-BDD0-6348A4D4A91D,68C5C7CF-005B-42FC-B950-90303F0CC115,0B2FA2CF-7FE4-43B1-96A0-C14666EDBD7B,30290F6D-55CA-47EB-8F41-7BBB745C7A34,D6CD332E-490C-45B8-91BC-8A1DD1107F2E,09E18FC0-0C8C-4FA1-85B9-B868D00F002F,4A97B6E1-EABA-4977-A3FC-64DF0392AA95,CB01A97F-ACE1-4A99-8939-6DF8FE5B5E8E,6521C877-63C9-4B6E-9FC9-1263FFBB7950,D949DF0A-CBC2-40E1-AE6C-60E6F58D2481,3C5CDA57-1A50-4EDB-80E2-D3EBB44EA653,22D33486-4956-4E2C-BA16-FA269A9D02BD,3104343E-93B6-4D4A-BC95-ED9F7E91FB6A,381313EF-DF84-4F66-9962-DE8F45029D79,A0228476-14E4-443C-BBAE-2C9CD8594DC0,A803A500-DCE2-44FC-ABEB-A90A1D39D85C,022274DE-5251-49C9-B6E5-1D8CEDC34E7D,B9F84CB7-93F7-4912-BC87-497867B96491,8992E9C6-09B3-492E-B7DA-899D5238EC18,D58B704B-F06E-44C1-BBD1-A090D1E6583A,40270FBD-744A-49D9-9FFA-1DCD897210D7,20E01097-F60A-4FB2-BA47-84A267EE87D6,7F65732F-317B-49A2-B9B0-FA1102B8B45C,DB430F19-069A-43FD-9097-586D4449D327,76AD0439-3BFB-4AD1-8E2C-99D0B099FA8C,1E6D7528-E591-48A6-8165-BE42F8EBF6B6,BA710423-0075-44B8-9DCB-6380FA974486,C5521DA3-E6AF-4350-B971-10B4A1C9B1D1,DDD15752-A253-47B1-BCE0-B55B84B47C9F,60B39A9D-44A4-4D7F-9004-C44066BBE277,F203EC52-2126-4227-AF3B-23857E5BB222,E951567B-8402-42EA-AE33-EBA9235A868F,82A94198-7EBF-4D8A-A99A-A32A8561FF2F,1BFFBC58-ACD2-449D-B010-5026D6022F86,83EED5D2-EC40-4253-991B-0C746FBEF6A5,0F73092C-1458-4278-A30D-C0F89B1F82F6,AAB559BD-4BF7-417F-962F-B8971FF1614B,7B528A25-003F-4614-B55B-AF46B66EDB44,0078D890-6456-4F45-A3AE-B1A2BFAC6A4C,69DD17EC-99EB-46C1-98E9-16A2EDB8E224,F35F7EA1-8C98-4A3E-8767-89DBC26A32B9,EF89719E-C415-45A3-A1CC-FAFDFCAE3055,58EB8E8A-84DE-43AA-B8F0-B585FB73D724,C19C0BF7-390D-4E2E-BA32-28DFF73C55F6,5FE5E50C-80ED-4CA7-BC85-8BD2E324D527,FEBF912C-A12E-4DBD-84AC-8B440E190BCE,9B8EDED6-29EF-4A9F-955D-F5E6611C2141,EDC9C82D-586A-48F4-B540-1E2AE79806B3,51FCF83B-630A-4413-BFAA-0C24A6B8F4F4,84B2AA0A-0220-49DD-82CD-37FDC563F146,D754AF10-1E43-46C8-A444-E7DB3401509D,34182167-F1DF-455B-BFDB-0A8491590479,B8ECA6CE-20D0-4A4F-B376-888A9328B044,1FEFCAB0-E57A-46E8-94C7-8510BB87C6B2,9FB5C972-AF7B-4EC7-BCE5-867CACCF5C19,C68DBB31-7804-446E-9A53-073E4B74E851,31ADCC51-CE05-4EB6-BE8F-B64FD62946A1,387390AE-CF25-47ED-BD36-F42455DE1A4B,78D5F0AD-9974-40A1-942F-0F03A278DAD9,F368F41E-0371-4790-9197-61ED793022C8,7C7AA88B-638A-451A-B235-A1A1444BE417,9C01AD7C-8470-47AB-B8AE-670E3A381E89,7E43F2F1-9252-4B44-8A61-D05305915A5F,3BB9D48B-DC7B-4D92-BB26-B6DE629A2506,A360D595-A829-4DDE-932E-9995626917E5,6E9B5349-FAA7-4CDA-9533-1AD1ACDFAC4E,07243837-C353-4C25-A5B1-4DA32807E97D,B832C034-F793-415F-BFC8-D97A18BA6BC7,83CD1A13-66CB-49CC-BD84-5D8334DB774A,93C142C5-3A85-432B-80D6-2E7B1B4694F4,2434FCE7-A50B-4527-9970-C7224B31141C,5633FB6E-D623-49D4-9858-4E20E64DE458,429ECA02-DBCD-45FB-942C-CA4BC1BC8A72,B5F0DC80-5473-465C-9D7F-9589F1B78E12,567FF916-7DE0-403C-8528-7931A43E0D18,010B34F4-910E-4515-990B-8E72DF009578,8FAA1A89-E8D9-46D0-8E2C-9259920ACBFE,5A545A77-2198-4685-A87F-E0F2DAECECF6,438AACF8-006F-4522-853F-30DBBABD8C15,778FAE0C-A5CF-4B67-93A9-1A803E3E699F,E7447185-7509-449D-8907-F30A42CF7EB5,0EDBAC37-9D08-44D1-B279-BC6ACF126CAF,3FFF89FA-2020-43CC-BACD-D66117B3DD26,834BB391-5EB5-43A8-980A-D305EDAE6FA7,9A38AD88-BAA6-4FBE-885B-69E951BD1EFE,B500EE6C-99DB-49A3-A1F1-AFFD7FE28068,4F2938F2-A801-45E5-8E06-BE03DE03C8A7,F18A45C0-419C-4723-AB7D-5880EF668CE9,ABB88E86-6E83-4A59-9266-8B98AA91774D,E19ED1CA-DEBD-4786-BA7B-C122C7D2E5B7,66BE50FE-EA21-4633-A181-CD35196DF06E,7D6BF5B1-86D1-47FE-9D9C-735718F94874,84D15CE0-69DF-4EFD-801E-96A4D6AABEDB,CEE203DE-6C0E-4FDE-9C3A-0E73430F17DA,F2F38886-C25A-4C6B-93E7-36461405BA99,C65D2670-F37F-48CB-804A-D35BB1C27D9F,DE8E5194-7B34-4802-BDA6-6A86EB5EDE05,FABA5F56-99F7-4F8F-9CC1-5B0B2EB72922,2917BD67-CE81-4B94-B241-D4A9DDA60319,A524A94E-F19B-42B9-AA8E-171751C339AA,F71436CF-F756-44E0-8E69-6951F6B3E54A,582EE839-B83F-4908-9780-D0C92DC44FD0,824369CF-00A0-434E-94BC-71CA1317012C,BCB35099-B04E-4796-A25D-953329FE62F3,5DBEBCFD-80D6-466A-BAEF-C75E65A3B12E,C30ACBCA-4FA1-46DE-8F15-4830BC27E160,9453EF65-7C69-449E-BF7C-4FECFB56713E,4AA75825-21CF-475B-8040-126A13FA2216,CA97C80E-17FA-4866-86CE-29886145ED80,7DE24BED-202E-416D-B5F2-8207D97B9939,04198E04-CE1D-4A5A-A20C-D1E135B45F94,717DB967-F658-4699-A224-5B261BFEC10A,3487FA64-BE04-42CA-861E-3DAC097D7D32,F3D956DC-C73B-439F-8D79-8239207CC76F,57E2C7E7-56C0-466C-BB08-5EB43922C4F9,462E135A-5616-46CC-A9C0-5A7A0526ACC6,6121F9C1-F4DF-4AAB-9E51-AC1592AA5639,58D44634-A0B5-4F05-8983-B08D392EC742,EB3AC3D3-FDD7-489F-BDCF-BDB55DF33A8B,4105171B-9C90-4ABF-B220-A35E7BA9EE40,20985549-DB24-4B69-9D40-208A47AE658E,43A13026-416F-4308-8A1B-E989BD769E12,612B015E-9F96-4CE6-83E4-23848FD609E5,1E391619-0967-43E1-8CBC-4D54F72A85C2,0544D626-E269-4677-9B05-7DAB23BD103B,C95F7B2C-80FC-4DF2-9680-F74634DCE3E6,863C140E-DC15-4A88-AB8A-8AEF9F4B8164,38CD049A-5333-4FF7-AD34-6B74E19BADCB,0066576D-D66A-4B59-B5C3-471EEBEE8B9A,60ED6DAA-9194-4829-BC1A-00F04BE7930A,13BEB9A6-EFD5-4793-9603-84DB84F1CF7D,461163C6-4CA8-4BA9-95A1-136E612CBA6B,275E9D96-1290-44AB-BF9B-E9E4A803F593,412DF091-7604-4110-87A0-3488116A97E5,11E07FED-ABDB-4B0A-AB2E-4CBF1EAC4301,9A6558F1-9E0D-4107-909A-8EF4BC8A9C2F,63DF3D65-C992-44CF-89B4-893526C6242E,A9024117-2E8B-4240-9E21-CC501F3879B5,FBC3CAD3-2F54-4E32-A0C9-0D826C45AC23,52624B41-AB34-40AD-8709-D9646B618AB0,917E9856-9556-4FD6-A834-858F8837A6B4,98BBD74D-930C-4D80-A91B-0D61347BAA63,FAF2E696-883D-4DE5-8B79-D8E5D9470253,94E04FD9-38E8-462D-82C2-729F7F7F0465,5888517E-3C57-4A0A-9895-EA4BCB0A0ED5,0BB21291-B9F3-445E-A9E9-EA1822083DD3,D595F649-ECBE-45E0-8AAD-BCBC65A654B9,4FE6E920-9A4C-431B-89EA-683A22F15ACD,18B6CC9F-6295-4598-B28B-0CA19D1D9F45,C9F0434D-C84F-49FD-9F44-66D3ACD7B601,F6AAB416-E865-4EEE-8FCB-A91253BEB52B,76CD3BDF-A079-4EF3-ABDE-43CBDD08DB1F,031E8624-5161-43AF-AF19-6BAB5A94FDD8,54186D4A-C6F0-44AD-94FB-73B4346ABB6B,47E50AD9-BA35-4817-BD4D-5D678FC5A3C5,DD09DE40-8C9B-41EA-B372-9E4E4830E8F4,F223FB83-0EDB-4429-94B9-1AEEF314B73F,BC6B977F-292F-4981-95A0-6065A3C487D5,342226B9-2C0C-416C-81FE-19C49F03AA88,2A6A28E0-F67A-4275-B0D9-A02822E9EF7E,ECAB4696-76F3-458C-B33B-D7F8690C60A0,BBB444FD-15F3-4447-9EA8-1669779A5749,F92E2EF3-A612-476F-9D31-1EEC240C7EA7,0F175D30-2416-4172-BF11-DA78D252D608,5DD3F168-3EF4-492E-BBAA-EACB1357C709,4B46BA97-2860-45E4-9FD3-F418A202E4F0}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-10083', 'HIGH', '2018-04-13', '2024-11-21', 'CMS Made Simple (CMSMS) through 2.2.7 contains an arbitrary file deletion vulnerability in the admin...', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-10029', 'MEDIUM', '2018-04-11', '2024-11-21', 'CMS Made Simple (aka CMSMS) 2.2.7 has Reflected XSS in admin/moduleinterface.php via the m1_name par...', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-10030', 'HIGH', '2018-04-11', '2024-11-21', 'CMS Made Simple (aka CMSMS) 2.2.7 has CSRF in admin/siteprefs.php.', '{ABE080D4-548B-4AF1-9E61-9381338CC90C}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-18887', 'CRITICAL', '2018-11-01', '2024-11-21', 'S-CMS PHP 1.0 has SQL injection in member/member_news.php via the type parameter (aka the $N_type fi...', '{4B6BD148-38BC-4577-8467-2333C2466F90}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-12243', 'HIGH', '2018-09-19', '2024-11-21', 'The Symantec Messaging Gateway product prior to 10.6.6 may be susceptible to a XML external entity (...', '{D25EDB76-F75D-4C5E-9122-EB4F520D569D}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-12242', 'CRITICAL', '2018-09-19', '2024-11-21', 'The Symantec Messaging Gateway product prior to 10.6.6 may be susceptible to an authentication bypas...', '{D25EDB76-F75D-4C5E-9122-EB4F520D569D}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2015-6175', 'HIGH', '2015-12-09', '2024-11-21', 'The kernel in Microsoft Windows 10 Gold allows local users to gain privileges via a crafted applicat...', '{542DAEEC-73CC-46C6-A630-BF474A3446AC}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2008-3104', 'MEDIUM', '2008-07-09', '2024-11-21', 'Multiple unspecified vulnerabilities in Sun Java Runtime Environment (JRE) in JDK and JRE 6 before U...', '{7E7CD268-A083-43B5-80B7-B7837202CF29,94A87B01-2F20-4E1C-8572-395A96C35D79,BC9476DD-9B56-4811-A248-711C25181F29,6BB00A29-FEBB-4139-9E96-691EC1410EFE,DD8CC179-F76E-4CC2-9CBD-69CBBA5BD532,C2DC7389-9697-4EF0-9C4E-153731CDD75D,C5F476C8-5466-4E6B-B73B-4ACFBB02AD5C,D8C7C8C1-AA0D-4BD9-A8EC-85BBE627DE13,BAF0844B-ECB1-4AF0-AA32-1B8789AC5042,25322D24-C5D9-43A6-87CC-1BF7FA6A3E76,400FDCDE-16DE-4BD6-81E2-4A5DA12E99CA,82C49C78-ACE3-407D-AE21-EA180633C437,5F91F8A2-D473-48DC-81DA-21291DE7B6E8,3E46B3B4-9E1C-4C87-A4CD-C4CE7FBCA7F6,0F69C703-8541-4AA8-A66A-0292E0FCB749,99E08AB2-49AD-42C6-967F-773F2C6E188A,9459F130-A3DD-4A4E-9582-4FB82619EB5A,9C9F6EA8-6A88-4485-89A3-0FDF84AB51DA,67E0818A-3675-4293-89FE-5001E36C0F38,95112B98-B6B2-43FA-BF76-F518649CF3BE,3A18341A-3688-48E7-95AD-283EC9C95B4A,E301C59A-47F5-4861-9091-D0002CBA5B7A,AAB87D43-2860-43DD-94EE-886D7D75A351,399B06AC-E101-48EE-A362-D75F7072FF5E,FD3AC618-7B66-4167-ABE5-87BE6907FB5A,2B0EAF17-18D3-45F2-9B6F-66BEC0F49FB6,5F861B32-B878-4DFC-A9D1-350B1013AA1F,5A469586-4106-48BB-BF92-8FFDC8AA4C44,89E95205-DB64-44AD-81A4-B77BD7595AAF,62E772B9-8E41-476F-81F5-87B41F1827A1,7CE78463-2CE8-43C6-BB06-AA40C72B1A4F,31A04480-92DF-49AD-9B36-7F1FCB29DE90,E2FD0B72-683D-4FF6-BCF5-5DE85BF3064B,F78CD4B5-4B1D-4128-8AEA-2F967C38C6C4,62CAA3E7-9D65-48F3-ACF7-9D705D94DE54,477C310B-50AD-4D40-8EDB-4A80F0BF321D,60A1F526-6B28-47A3-8D2C-06CA067E9164,17F09D9E-B04B-477E-86E6-E1B1F9650973,6F929C59-9602-4962-95B4-4165D66E5935,E8B76949-9282-44D0-8075-74E482CE9A82,B9B072DD-FC4F-4E07-9837-0E16017CA4AB,969BE4EC-4D13-4B74-8137-FA0F83F0FDC3,81F47561-F59C-4904-8E05-D8A9629405A8,D5E6F92A-FC59-4CE7-B7F8-94CBF3DC8F21,496901D5-014D-4920-A343-91A56F6FEFA0,1EEAB662-644A-4D7B-8237-64142CF48724,D9598A49-95F2-42DB-B92C-CD026F739B83,BED1009E-AE60-43A0-A0F5-38526EFCF423,D011585C-0E62-4233-85FA-F29A07D68DA7,F226D898-F0E8-41D8-BF40-54DE9FB5426D,4CB9CCD1-A67D-4800-9EC5-6E1A0B0B76E7,CE28C283-447A-4F83-B96B-69F96E663C1C,D102063B-2434-4141-98E7-2DE501AE1728,03B8CD03-CD31-4F4D-BA90-59435578A4F9,41A994BF-1F64-480A-8AA5-748DDD0AB68C,88519F2D-AD06-4F05-BEDA-A09216F1B481,AC728978-368D-4B36-B149-70473E92BD1B,FD5187B1-CB86-48E8-A595-9FCFD9822C0C,6C660DE4-543A-4E9B-825D-CD099D08CBD8,98C1942E-16C0-4EB2-AB57-43EC6EC9C3A2,318719C9-7B01-4021-B2EF-8341254DFE6A,DB8FA9BA-51CA-4473-9FE1-9A32FB8C8041,6718104E-82B3-4160-9968-4980C309EC8B,34710306-D6CF-4D07-84BF-71A8839BE416,87BF46A9-8E4A-4583-B35F-052FD481DF66,32B351BB-6CA6-4CEF-9F5D-ED47774FC676,CDA40FCD-1D34-4C47-908F-697433236153,00639A84-BD03-4BD9-A655-F806693DBC8B,14824B23-FF9F-4D6D-9D02-12B79BE346A0,6493744C-A69D-4377-937E-85E7F5535EA9,C09019B1-B873-41CE-951E-4777F324729C,EC4209A0-E73F-4B5A-9925-B5D20F879455,297DF5AD-FC22-432B-AE6A-2B1E6CFE1BE4,BFB8516D-03C4-478D-AFE2-824867FDC739,F82AED17-FEC3-47D0-A395-26ACD07FBE52,9630BC7B-9039-4FA6-86F8-5274783F3EB1,F1A6A15C-216A-42B1-84EF-B3D9A313D4A2,EC39C819-9439-4029-8377-F6D58B3DFDFB,A053DEF6-1317-4DA8-91D7-E1970DA62351,F0DBFDD8-40AE-44F2-8F02-FB7A4FAE5235,EB0605FF-3DDC-4F3A-8171-F3A447E9C292,801FF3B4-0729-4710-BFC2-4B078029944F,8EB8591E-3D6E-489B-B0D6-CEBB9D09EA68,8A411676-6666-4B54-A008-443B9B42F670,0AEDC9B2-8AA6-4DA2-A187-49A1DD106725,002CA86D-3090-4C7A-947A-21CB5D1ADD98,E6C4CA79-9D0A-4E47-A1A4-9CBEDDCFE05E,AF4E34FD-D927-42BB-8A16-031D77CB4B9E,37A3D49A-BE20-47BF-A85F-122357BAB098,F45DB5D3-7F35-4531-9A82-24EB50034787,4695F707-12E8-4BA4-BBE1-C21CB7213A2A,C918FB49-DA13-4326-BE86-6F6BEA4CE4E1,5573CAD1-39D1-4ADB-BB95-EBB554B43B4E,DD02EBDF-6E51-4538-9EDD-B1DE914D09C9,53C3C0E3-5F40-412B-A4AD-A7A291DE2A08,36888382-79C8-4C97-A654-C668CD68556F,F34C99E6-F9F0-4EF3-8601-B47EAE3D7273,A74DD08D-CEDB-460E-BED5-78F6CAF18BF5,E60560EC-6DBD-4A17-BFFA-FAD9193A0BC7,E4F64FBC-DC97-4FE3-A235-18B87945AF7A,85048406-9051-4E69-94A8-5C449F3B89E7,B1C88DD7-0B46-4405-BD35-60D27E2DBA14}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2006-3359', 'HIGH', '2006-07-06', '2024-11-21', 'Multiple SQL injection vulnerabilities in index.php in NewsPHP 2006 PRO allow remote attackers to in...', '{B67A384A-1976-4A28-AFCD-AE1E3F383BF6}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2006-1888', 'MEDIUM', '2006-04-20', '2024-11-21', 'phpGraphy 0.9.11 and earlier allows remote attackers to bypass authentication and gain administrator...', '{93CB15FA-0081-4273-B158-FB1B6AFDB9DC,F83775BB-7D82-4E5F-9501-EF405F246BDC,63F46B5E-2D7A-46FB-87FE-CB866341C9B1}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2016-3218', 'HIGH', '2016-06-16', '2024-11-21', 'The kernel-mode drivers in Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, Windows ...', '{21540673-614A-4D40-8BD7-3F07723803B0,232581CC-130A-4C62-A7E9-2EC9A9364D53,7519928D-0FF2-4584-8058-4C7764CD5671,A7F51B5F-AA19-4D31-89FA-6DFAC4BA8F0F,197E82CB-81AF-40F1-A55C-7B596891A783,0C28897B-044A-447B-AD76-6397F8190177,2ACA9287-B475-4AF7-A4DA-A7143CEF9E57,A7DF96F8-BA6A-4780-9CA3-F719B3F81074,DB18C4CE-5917-401E-ACF7-2747084FD36E,0A0D2704-C058-420B-B368-372D1129E914}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2013-1315', 'HIGH', '2013-09-11', '2024-11-21', 'Microsoft SharePoint Server 2007 SP3, 2010 SP1 and SP2, and 2013; Office Web Apps 2010; Excel 2003 S...', '{CEBB33CD-CACF-4EB8-8B5F-8E1CB8D7A440,94F5E2F8-0D37-4FCC-B55A-9F09C421272C,96EBA20F-201E-43AA-9F83-B73FB31696C6,5E01525C-A3AB-4AB7-82F9-B91E4D552FD7,3C4CFF7E-7170-4A6B-9A59-9815EE896C62,0390EFCA-87B4-42D6-817A-603765F49816,08795370-2A25-4F0D-970D-9B087F980BBD,78F27907-6FAB-4A9D-B100-B3D170520A74,971EC323-267F-4DAF-BA3B-10A47A9F1ADA,0D84FC39-29AA-4EF2-ACE7-E72635126F2B,44BC7B7B-7191-431C-8CAE-83B3F0EFF03E,0C86EA4A-7108-4A3A-A447-19CB3CA76B08,0C86EA4A-7108-4A3A-A447-19CB3CA76B08,81443CAD-F47E-4FD1-8E0E-8D646C90E4E3,D133FB73-C7F6-481C-B050-C242C771ED21,6B7AEA5E-C3D7-4E6D-96F0-5F9A175631C9,6FA65D4A-00C8-47E2-AF9F-6B420017CD29,9A57C675-05A9-4BC2-AE95-7CA5CA6B1F73,858F70F4-3128-477D-ACAA-73F0AFA23A2B,55C05DB1-03DC-454B-85E5-715938F0E13E,343EEB54-C1B1-4D7B-8780-5B5A5F2F840C,A8235774-4B57-4793-BE26-2CDE67532EDD}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2013-1313', 'HIGH', '2013-02-13', '2024-11-21', 'Object Linking and Embedding (OLE) Automation in Microsoft Windows XP SP3 does not properly allocate...', '{CE477A73-4EE4-41E9-8694-5A3D5DC88656}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2013-1312', 'HIGH', '2013-05-15', '2024-11-21', 'Use-after-free vulnerability in Microsoft Internet Explorer 9 and 10 allows remote attackers to exec...', '{C043EDDD-41BF-4718-BDCF-158BBBDB6360,D5808661-A082-4CBE-808C-B253972487B4}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2013-1311', 'HIGH', '2013-05-15', '2024-11-21', 'Use-after-free vulnerability in Microsoft Internet Explorer 8 allows remote attackers to execute arb...', '{A52E757F-9B41-43B4-9D67-3FEDACA71283}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2006-2656', 'HIGH', '2006-05-30', '2024-11-21', 'Stack-based buffer overflow in the tiffsplit command in libtiff 3.8.2 and earlier might might allow ...', '{36B8B853-0FF0-4E2F-983D-683A0951CEF3,CCA5EEB8-9D2C-49A9-BB08-CE5017B79D81,261FAE51-5207-4136-9FFE-2330A281266C,B32C83B9-F7DA-450A-A687-9A73734CD712,9485283A-B73E-4567-914A-42A86F5FFCB4,95892168-0FB6-4E3F-9303-2F9B3CF60D2B,A5021564-5E0A-4DDC-BC68-200B6050043E,11C50750-FE1D-42BA-9125-7D8E872AA2DB,19AA66E5-FDDD-4243-B945-DFEBDD25F258,62F359CD-5DC4-4919-B8E1-95BDDBD27EFC,D2C8C550-3313-4266-B4B3-E9E9047CFE04,ABEEBA7B-81D5-4148-912B-9AD448BBE741,448555FE-8E91-4EA7-BA05-6915F5508319,44BC5E2C-B6A6-4999-A1EA-B91DA5C350C7,F2850FD9-8BE8-410E-8A24-28549DAACEB3}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-13895', 'HIGH', '2019-05-24', '2024-11-21', 'Due to the missing permissions on several content providers of the RCS app in its android manifest f...', '{4E2F2D26-2833-45A4-81F0-8E9F338C1E13,4EB171B1-D163-4801-A241-8DD7193A5DCB,A960B86A-C397-4ACB-AEE6-55F316D32949,D79B8959-3D1E-4B48-9181-D75FE90AAF98,A35FECFB-60AE-42A8-BCBB-FEA7D5826D49,E9765187-8653-4D66-B230-B2CE862AC5C0,35B7E25E-FA92-4C36-883C-CFF36F4B3507,ECD99C6F-2444-4A5E-A517-0C8023DDF23D,FE28A59C-7AA6-4B85-84E8-07852B96108E,5DEE828B-09A7-4AC1-8134-491A7C87C118,8CA1E7B0-782B-4757-B118-802943798984,95CB08EC-AE12-4A54-AA3C-998F01FC8763,B05FD66D-13A6-40E9-A64B-E428378F237E,D0D665C1-3EBA-42F2-BF56-55E6C365F7DF,F18CD1F1-C36A-4840-88CD-8F00BD68EF1A,6A01800E-994E-4095-AD86-F02DC9D9C86E,0FA80D57-3191-47CF-AD3F-9F2D64E443FE,B2AFB212-F01A-4CEB-8DB4-2E0CC2308CB6,E0986EF1-0974-488E-84C4-6880F876CE55,8C08BA58-2EBC-4A22-85A4-2ECD54693B9B,27110478-4C08-49E6-BD53-8BAAD9D5BD65,3664D302-D22A-4B25-B534-3097AE2F8573,C56BC939-2FE8-4AB4-B638-35C83B224005,E36C12E2-7064-41E6-B357-3F0E6E6D0A0F,8DE3EA03-0373-4FEF-B1FC-123A8073520B,A64D3E69-0784-4DEA-96C1-2D41EAFA1906,B11CE0F1-29BD-46E1-ACFE-D076192F138E,D205DB4E-68C2-4B13-8373-128870DF83D8,E07C621F-0BC0-40C1-9678-1AF6498AC487,9C621A62-E346-406B-9D20-8FF6C2B0851F,549E6F7E-A54F-423F-BD4A-A8FB97DBD39E,992C3835-7183-4D96-8647-DD9916880323,A7B95CCC-37F1-4768-8D64-CA2028E93E03,D1426161-4F7C-44B1-AA9E-EA661AA68947,ECF81213-DE2D-4C4B-99E8-71AFD87E92CD,95E826EF-343B-47FA-AB54-F13E868CE6A7,06E0CC35-AC20-42D7-8FEA-CA4685E33E72,4A2C4DED-2367-4736-A0AF-C8356F1271AD,F2126866-3B02-42B4-A57A-4EFF30848B55,F832FE19-8D65-4779-B6F5-BD90BD131FD4,CE94E380-CB75-462E-B411-BF38F17D53B2,0947F38F-3DC2-45F1-B3B3-963922F32054,BC1650DB-FDF8-4BE5-9437-8ADA11A07116,B51DD51F-4BDE-497B-89E5-551D10CF3442,0752054B-2C29-4490-ADC8-29F82BAA17E6,005038B5-BCB7-4A23-8562-ACEF6E156C1F,6BFF8872-645F-4A05-BAF9-7797CFBE37C6,9CB91AFF-C149-4F5C-92EC-E78E66935528,2B529780-DB0A-4F9C-AE63-6DEC593B86E5,669E7360-E8C3-4BB8-A3B6-61BD58AFAF62,D49606C5-7306-4F33-864C-C1905594F09C,B43964AF-7CEC-420A-935B-D3895B2BAC70,E077FC03-F86F-417A-A3E6-BC88CB85C6F0,E016356C-94ED-4CDD-8351-97D265FE036E,E08016A2-E4FE-4E9C-A915-C66BE157AFB5,018452D0-007C-4740-B2AF-E5C8BBAC310F,1CFF35A3-1472-4665-9DAB-1ABC45C0D5B4,F930E9BF-C502-49C6-8BE8-9A711B89FA1B,0A2D2B3B-CB28-46AA-9117-A7FA371FDE80,DE18BF66-B0DB-48BB-B43A-56F01821F5A3,0C10C7CB-3B66-4F17-8146-6A85611E2BA9,B9DA765F-53DE-4FB0-B825-6C11B3177641,91400943-3D25-4E44-9FFD-9E3076305D80,57B16867-710D-4748-8636-635E2C6F7389,A2326BD7-28A5-4244-8501-B109913E7AE6,532D244B-8B5A-4923-B7F1-9DC0A5FC0E9D,84289E6D-DA2A-4D04-9DDA-E8C46DDDD056,C0B56360-7AC3-410A-B7F8-1BE8514B3781,8EA0D645-80F6-48C3-AF0D-99198ADC8778,814FF3F3-CD5A-45A3-988C-6457D2CEB48C,24D7B67C-6FEC-48F8-9D46-778E4528BC20,05006807-D961-446C-B8DC-C87507F1316E,A0CE1B23-6FE3-41C4-B264-C7A9E8BDBEC1,794BA13C-3C63-4695-AA45-676F85D904BE}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2018-14788', 'MEDIUM', '2018-10-01', '2024-11-21', 'Fuji Electric Alpha5 Smart Loader Versions 3.7 and prior. A buffer overflow information disclosure v...', '{4494AD60-80C3-4B40-87A8-4D119AB77C69,5319594A-AD04-4A71-875A-16EE68D28661}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2019-15222', 'MEDIUM', '2019-08-19', '2024-11-21', 'An issue was discovered in the Linux kernel before 5.2.8. There is a NULL pointer dereference caused...', '{4D264E92-50E9-46B2-8633-23B9F861EEDA,234DEFE0-5CE5-4B0A-96B8-5D227CB8ED31,CDDF61B7-EC5C-467C-B710-B89F502CD04F,3A756737-1CC4-42C2-A4DF-E1C893B4E2D5,0EF46487-B64A-454E-AECC-D74B83170ACD,D6D700C5-F67F-4FFB-BE69-D524592A3D2E,090AA6F4-4404-4E26-82AB-C3A22636F276,F1E78106-58E6-4D59-990F-75DA575BFAD9,B620311B-34A3-48A6-82DF-6F078D7A4493}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2020-5603', 'HIGH', '2020-06-30', '2024-11-21', 'Uncontrolled resource consumption vulnerability in Mitsubishi Electoric FA Engineering Software (CPU...', '{5AA4BCF9-CE1B-4A53-BBBD-396FE7D8D410,892E3CDC-AFC4-4EF1-AF46-3F161603DDB1,AD8B6AFD-17BE-4657-9F55-B0CA52E2578A,567CE406-0FCE-44DC-B210-1E54EDB6FE11,591B76E1-665F-4473-8A65-B8549B61807F,7CCB1E6D-333D-458E-AE2D-974E16195811,20F14A8B-E42D-4621-8BCC-A6D28A8A0D7A,35D76E9B-394E-47A1-B6F1-4854909A8D59,37B4823F-E257-4CFF-A20B-FAB4A60D49D9,4116C452-19C3-4F48-8A05-864BD884BDD0,BB41FBDD-2785-4012-AB84-2B1F947E9512,6DBBC676-19E1-4780-8D23-6888884E67A4,56B1A257-F1C6-4213-92A0-7476E3EB6207,76A6CCE9-ACB8-4A24-A4E5-0F8DCBC4475B,DA012067-3CF9-46E8-9C5D-C64D92C2574D,19CEBFB8-E23E-4ABB-9337-221D6749D456,6998E84B-0EFC-4ACB-BFC6-FFC1A675F1B3,0303271B-F016-4D0E-A862-313A31B8CD60,5BD4EC4A-ACF7-45F2-893D-569B4F8F8909,5E66C5F1-23BF-42F9-8A25-FE8A7E66B07D}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2020-1301', 'HIGH', '2020-06-09', '2024-11-21', 'A remote code execution vulnerability exists in the way that the Microsoft Server Message Block 1.0 ...', '{21540673-614A-4D40-8BD7-3F07723803B0,E01A4CCA-4C43-46E0-90E6-3E4DBFBACD64,83B14968-3985-43C3-ACE5-8307196EFAE3,7CB85C75-4D35-480E-843D-60579EC75FCB,6B8F3DD2-A145-4AF1-8545-CC42892DA3D1,3FB5CDAE-C713-4D9D-9D6A-2C2E8924A4BB,E9273B95-20ED-4547-B0A8-95AD15B30372,AAE74AF3-C559-4645-A6C0-25C3D647AAC8,C2B1C231-DE19-4B8F-A4AA-5B3A65276E46,E93068DB-549B-45AB-8E5C-00EB5D8B5CF8,C6CE5198-C498-4672-AF4C-77AB4BE06C5C,5F422A8C-2C4E-42C8-B420-E0728037E15C,B320A104-9037-487E-BC9A-62B4A6B49FD0,AF07A81D-12E5-4B1D-BFF9-C8D08C32FF4F,A7DF96F8-BA6A-4780-9CA3-F719B3F81074,DB18C4CE-5917-401E-ACF7-2747084FD36E,041FF8BA-0B12-4A1F-B4BF-9C4F33B7C1E7,CAACE735-003E-4ACB-A82E-C0CF97D7F013,5B921FDB-8E7D-427E-82BE-4432585080CF,C253A63F-03AB-41CB-A03A-B2674DEA98AA,0B60D940-80C7-49F0-8F4E-3F99AC15FA82,DB79EE26-FC32-417D-A49C-A1A63165A968}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2007-5326', 'HIGH', '2007-10-13', '2024-11-21', 'Multiple buffer overflows in (1) RPC and (2) rpcx.dll in CA BrightStor ARCServe BackUp v9.01 through...', '{F52790F8-0D23-47F4-B7F7-6CB0F7B6EA14,E37161BE-6AF5-40E0-BD63-2C17431D8B36,477EE032-D183-478F-A2BF-6165277A7414,78AA54EA-DAF1-4635-AA1B-E2E49C4BB597,328E1C42-488A-43FC-8DF2-758DC73B74AF,A8781759-7B4C-47C3-8A60-8CA5520360C5,6E236148-4A57-4FDC-A072-A77D3DD2DB53,1366038C-7552-44C7-BB01-316AA0D088F9,D24EEBF9-8301-4E8E-8AE1-E41774EDEFD9}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2020-9248', 'MEDIUM', '2020-07-31', '2024-11-21', 'Huawei FusionComput 8.0.0 have an improper authorization vulnerability. A module does not verify som...', '{5D251AD0-6227-4190-815F-B526F40D8A43}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2022-26417', 'HIGH', '2022-04-01', '2024-11-21', 'Omron CX-Position (versions 2.5.3 and prior) is vulnerable to a use after free memory condition whil...', '{7D8E2155-0F09-4E95-8D64-3E2D779191F3}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) VALUES ('CVE-2017-5095', 'HIGH', '2017-10-27', '2024-11-21', 'Stack overflow in PDFium in Google Chrome prior to 60.0.3112.78 for Linux, Windows, and Mac allowed ...', '{6E6FC5B1-DB09-4BF0-88CA-E5E2C42FAA37,387021A0-AF36-463C-A605-32EA7DAC172E,703AF700-7A70-47E2-BC3A-7FD03B3CA9C1,A2572D17-1DE6-457B-99CC-64AFD54487EA,DEECE5FC-CACF-4496-A3E7-164736409252,EE249E1B-A1FD-4E08-AA71-A0E1F10FFE97,9BBCD86A-E6C7-4444-9D74-F861084090F0,E5ED5807-55B7-47C5-97A6-03233F4FBC3A}'); diff --git a/pkg/models/tests/epss.sql b/pkg/models/tests/epss.sql index 3a251c2..99a4b0b 100644 --- a/pkg/models/tests/epss.sql +++ b/pkg/models/tests/epss.sql @@ -1,10 +1,4 @@ -DROP TABLE IF EXISTS epss_data; -CREATE TABLE "epss_data" ( - "cve" TEXT NOT NULL UNIQUE, - "epss" REAL NOT NULL, - "percentile" REAL NOT NULL, - PRIMARY KEY ("cve") -); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. INSERT INTO epss_data (cve, epss, percentile) VALUES ('CVE-2017-9302', 0.00143, 0.5124); INSERT INTO epss_data (cve, epss, percentile) VALUES ('CVE-2015-0269', 0.00285, 0.6832); -INSERT INTO epss_data (cve, epss, percentile) VALUES ('CVE-2018-10083', 0.00891, 0.8215); \ No newline at end of file +INSERT INTO epss_data (cve, epss, percentile) VALUES ('CVE-2018-10083', 0.00891, 0.8215); diff --git a/pkg/models/tests/golang_projects.sql b/pkg/models/tests/golang_projects.sql index bdd8753..3c39a9a 100644 --- a/pkg/models/tests/golang_projects.sql +++ b/pkg/models/tests/golang_projects.sql @@ -1,26 +1,4 @@ -DROP TABLE IF EXISTS golang_projects; -CREATE TABLE golang_projects -( - component text not null, - version text not null, - version_id integer not null, - version_date text not null, - is_module boolean, - is_package boolean, - license text not null, - license_id integer not null, - has_valid_go_mod_file boolean, - has_redistributable_license boolean, - has_tagged_version boolean, - has_stable_version boolean, - repository text not null, - is_indexed boolean, - purl_name text not null, - mine_id integer not null, - index_timestamp text not null, - primary key (purl_name, version) -); - -INSERT INTO golang_projects (component, version, version_id, version_date, license, license_id, repository, purl_name, mine_id, index_timestamp, is_indexed) VALUES ('github.com/scanoss/papi', 'v0.0.1', 19541010, '', 'MIT', 5614, 'github.com/scanoss/papi', 'github.com/scanoss/papi', 45, '2022-02-21T19:51:21.112979Z', True); -INSERT INTO golang_projects (component, version, version_id, version_date, license, license_id, repository, purl_name, mine_id, index_timestamp, is_indexed) VALUES ('google.golang.org/grpc', 'v1.19.0', 5193086, '', 'Apache-2.0', 552, 'github.com/grpc/grpc-go', 'google.golang.org/grpc', 45, '2022-05-09T20:17:02.339878Z', True); -INSERT INTO golang_projects (component, version, version_id, version_date, license, license_id, repository, purl_name, mine_id, index_timestamp, is_indexed) VALUES ('google.golang.org/grpc', 'v1.7.0', 11640350, '', '', 9999, 'github.com/grpc/grpc-go', 'google.golang.org/grpc', 45, '2023-11-24T20:17:02.339878Z', True); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO golang_projects (component, version_id, version_date, license_id, purl_name, mine_id, is_indexed) VALUES ('github.com/scanoss/papi', 19541010, '', 5614, 'github.com/scanoss/papi', 45, True); +INSERT INTO golang_projects (component, version_id, version_date, license_id, purl_name, mine_id, is_indexed) VALUES ('google.golang.org/grpc', 5193086, '', 552, 'google.golang.org/grpc', 45, True); +INSERT INTO golang_projects (component, version_id, version_date, license_id, purl_name, mine_id, is_indexed) VALUES ('google.golang.org/grpc', 11640350, '', 9999, 'google.golang.org/grpc', 45, True); diff --git a/pkg/models/tests/licenses.sql b/pkg/models/tests/licenses.sql index 03892e5..2386088 100644 --- a/pkg/models/tests/licenses.sql +++ b/pkg/models/tests/licenses.sql @@ -1,21 +1,12 @@ -DROP TABLE IF EXISTS licenses; -CREATE TABLE licenses -( - id INTEGER PRIMARY KEY AUTOINCREMENT, - license_name text not null unique, - spdx_id text not null default '', - is_spdx boolean not null default false, - is_sanitized boolean not null default false -); - -insert into licenses (id, license_name, spdx_id, is_spdx) values (15, 'GPL-2 or GPL-3', 'GPL-2.0-only/GPL-3.0-only/DoesNotExist', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (109, '3-Clause BSD License', 'BSD-3-Clause', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (552, 'Apache 2.0', 'Apache-2.0', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (850, 'Apache License 2.0', 'Apache-2.0', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (1378, 'BSD', '0BSD', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (2815,'GPL-2.0-only','GPL-2.0-only',true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (2821,'GPL-3.0-only','GPL-3.0-only',true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (4863, 'ISC', 'ISC', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (5236, 'LGPLv2.1+', 'LGPL-2.1-or-later', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (5614, 'MIT', 'MIT', true); -insert into licenses (id, license_name, spdx_id, is_spdx) values (9999, '', '', false); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (15, 'GPL-2 or GPL-3', 'GPL-2.0-only/GPL-3.0-only/DoesNotExist', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (109, '3-Clause BSD License', 'BSD-3-Clause', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (552, 'Apache 2.0', 'Apache-2.0', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (850, 'Apache License 2.0', 'Apache-2.0', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (1378, 'BSD', '0BSD', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (2815, 'GPL-2.0-only', 'GPL-2.0-only', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (2821, 'GPL-3.0-only', 'GPL-3.0-only', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (4863, 'ISC', 'ISC', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (5236, 'LGPLv2.1+', 'LGPL-2.1-or-later', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (5614, 'MIT', 'MIT', true); +INSERT INTO licenses (id, license_name, spdx_id, is_spdx) VALUES (9999, '', '', false); diff --git a/pkg/models/tests/mines.sql b/pkg/models/tests/mines.sql index 1531a24..6d3da3c 100644 --- a/pkg/models/tests/mines.sql +++ b/pkg/models/tests/mines.sql @@ -1,11 +1,4 @@ -DROP TABLE IF EXISTS mines; -CREATE TABLE mines ( - id INTEGER PRIMARY KEY, - purl_type TEXT DEFAULT '', - mine_name TEXT -); - - +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. INSERT INTO mines (id, mine_name, purl_type) VALUES (0, 'maven.org', 'maven'); INSERT INTO mines (id, mine_name, purl_type) VALUES (1, 'rubygems.org', 'gem'); INSERT INTO mines (id, mine_name, purl_type) VALUES (2, 'npmjs.org', 'npm'); @@ -52,4 +45,3 @@ INSERT INTO mines (id, mine_name, purl_type) VALUES (42, 'crates.io', 'cargo'); INSERT INTO mines (id, mine_name, purl_type) VALUES (43, 'eclipse.org', 'eclipse'); INSERT INTO mines (id, mine_name, purl_type) VALUES (44, 'eclipse.org', 'gitlab'); INSERT INTO mines (id, mine_name, purl_type) VALUES (45, 'golang.org', 'golang'); - diff --git a/pkg/models/tests/ndv_match_criteria_ids.sql b/pkg/models/tests/ndv_match_criteria_ids.sql index f0da12f..b4e6fdd 100644 --- a/pkg/models/tests/ndv_match_criteria_ids.sql +++ b/pkg/models/tests/ndv_match_criteria_ids.sql @@ -1,25 +1,11 @@ -DROP TABLE IF EXISTS nvd_match_criteria_ids; -CREATE TABLE nvd_match_criteria_ids -( - match_criteria_id text not null - constraint nvd_match_criteria_ids_pk_1 - primary key, - cpe_ids integer[] not null, - version_start_including text, - version_start_excluding text, - version_end_including text, - version_end_excluding text, - short_cpe_id integer -); - - -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('6AA6464B-7C66-4ABA-A655-E63CE3CD361B', '{}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('31F486B4-9293-4C09-A7A5-CC0ED9643415', '{1958139}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('3297FAF2-7DF3-4EAC-99DD-D83093846780', '{1822755, 158765}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('BB3DD9A8-684A-4D3C-AAC1-795A5154B8FF', '{1958142}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('CF27FE4D-4019-44CB-B86A-0F6EB22043EE', '{1958143}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('2355C9C3-17D4-4024-B60A-55E698139269', '{1958144}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('4BF4A874-DE47-4662-82E8-899258ABCAA4', '{1958145}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('A088E6AE-B04B-4BF2-9710-875767A17644', '{1958146}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('C499F62B-EE47-4F90-8E0C-BE5B3A95E6EB', '{1958147}', '', '', '', '', null); -INSERT INTO nvd_match_criteria_ids (match_criteria_id, cpe_ids, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('D9BE19EE-D1C3-4688-A614-0E906F949768', '{1958148}', '', '', '', '', null); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('6AA6464B-7C66-4ABA-A655-E63CE3CD361B', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('31F486B4-9293-4C09-A7A5-CC0ED9643415', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('3297FAF2-7DF3-4EAC-99DD-D83093846780', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('BB3DD9A8-684A-4D3C-AAC1-795A5154B8FF', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('CF27FE4D-4019-44CB-B86A-0F6EB22043EE', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('2355C9C3-17D4-4024-B60A-55E698139269', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('4BF4A874-DE47-4662-82E8-899258ABCAA4', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('A088E6AE-B04B-4BF2-9710-875767A17644', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('C499F62B-EE47-4F90-8E0C-BE5B3A95E6EB', '', '', '', '', null); +INSERT INTO nvd_match_criteria_ids (match_criteria_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding, short_cpe_id) VALUES ('D9BE19EE-D1C3-4688-A614-0E906F949768', '', '', '', '', null); diff --git a/pkg/models/tests/projects.sql b/pkg/models/tests/projects.sql index c8ef5ba..2f35f69 100644 --- a/pkg/models/tests/projects.sql +++ b/pkg/models/tests/projects.sql @@ -1,55 +1,29 @@ -DROP TABLE IF EXISTS projects; -CREATE TABLE projects -( - mine_id integer NOT NULL, - vendor text NOT NULL, - component text NOT NULL, - first_version_date text, - latest_version_date text, - license text, - versions integer, - source_vendor text, - source_component text, - git_created_at text, - git_updated_at text, - git_pushed_at text, - git_watchers integer, - git_issues integer, - git_forks integer, - git_license text, - source_mine_id integer, - purl_name text NOT NULL, - source_purl_name text, - verified text, - license_id integer, - git_license_id integer, - PRIMARY KEY (mine_id, purl_name) -); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (1, 'taballa.hp-PD', 'tablestyle', '2013-07-05', '2013-08-26', 'MIT', 8, null, null, null, null, null, null, null, null, null, null, 'tablestyle', null, null, 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Sindre Sorhus', 'electron-debug', '2015-06-01', '2020-12-21', 'MIT', 28, 'sindresorhus', 'electron-debug', '2015-06-01', '2022-01-10', '2021-01-23', 693, 11, 55, 'MIT', 5, 'electron-debug', 'sindresorhus/electron-debug', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Shane Harris', 'node-blob', '2019-03-21', '2019-03-21', 'MIT', 2, 'shaneharris', 'node-blob', null, null, null, null, null, null, null, 5, 'node-blob', 'shaneharris/node-blob', '2021-05-24', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Gergely Hornich', 'sort-paths', '2016-09-03', '2018-08-18', 'MIT', 3, 'ghornich', 'sort-paths', null, null, null, null, null, null, null, 5, 'sort-paths', 'ghornich/sort-paths', '2021-05-24', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'David Frank', 'node-fetch', '2015-01-27', '2021-12-19', 'MIT', 69, 'bitinn', 'node-fetch', null, null, null, null, null, null, null, 5, 'node-fetch', 'bitinn/node-fetch', '2021-05-24', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'npmjs', 'chart.js', '2014-07-08', '2021-12-23', 'MIT', 77, 'chartjs', 'Chart.js', '2013-03-17', '2022-01-11', '2022-01-11', 55830, 113, 11333, 'MIT', 5, 'chart.js', 'chartjs/chart.js', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Sindre Sorhus', 'p-queue', '2016-10-28', '2021-04-07', 'MIT', 34, 'sindresorhus', 'p-queue', '2016-10-28', '2022-01-12', '2021-12-15', 1879, 31, 136, 'MIT', 5, 'p-queue', 'sindresorhus/p-queue', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Ben Newman', 'regenerator-runtime', '2014-07-04', '2021-07-22', 'MIT', 27, 'facebook', 'regenerator', '2013-10-05', '2022-01-05', '2022-01-11', 3620, 77, 1186, 'MIT', 5, 'regenerator-runtime', 'facebook/regenerator', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Conor Hastings', 'react-syntax-highlighter', '2016-01-27', '2021-11-12', 'MIT', 121, 'react-syntax-highlighter', 'react-syntax-highlighter', '2016-01-27', '2022-01-11', '2021-11-15', 2449, 75, 195, 'MIT', 5, 'react-syntax-highlighter', 'react-syntax-highlighter/react-syntax-highlighter', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'npmjs', 'source-map-support', '2013-01-18', '2021-11-19', 'MIT', 66, 'evanw', 'node-source-map-support', '2013-01-18', '2022-01-11', '2022-01-10', 1953, 102, 226, 'MIT', 5, 'source-map-support', 'evanw/node-source-map-support', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Etienne Lemay', 'react-dom', '2014-05-06', '2021-12-24', 'MIT', 694, 'facebook', 'react', '2013-05-24', '2022-01-12', '2022-01-11', 180572, 915, 36701, 'MIT', 5, 'react-dom', 'facebook/react', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'npmjs', 'isbinaryfile', '2012-10-09', '2021-04-29', 'MIT', 30, 'gjtorikian', 'isBinaryFile', '2012-10-08', '2021-11-24', '2021-09-24', 141, 3, 20, 'MIT', 5, 'isbinaryfile', 'gjtorikian/isbinaryfile', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Vladimir Krivosheev', 'electron-updater', '2015-05-01', '2021-12-01', 'MIT', 224, 'electron-userland', 'electron-builder', '2015-05-21', '2022-01-12', '2022-01-12', 11707, 308, 1471, 'MIT', 5, 'electron-updater', 'electron-userland/electron-builder', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Alexey Prokhorov', 'electron-log', '2016-05-02', '2021-12-27', 'MIT', 101, 'megahertz', 'electron-log', '2016-05-02', '2022-01-10', '2021-12-27', 899, 11, 117, 'MIT', 5, 'electron-log', 'megahertz/electron-log', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Jake Zatecky', 'react-checkbox-tree', '2016-02-04', '2021-08-09', 'MIT', 47, 'jakezatecky', 'react-checkbox-tree', '2016-02-04', '2022-01-09', '2022-01-03', 552, 80, 165, 'MIT', 5, 'react-checkbox-tree', 'jakezatecky/react-checkbox-tree', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'React Training', 'history', '2012-04-29', '2021-12-17', 'MIT', 99, 'ReactTraining', 'history', '2015-07-18', '2021-08-12', '2021-08-12', 7099, 115, 841, 'MIT', 5, 'history', 'reacttraining/history', '2021-08-12', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Nikhil Marathe', 'uuid', '2011-03-31', '2021-11-29', 'MIT', 34, 'uuidjs', 'uuid', '2010-12-28', '2022-01-11', '2022-01-04', 11878, 20, 797, 'MIT', 5, 'uuid', 'uuidjs/uuid', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Jeff Barczewski', 'react', '2011-10-26', '2021-12-28', 'MIT', 739, 'facebook', 'react', '2013-05-24', '2022-01-12', '2022-01-11', 180572, 915, 36701, 'MIT', 5, 'react', 'facebook/react', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'React Training', 'react-router-dom', '2016-12-14', '2021-12-17', 'MIT', 64, 'ReactTraining', 'react-router', '2014-05-16', '2021-08-12', '2021-08-11', 43727, 59, 8505, 'MIT', 5, 'react-router-dom', 'reacttraining/react-router', '2021-08-12', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Felix Geisendörfer', 'form-data', '2011-05-16', '2021-02-15', 'MIT', 38, 'form-data', 'form-data', '2011-05-16', '2022-01-11', '2021-11-30', 1962, 111, 256, 'MIT', 5, 'form-data', 'form-data/form-data', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'Toru Nagashima', 'abort-controller', '2017-09-29', '2019-03-30', 'MIT', 11, 'mysticatea', 'abort-controller', '2017-09-29', '2021-12-30', '2021-03-30', 258, 17, 25, 'MIT', 5, 'abort-controller', 'mysticatea/abort-controller', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (2, 'tomkp', 'react-split-pane', '2015-06-14', '2020-08-10', 'MIT', 89, 'tomkp', 'react-split-pane', '2015-03-06', '2022-01-11', '2021-11-26', 2689, 142, 345, 'MIT', 5, 'react-split-pane', 'tomkp/react-split-pane', '2022-01-11', 5614, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'Audrey Roy Greenfeld', 'binaryornot', '2013-08-17', '2017-08-03', 'BSD', 8, 'audreyr', 'binaryornot', null, null, null, null, null, null, null, 5, 'binaryornot', 'audreyr/binaryornot', '2021-05-24', 1378, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'The gRPC Authors', 'grpcio', '2015-03-30', '2021-12-16', 'Apache License 2.0', 165, null, null, null, null, null, null, null, null, null, null, 'grpcio', null, null, 850, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'Kenneth Reitz', 'requests', '2011-02-14', '2022-01-05', 'Apache 2.0', 145, 'psf', 'requests', '2011-02-13', '2022-01-11', '2022-01-11', 46668, 221, 8589, 'Apache-2.0', 5, 'requests', 'psf/requests', '2022-01-11', 552, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'Giorgos Verigakis', 'progress', '2012-04-18', '2021-07-28', 'ISC', 9, 'verigak', 'progress', '2012-04-18', '2022-01-11', '2021-11-15', 1119, 28, 161, null, 5, 'progress', 'verigak/progress', '2022-01-11', 4863, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'pypi', 'protobuf', '2008-07-10', '2021-10-29', '3-Clause BSD License', 92, 'protocolbuffers', 'protobuf', '2014-08-26', '2022-01-12', '2022-01-11', 52549, 1018, 13622, null, 5, 'protobuf', 'protocolbuffers/protobuf', '2022-01-11', 109, 9999); -insert into projects (mine_id, vendor, component, first_version_date, latest_version_date, license, versions, source_vendor, source_component, git_created_at, git_updated_at, git_pushed_at, git_watchers, git_issues, git_forks, git_license, source_mine_id, purl_name, source_purl_name, verified, license_id, git_license_id) values (3, 'The ICRAR DIA Team', 'crc32c', '2017-06-07', '2021-06-25', 'LGPLv2.1+', 13, 'ICRAR', 'crc32c', '2017-06-07', '2021-10-15', '2021-06-25', 26, 0, 15, null, 5, 'crc32c', 'icrar/crc32c', '2022-01-11', 5236, 9999); +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (1, 'taballa.hp-PD', 'tablestyle', '2013-07-05', 8, null, null, null, 'tablestyle', null, 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Sindre Sorhus', 'electron-debug', '2015-06-01', 28, '2015-06-01', 55, 5, 'electron-debug', 'sindresorhus/electron-debug', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Shane Harris', 'node-blob', '2019-03-21', 2, null, null, 5, 'node-blob', 'shaneharris/node-blob', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Gergely Hornich', 'sort-paths', '2016-09-03', 3, null, null, 5, 'sort-paths', 'ghornich/sort-paths', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'David Frank', 'node-fetch', '2015-01-27', 69, null, null, 5, 'node-fetch', 'bitinn/node-fetch', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'npmjs', 'chart.js', '2014-07-08', 77, '2013-03-17', 11333, 5, 'chart.js', 'chartjs/chart.js', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Sindre Sorhus', 'p-queue', '2016-10-28', 34, '2016-10-28', 136, 5, 'p-queue', 'sindresorhus/p-queue', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Ben Newman', 'regenerator-runtime', '2014-07-04', 27, '2013-10-05', 1186, 5, 'regenerator-runtime', 'facebook/regenerator', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Conor Hastings', 'react-syntax-highlighter', '2016-01-27', 121, '2016-01-27', 195, 5, 'react-syntax-highlighter', 'react-syntax-highlighter/react-syntax-highlighter', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'npmjs', 'source-map-support', '2013-01-18', 66, '2013-01-18', 226, 5, 'source-map-support', 'evanw/node-source-map-support', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Etienne Lemay', 'react-dom', '2014-05-06', 694, '2013-05-24', 36701, 5, 'react-dom', 'facebook/react', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'npmjs', 'isbinaryfile', '2012-10-09', 30, '2012-10-08', 20, 5, 'isbinaryfile', 'gjtorikian/isbinaryfile', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Vladimir Krivosheev', 'electron-updater', '2015-05-01', 224, '2015-05-21', 1471, 5, 'electron-updater', 'electron-userland/electron-builder', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Alexey Prokhorov', 'electron-log', '2016-05-02', 101, '2016-05-02', 117, 5, 'electron-log', 'megahertz/electron-log', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Jake Zatecky', 'react-checkbox-tree', '2016-02-04', 47, '2016-02-04', 165, 5, 'react-checkbox-tree', 'jakezatecky/react-checkbox-tree', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'React Training', 'history', '2012-04-29', 99, '2015-07-18', 841, 5, 'history', 'reacttraining/history', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Nikhil Marathe', 'uuid', '2011-03-31', 34, '2010-12-28', 797, 5, 'uuid', 'uuidjs/uuid', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Jeff Barczewski', 'react', '2011-10-26', 739, '2013-05-24', 36701, 5, 'react', 'facebook/react', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'React Training', 'react-router-dom', '2016-12-14', 64, '2014-05-16', 8505, 5, 'react-router-dom', 'reacttraining/react-router', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Felix Geisendörfer', 'form-data', '2011-05-16', 38, '2011-05-16', 256, 5, 'form-data', 'form-data/form-data', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'Toru Nagashima', 'abort-controller', '2017-09-29', 11, '2017-09-29', 25, 5, 'abort-controller', 'mysticatea/abort-controller', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (2, 'tomkp', 'react-split-pane', '2015-06-14', 89, '2015-03-06', 345, 5, 'react-split-pane', 'tomkp/react-split-pane', 5614, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'Audrey Roy Greenfeld', 'binaryornot', '2013-08-17', 8, null, null, 5, 'binaryornot', 'audreyr/binaryornot', 1378, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'The gRPC Authors', 'grpcio', '2015-03-30', 165, null, null, null, 'grpcio', null, 850, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'Kenneth Reitz', 'requests', '2011-02-14', 145, '2011-02-13', 8589, 5, 'requests', 'psf/requests', 552, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'Giorgos Verigakis', 'progress', '2012-04-18', 9, '2012-04-18', 161, 5, 'progress', 'verigak/progress', 4863, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'pypi', 'protobuf', '2008-07-10', 92, '2014-08-26', 13622, 5, 'protobuf', 'protocolbuffers/protobuf', 109, 9999); +INSERT INTO projects (mine_id, vendor, component, first_version_date, versions, git_created_at, git_forks, source_mine_id, purl_name, source_purl_name, license_id, git_license_id) VALUES (3, 'The ICRAR DIA Team', 'crc32c', '2017-06-07', 13, '2017-06-07', 15, 5, 'crc32c', 'icrar/crc32c', 5236, 9999); diff --git a/pkg/models/tests/purl.sql b/pkg/models/tests/purl.sql index acba7bd..bce9f99 100644 --- a/pkg/models/tests/purl.sql +++ b/pkg/models/tests/purl.sql @@ -1,59 +1,51 @@ -DROP TABLE IF EXISTS purls; -CREATE TABLE "purls" ( - "id" INTEGER NOT NULL, - "purl" TEXT NOT NULL UNIQUE, - PRIMARY KEY("id" AUTOINCREMENT) -); - - -INSERT INTO purls ("id", "purl") VALUES (1176, 'pkg:github/wpplugins/candidate-application-form'); -INSERT INTO purls ("id", "purl") VALUES (1646, 'pkg:rpm/opensuse/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (1739, 'pkg:rpm/fedora/capstone'); -INSERT INTO purls ("id", "purl") VALUES (2429, 'pkg:github/ruxkor/checkinstall'); -INSERT INTO purls ("id", "purl") VALUES (2595, 'pkg:deb/ubuntu/screen-resolution-extra'); -INSERT INTO purls ("id", "purl") VALUES (3023, 'pkg:deb/debian/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (4048, 'pkg:github/hapijs/call'); -INSERT INTO purls ("id", "purl") VALUES (5153, 'pkg:deb/ubuntu/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (6062, 'pkg:rpm/opensuse/lxd'); -INSERT INTO purls ("id", "purl") VALUES (6121, 'pkg:github/capstone-engine/capstone'); -INSERT INTO purls ("id", "purl") VALUES (6781, 'pkg:npm/comb'); -INSERT INTO purls ("id", "purl") VALUES (7072, 'pkg:rpm/opensuse/snapd'); -INSERT INTO purls ("id", "purl") VALUES (8505, 'pkg:github/calderawp/caldera-forms'); -INSERT INTO purls ("id", "purl") VALUES (9550, 'pkg:gitlab/redhat/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (9741, 'pkg:github/cantemo/portal-docker'); -INSERT INTO purls ("id", "purl") VALUES (10060, 'pkg:maven/org.webjars.npm/cached-path-relative'); -INSERT INTO purls ("id", "purl") VALUES (10316, 'pkg:npm/%40hapi/call'); -INSERT INTO purls ("id", "purl") VALUES (10569, 'pkg:rpm/fedora/snapd'); -INSERT INTO purls ("id", "purl") VALUES (10692, 'pkg:rpm/centos/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (11242, 'pkg:deb/ubuntu/snapd'); -INSERT INTO purls ("id", "purl") VALUES (11524, 'pkg:github/thtas/campaignmonitor'); -INSERT INTO purls ("id", "purl") VALUES (11962, 'pkg:github/maas/maas'); -INSERT INTO purls ("id", "purl") VALUES (12025, 'pkg:github/wp-plugins/caldera-forms'); -INSERT INTO purls ("id", "purl") VALUES (12377, 'pkg:github/cunaedy/cart-engine'); -INSERT INTO purls ("id", "purl") VALUES (14558, 'pkg:github/selinuxproject/selinux'); -INSERT INTO purls ("id", "purl") VALUES (14642, 'pkg:deb/debian/capstone'); -INSERT INTO purls ("id", "purl") VALUES (15022, 'pkg:github/lxc/lxd'); -INSERT INTO purls ("id", "purl") VALUES (17269, 'pkg:github/wpplugins/caldera-forms'); -INSERT INTO purls ("id", "purl") VALUES (17342, 'pkg:rpm/opensuse/capstone'); -INSERT INTO purls ("id", "purl") VALUES (17507, 'pkg:github/wp-plugins/konnichiwa'); -INSERT INTO purls ("id", "purl") VALUES (17949, 'pkg:deb/debian/snapd'); -INSERT INTO purls ("id", "purl") VALUES (18047, 'pkg:deb/ubuntu/maas'); -INSERT INTO purls ("id", "purl") VALUES (18591, 'pkg:deb/ubuntu/node-cached-path-relative'); -INSERT INTO purls ("id", "purl") VALUES (19304, 'pkg:github/c2fo/comb'); -INSERT INTO purls ("id", "purl") VALUES (19906, 'pkg:github/pld-linux/jbigkit/'); -INSERT INTO purls ("id", "purl") VALUES (20614, 'pkg:deb/ubuntu/update-manager'); -INSERT INTO purls ("id", "purl") VALUES (22410, 'pkg:github/snapcore/snapd'); -INSERT INTO purls ("id", "purl") VALUES (22665, 'pkg:deb/debian/node-cached-path-relative'); -INSERT INTO purls ("id", "purl") VALUES (22770, 'pkg:github/candlepin/candlepin'); -INSERT INTO purls ("id", "purl") VALUES (22887, 'pkg:github/ashaffer/cached-path-relative'); -INSERT INTO purls ("id", "purl") VALUES (22890, 'pkg:npm/cached-path-relative'); -INSERT INTO purls ("id", "purl") VALUES (23242, 'pkg:deb/ubuntu/selinux'); -INSERT INTO purls ("id", "purl") VALUES (23260, 'pkg:rpm/fedora/jbigkit'); -INSERT INTO purls ("id", "purl") VALUES (24096, 'pkg:github/giuliomoro/checkinstall'); -INSERT INTO purls ("id", "purl") VALUES (24116, 'pkg:github/swatinem/rust-cache'); -INSERT INTO purls ("id", "purl") VALUES (24539, 'pkg:github/tseliot/screen-resolution-extra'); -INSERT INTO purls ("id", "purl") VALUES (24815, 'pkg:npm/calmquist.static-server'); -INSERT INTO purls ("id", "purl") VALUES (25014, 'pkg:github/jaemk/cached'); -INSERT INTO purls ("id", "purl") VALUES (25794, 'pkg:github/wp-plugins/candidate-application-form'); -INSERT INTO purls ("id", "purl") VALUES (26613, 'pkg:github/ubports/ubuntu-download-manager'); - +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO purls (id, purl) VALUES (1176, 'pkg:github/wpplugins/candidate-application-form'); +INSERT INTO purls (id, purl) VALUES (1646, 'pkg:rpm/opensuse/jbigkit'); +INSERT INTO purls (id, purl) VALUES (1739, 'pkg:rpm/fedora/capstone'); +INSERT INTO purls (id, purl) VALUES (2429, 'pkg:github/ruxkor/checkinstall'); +INSERT INTO purls (id, purl) VALUES (2595, 'pkg:deb/ubuntu/screen-resolution-extra'); +INSERT INTO purls (id, purl) VALUES (3023, 'pkg:deb/debian/jbigkit'); +INSERT INTO purls (id, purl) VALUES (4048, 'pkg:github/hapijs/call'); +INSERT INTO purls (id, purl) VALUES (5153, 'pkg:deb/ubuntu/jbigkit'); +INSERT INTO purls (id, purl) VALUES (6062, 'pkg:rpm/opensuse/lxd'); +INSERT INTO purls (id, purl) VALUES (6121, 'pkg:github/capstone-engine/capstone'); +INSERT INTO purls (id, purl) VALUES (6781, 'pkg:npm/comb'); +INSERT INTO purls (id, purl) VALUES (7072, 'pkg:rpm/opensuse/snapd'); +INSERT INTO purls (id, purl) VALUES (8505, 'pkg:github/calderawp/caldera-forms'); +INSERT INTO purls (id, purl) VALUES (9550, 'pkg:gitlab/redhat/jbigkit'); +INSERT INTO purls (id, purl) VALUES (9741, 'pkg:github/cantemo/portal-docker'); +INSERT INTO purls (id, purl) VALUES (10060, 'pkg:maven/org.webjars.npm/cached-path-relative'); +INSERT INTO purls (id, purl) VALUES (10316, 'pkg:npm/%40hapi/call'); +INSERT INTO purls (id, purl) VALUES (10569, 'pkg:rpm/fedora/snapd'); +INSERT INTO purls (id, purl) VALUES (10692, 'pkg:rpm/centos/jbigkit'); +INSERT INTO purls (id, purl) VALUES (11242, 'pkg:deb/ubuntu/snapd'); +INSERT INTO purls (id, purl) VALUES (11524, 'pkg:github/thtas/campaignmonitor'); +INSERT INTO purls (id, purl) VALUES (11962, 'pkg:github/maas/maas'); +INSERT INTO purls (id, purl) VALUES (12025, 'pkg:github/wp-plugins/caldera-forms'); +INSERT INTO purls (id, purl) VALUES (12377, 'pkg:github/cunaedy/cart-engine'); +INSERT INTO purls (id, purl) VALUES (14558, 'pkg:github/selinuxproject/selinux'); +INSERT INTO purls (id, purl) VALUES (14642, 'pkg:deb/debian/capstone'); +INSERT INTO purls (id, purl) VALUES (15022, 'pkg:github/lxc/lxd'); +INSERT INTO purls (id, purl) VALUES (17269, 'pkg:github/wpplugins/caldera-forms'); +INSERT INTO purls (id, purl) VALUES (17342, 'pkg:rpm/opensuse/capstone'); +INSERT INTO purls (id, purl) VALUES (17507, 'pkg:github/wp-plugins/konnichiwa'); +INSERT INTO purls (id, purl) VALUES (17949, 'pkg:deb/debian/snapd'); +INSERT INTO purls (id, purl) VALUES (18047, 'pkg:deb/ubuntu/maas'); +INSERT INTO purls (id, purl) VALUES (18591, 'pkg:deb/ubuntu/node-cached-path-relative'); +INSERT INTO purls (id, purl) VALUES (19304, 'pkg:github/c2fo/comb'); +INSERT INTO purls (id, purl) VALUES (19906, 'pkg:github/pld-linux/jbigkit/'); +INSERT INTO purls (id, purl) VALUES (20614, 'pkg:deb/ubuntu/update-manager'); +INSERT INTO purls (id, purl) VALUES (22410, 'pkg:github/snapcore/snapd'); +INSERT INTO purls (id, purl) VALUES (22665, 'pkg:deb/debian/node-cached-path-relative'); +INSERT INTO purls (id, purl) VALUES (22770, 'pkg:github/candlepin/candlepin'); +INSERT INTO purls (id, purl) VALUES (22887, 'pkg:github/ashaffer/cached-path-relative'); +INSERT INTO purls (id, purl) VALUES (22890, 'pkg:npm/cached-path-relative'); +INSERT INTO purls (id, purl) VALUES (23242, 'pkg:deb/ubuntu/selinux'); +INSERT INTO purls (id, purl) VALUES (23260, 'pkg:rpm/fedora/jbigkit'); +INSERT INTO purls (id, purl) VALUES (24096, 'pkg:github/giuliomoro/checkinstall'); +INSERT INTO purls (id, purl) VALUES (24116, 'pkg:github/swatinem/rust-cache'); +INSERT INTO purls (id, purl) VALUES (24539, 'pkg:github/tseliot/screen-resolution-extra'); +INSERT INTO purls (id, purl) VALUES (24815, 'pkg:npm/calmquist.static-server'); +INSERT INTO purls (id, purl) VALUES (25014, 'pkg:github/jaemk/cached'); +INSERT INTO purls (id, purl) VALUES (25794, 'pkg:github/wp-plugins/candidate-application-form'); +INSERT INTO purls (id, purl) VALUES (26613, 'pkg:github/ubports/ubuntu-download-manager'); diff --git a/pkg/models/tests/short_cpe.sql b/pkg/models/tests/short_cpe.sql index 272f3e3..bd93c89 100644 --- a/pkg/models/tests/short_cpe.sql +++ b/pkg/models/tests/short_cpe.sql @@ -1,30 +1,24 @@ -DROP TABLE IF EXISTS short_cpes; -CREATE TABLE "short_cpes" ( - "id" INTEGER NOT NULL, - "short_cpe" TEXT NOT NULL UNIQUE, - PRIMARY KEY("id" AUTOINCREMENT) -); - -INSERT INTO short_cpes ("id", "short_cpe") VALUES (4772, 'cpe:2.3:a:c2fo:comb'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (4970, 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (6591, 'cpe:2.3:a:cantemo:portal'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (6930, 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (8270, 'cpe:2.3:a:candidate-application-form_project:candidate-application-form'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (8296, 'cpe:2.3:a:capstone-engine:capstone'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (17559, 'cpe:2.3:a:canonical:checkinstall'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (9517, 'cpe:2.3:a:cazche_project:cache'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (11798, 'cpe:2.3:a:canonical:update-manager'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (24723, 'cpe:2.3:a:calmquist.static-server_project:calmquist.static-server'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (32816, 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (20819, 'cpe:2.3:a:canonical:screen-resolution-extra'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (31044, 'cpe:2.3:a:calendarscripts:konnichiwa'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (23153, 'cpe:2.3:a:candlepinproject:candlepin'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (36858, 'cpe:2.3:a:canonical:lxd'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (40143, 'cpe:2.3:a:calderalabs:caldera_forms'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (40676, 'cpe:2.3:a:c97:cart_engine'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (44876, 'cpe:2.3:a:campaign_monitor_project:campaign_monitor'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (48168, 'cpe:2.3:a:canonical:selinux'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (48783, 'cpe:2.3:a:canonical:ubuntu_download_manager'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (50021, 'cpe:2.3:a:call_project:call'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (54486, 'cpe:2.3:a:canonical:metal_as_a_service'); -INSERT INTO short_cpes ("id", "short_cpe") VALUES (54546, 'cpe:2.3:a:cached_project:cached'); \ No newline at end of file +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO short_cpes (id) VALUES (4772); +INSERT INTO short_cpes (id) VALUES (4970); +INSERT INTO short_cpes (id) VALUES (6591); +INSERT INTO short_cpes (id) VALUES (6930); +INSERT INTO short_cpes (id) VALUES (8270); +INSERT INTO short_cpes (id) VALUES (8296); +INSERT INTO short_cpes (id) VALUES (17559); +INSERT INTO short_cpes (id) VALUES (9517); +INSERT INTO short_cpes (id) VALUES (11798); +INSERT INTO short_cpes (id) VALUES (24723); +INSERT INTO short_cpes (id) VALUES (32816); +INSERT INTO short_cpes (id) VALUES (20819); +INSERT INTO short_cpes (id) VALUES (31044); +INSERT INTO short_cpes (id) VALUES (23153); +INSERT INTO short_cpes (id) VALUES (36858); +INSERT INTO short_cpes (id) VALUES (40143); +INSERT INTO short_cpes (id) VALUES (40676); +INSERT INTO short_cpes (id) VALUES (44876); +INSERT INTO short_cpes (id) VALUES (48168); +INSERT INTO short_cpes (id) VALUES (48783); +INSERT INTO short_cpes (id) VALUES (50021); +INSERT INTO short_cpes (id) VALUES (54486); +INSERT INTO short_cpes (id) VALUES (54546); diff --git a/pkg/models/tests/short_cpe_purl.sql b/pkg/models/tests/short_cpe_purl.sql index 0fb3648..d33278b 100644 --- a/pkg/models/tests/short_cpe_purl.sql +++ b/pkg/models/tests/short_cpe_purl.sql @@ -1,61 +1,51 @@ -DROP TABLE IF EXISTS short_cpe_purl; - -CREATE TABLE "short_cpe_purl" -( - cpe_id integer NOT NULL, - purl_id integer NOT NULL, - purl text, - short_cpe text, - PRIMARY KEY(cpe_id,purl_id) -); - -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4772, 19304, 'pkg:github/c2fo/comb', 'cpe:2.3:a:c2fo:comb'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4772, 6781, 'pkg:npm/comb', 'cpe:2.3:a:c2fo:comb'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (40676, 12377, 'pkg:github/cunaedy/cart-engine', 'cpe:2.3:a:c97:cart_engine'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6930, 22887, 'pkg:github/ashaffer/cached-path-relative', 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6930, 22665, 'pkg:deb/debian/node-cached-path-relative', 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6930, 18591, 'pkg:deb/ubuntu/node-cached-path-relative', 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6930, 10060, 'pkg:maven/org.webjars.npm/cached-path-relative', 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6930, 22890, 'pkg:npm/cached-path-relative', 'cpe:2.3:a:cached-path-relative_project:cached-path-relative'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (54546, 25014, 'pkg:github/jaemk/cached', 'cpe:2.3:a:cached_project:cached'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (9517, 24116, 'pkg:github/swatinem/rust-cache', 'cpe:2.3:a:cazche_project:cache'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (40143, 8505, 'pkg:github/calderawp/caldera-forms', 'cpe:2.3:a:calderalabs:caldera_forms'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (40143, 12025, 'pkg:github/wp-plugins/caldera-forms', 'cpe:2.3:a:calderalabs:caldera_forms'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (40143, 17269, 'pkg:github/wpplugins/caldera-forms', 'cpe:2.3:a:calderalabs:caldera_forms'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (31044, 17507, 'pkg:github/wp-plugins/konnichiwa', 'cpe:2.3:a:calendarscripts:konnichiwa'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (50021, 4048, 'pkg:github/hapijs/call', 'cpe:2.3:a:call_project:call'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (50021, 10316, 'pkg:npm/@hapi/call', 'cpe:2.3:a:call_project:call'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (24723, 24815, 'pkg:npm/calmquist.static-server', 'cpe:2.3:a:calmquist.static-server_project:calmquist.static-server'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 19906, 'pkg:github/pld-linux/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 23260, 'pkg:rpm/fedora/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 1646, 'pkg:rpm/opensuse/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 10692, 'pkg:rpm/centos/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 3023, 'pkg:deb/debian/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 5153, 'pkg:deb/ubuntu/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (32816, 9550, 'pkg:gitlab/redhat/jbigkit', 'cpe:2.3:a:cambridge_enterprise:jbig-kit'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (44876, 11524, 'pkg:github/thtas/campaignmonitor', 'cpe:2.3:a:campaign_monitor_project:campaign_monitor'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8270, 25794, 'pkg:github/wp-plugins/candidate-application-form', 'cpe:2.3:a:candidate-application-form_project:candidate-application-form'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8270, 1176, 'pkg:github/wpplugins/candidate-application-form', 'cpe:2.3:a:candidate-application-form_project:candidate-application-form'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (23153, 22770, 'pkg:github/candlepin/candlepin', 'cpe:2.3:a:candlepinproject:candlepin'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (17559, 24096, 'pkg:github/giuliomoro/checkinstall', 'cpe:2.3:a:canonical:checkinstall'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (17559, 2429, 'pkg:github/ruxkor/checkinstall', 'cpe:2.3:a:canonical:checkinstall'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (36858, 15022, 'pkg:github/lxc/lxd', 'cpe:2.3:a:canonical:lxd'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (36858, 6062, 'pkg:rpm/opensuse/lxd', 'cpe:2.3:a:canonical:lxd'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (54486, 11962, 'pkg:github/maas/maas', 'cpe:2.3:a:canonical:metal_as_a_service'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (54486, 18047, 'pkg:deb/ubuntu/maas', 'cpe:2.3:a:canonical:metal_as_a_service'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (158765, 24539, 'pkg:github/tseliot/screen-resolution-extra', 'cpe:2.3:a:canonical:screen-resolution-extra'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (20819, 2595, 'pkg:deb/ubuntu/screen-resolution-extra', 'cpe:2.3:a:canonical:screen-resolution-extra'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (48168, 14558, 'pkg:github/selinuxproject/selinux', 'cpe:2.3:a:canonical:selinux'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (48168, 23242, 'pkg:deb/ubuntu/selinux', 'cpe:2.3:a:canonical:selinux'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4970, 22410, 'pkg:github/snapcore/snapd', 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4970, 10569, 'pkg:rpm/fedora/snapd', 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4970, 7072, 'pkg:rpm/opensuse/snapd', 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4970, 17949, 'pkg:deb/debian/snapd', 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (4970, 11242, 'pkg:deb/ubuntu/snapd', 'cpe:2.3:a:canonical:ubuntu-core-launcher'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (48783, 26613, 'pkg:github/ubports/ubuntu-download-manager', 'cpe:2.3:a:canonical:ubuntu_download_manager'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (11798, 20614, 'pkg:deb/ubuntu/update-manager', 'cpe:2.3:a:canonical:update-manager'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (6591, 9741, 'pkg:github/cantemo/portal-docker', 'cpe:2.3:a:cantemo:portal'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8296, 6121, 'pkg:github/capstone-engine/capstone', 'cpe:2.3:a:capstone-engine:capstone'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8296, 1739, 'pkg:rpm/fedora/capstone', 'cpe:2.3:a:capstone-engine:capstone'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8296, 17342, 'pkg:rpm/opensuse/capstone', 'cpe:2.3:a:capstone-engine:capstone'); -INSERT INTO "short_cpe_purl" ("cpe_id", "purl_id", "purl", "short_cpe") VALUES (8296, 14642, 'pkg:deb/debian/capstone', 'cpe:2.3:a:capstone-engine:capstone'); \ No newline at end of file +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4772, 19304, 'pkg:github/c2fo/comb'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4772, 6781, 'pkg:npm/comb'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (40676, 12377, 'pkg:github/cunaedy/cart-engine'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6930, 22887, 'pkg:github/ashaffer/cached-path-relative'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6930, 22665, 'pkg:deb/debian/node-cached-path-relative'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6930, 18591, 'pkg:deb/ubuntu/node-cached-path-relative'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6930, 10060, 'pkg:maven/org.webjars.npm/cached-path-relative'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6930, 22890, 'pkg:npm/cached-path-relative'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (54546, 25014, 'pkg:github/jaemk/cached'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (9517, 24116, 'pkg:github/swatinem/rust-cache'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (40143, 8505, 'pkg:github/calderawp/caldera-forms'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (40143, 12025, 'pkg:github/wp-plugins/caldera-forms'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (40143, 17269, 'pkg:github/wpplugins/caldera-forms'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (31044, 17507, 'pkg:github/wp-plugins/konnichiwa'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (50021, 4048, 'pkg:github/hapijs/call'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (50021, 10316, 'pkg:npm/@hapi/call'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (24723, 24815, 'pkg:npm/calmquist.static-server'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 19906, 'pkg:github/pld-linux/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 23260, 'pkg:rpm/fedora/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 1646, 'pkg:rpm/opensuse/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 10692, 'pkg:rpm/centos/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 3023, 'pkg:deb/debian/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 5153, 'pkg:deb/ubuntu/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (32816, 9550, 'pkg:gitlab/redhat/jbigkit'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (44876, 11524, 'pkg:github/thtas/campaignmonitor'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8270, 25794, 'pkg:github/wp-plugins/candidate-application-form'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8270, 1176, 'pkg:github/wpplugins/candidate-application-form'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (23153, 22770, 'pkg:github/candlepin/candlepin'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (17559, 24096, 'pkg:github/giuliomoro/checkinstall'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (17559, 2429, 'pkg:github/ruxkor/checkinstall'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (36858, 15022, 'pkg:github/lxc/lxd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (36858, 6062, 'pkg:rpm/opensuse/lxd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (54486, 11962, 'pkg:github/maas/maas'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (54486, 18047, 'pkg:deb/ubuntu/maas'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (158765, 24539, 'pkg:github/tseliot/screen-resolution-extra'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (20819, 2595, 'pkg:deb/ubuntu/screen-resolution-extra'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (48168, 14558, 'pkg:github/selinuxproject/selinux'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (48168, 23242, 'pkg:deb/ubuntu/selinux'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4970, 22410, 'pkg:github/snapcore/snapd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4970, 10569, 'pkg:rpm/fedora/snapd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4970, 7072, 'pkg:rpm/opensuse/snapd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4970, 17949, 'pkg:deb/debian/snapd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (4970, 11242, 'pkg:deb/ubuntu/snapd'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (48783, 26613, 'pkg:github/ubports/ubuntu-download-manager'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (11798, 20614, 'pkg:deb/ubuntu/update-manager'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (6591, 9741, 'pkg:github/cantemo/portal-docker'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8296, 6121, 'pkg:github/capstone-engine/capstone'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8296, 1739, 'pkg:rpm/fedora/capstone'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8296, 17342, 'pkg:rpm/opensuse/capstone'); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (8296, 14642, 'pkg:deb/debian/capstone'); diff --git a/pkg/models/tests/versions.sql b/pkg/models/tests/versions.sql index 74576d6..5e6fcce 100644 --- a/pkg/models/tests/versions.sql +++ b/pkg/models/tests/versions.sql @@ -1,322 +1,315 @@ -DROP TABLE IF EXISTS versions; -CREATE TABLE versions -( - id INTEGER PRIMARY KEY, - version_name text not null unique, - semver text default '' -); - -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1365, '3.4.2', '3.4.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1394, '3.0.3', '3.0.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1794, '5.0.1', '5.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1795, '3.0', '3.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1993, '5.0.3', '5.0.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1998, '4.0.1', '4.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (2025, '3.2.0', '3.2.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (2683, '2.0.4', '2.0.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8481, '1.6.4', '1.6.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8720, '2.3.8', '2.3.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8723, '3.1.4', '3.1.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8873, '3.4.7', '3.4.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8878, '2.3.6', '2.3.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8889, '3.2.6', '3.2.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8917, '2.4.7', '2.4.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8918, '2.3.5', '2.3.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9111, '3.3.6', '3.3.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9113, '3.1.3', '3.1.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9123, '2.3.11', '2.3.11'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9154, '3.1.5', '3.1.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10371, '1.5.8', '1.5.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11418, '1.3.3', '1.3.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12882, '4.0.2', '4.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13146, '1.3.5', '1.3.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13150, '3.1.2', '3.1.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13152, '3.2.1', '3.2.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13279, '1.4.4', '1.4.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13284, '1.5.2', '1.5.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13517, '1.4.6', '1.4.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13571, '2.1.4', '2.1.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13904, '3.0.9', '3.0.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13940, '3.0.8', '3.0.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13943, '3.0.10', '3.0.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13949, '3.0.11', '3.0.11'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13961, '3.0.12', '3.0.12'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13966, '3.0.13', '3.0.13'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13967, '3.0.7', '3.0.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14302, '0.0.9', '0.0.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14400, '3.2.5', '3.2.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14489, '3.4.6', '3.4.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14540, '1.1.5', '1.1.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14619, '3.2.2', '3.2.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14621, '2.2.4', '2.2.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14744, '1.1.6', '1.1.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14796, '0.0.5', '0.0.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14797, '0.0.7', '0.0.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14851, '0.2.5', '0.2.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14867, '0.1.6', '0.1.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14943, '0.13.0', '0.13.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14944, '0.9.0', '0.9.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14945, '0.4.3', '0.4.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14946, '1.5.4', '1.5.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14948, '0.7.2', '0.7.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15000, '0.1.4', '0.1.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15003, '3.0.5', '3.0.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15028, '3.3.4', '3.3.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15029, '2.4.3', '2.4.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15050, '0.15.0', '0.15.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15081, '0.8.0', '0.8.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15145, '2.4.5', '2.4.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15188, '0.1.7', '0.1.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15189, '2.1.5', '2.1.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15193, '5.0.2', '5.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15211, '0.1.8', '0.1.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15231, '1.5.1', '1.5.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15232, '1.6.1', '1.6.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15235, '0.2.4', '0.2.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15264, '3.3.0', '3.3.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15302, '3.3.5', '3.3.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (15337, '2.4.1', '2.4.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (17890, '2.3.7', '2.3.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (22072, '1.1.2', '1.1.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (215573, '1.9.0', '1.9.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (233375, '0.1.9', '0.1.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (237532, '3.3.1', '3.3.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (241746, '0.12.0', '0.12.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (243167, '3.4.0', '3.4.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (244660, '2.3.2', '2.3.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (244764, '0.8', '0.8.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (247658, '0.4.2', '0.4.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (247848, '1.2.3', '1.2.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (248486, '0.6.0', '0.6.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (249058, '1.1.3', '1.1.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (249253, '3.2.3', '3.2.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (249755, '0.4.0', '0.4.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (249772, '0.10.0', '0.10.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (249774, '0.8.1', '0.8.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (250722, '2.1.6', '2.1.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (250884, '0.1.3', '0.1.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (251176, '2.2.3', '2.2.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (251178, '2.4.2', '2.4.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (251179, '2.2.0', '2.2.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (251181, '2.4.0', '2.4.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (251751, '1.0.8', '1.0.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252059, '5.0.0', '5.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252066, '3.0.4', '3.0.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252221, '2.3.4', '2.3.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252261, '0.3.1', '0.3.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252413, '0.6', '0.6.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252454, '0.5.0', '0.5.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252546, '0.1.5', '0.1.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252547, '0.0.4', '0.0.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252611, '1.3.2', '1.3.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252612, '4.0.0', '4.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252638, '0.3.4', '0.3.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252639, '0.11.0', '0.11.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252640, '2.1.3', '2.1.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252657, '1.1.7', '1.1.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252703, '2.2.2', '2.2.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252814, '0.3.0', '0.3.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252815, '2.3.3', '2.3.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (252983, '1.1.8', '1.1.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (253031, '3.1.1', '3.1.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (253139, '0.2.3', '0.2.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (253846, '1.0.7', '1.0.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (254033, '1.9.4', '1.9.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (254832, '2.2.5', '2.2.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (255921, '0.3.2', '0.3.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (256416, '0.6.1', '0.6.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (256715, '1.4.3', '1.4.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (257434, '2.0.7', '2.0.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (257513, '2.3.0', '2.3.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (257682, '1.4.2', '1.4.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (258303, '1.2.2', '1.2.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (260652, '1.4.0', '1.4.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (261941, '1.6.2', '1.6.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (262138, '2.0.5', '2.0.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (262155, '2.0.2', '2.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (262603, '0.4.1', '0.4.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (262607, '3.1.0', '3.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263095, '3.0.1', '3.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263168, '1.0.6', '1.0.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263169, '0.1.2', '0.1.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263171, '1.3.1', '1.3.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263265, '1.1', '1.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263266, '2.1.1', '2.1.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263333, '1.0.9', '1.0.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263437, '1.6.0', '1.6.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263438, '1.2.0', '1.2.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263449, '0.0.6', '0.0.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263539, '2.1.2', '2.1.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263698, '0.2.2', '0.2.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (263699, '2.0.3', '2.0.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264098, '1.5.0', '1.5.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264113, '1.3', '1.3.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264114, '1.0.5', '1.0.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264115, '1.4.1', '1.4.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264231, '0.13.1', '0.13.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264249, '0.7.0', '0.7.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264251, '2.1.0', '2.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264337, '1.1.1', '1.1.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264338, '1.3.0', '1.3.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264339, '1.1.0', '1.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264557, '0.2.1', '0.2.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264642, '1.2', '1.2.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264643, '0.0.3', '0.0.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264714, '0.0.8', '0.0.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264721, '0.0.2', '0.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264897, '1.2.1', '1.2.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (264996, '2.3.1', '2.3.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265074, '3.0.0', '3.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265075, '2.0.1', '2.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265076, '2.0.0', '2.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265149, '1.0.3', '1.0.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265150, '1.0.2', '1.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265151, '0.1.1', '0.1.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265152, '1.0.4', '1.0.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265153, '1.0.0', '1.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265154, '1.0.1', '1.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265155, '0.2.0', '0.2.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265156, '0.1.0', '0.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (265157, '1.0', '1.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (1999301, '1.5.0.5', '1.5.0+5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (3720103, '0.16.0', '0.16.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5127876, '0.22.0', '0.22.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5128616, '0.21.0', '0.21.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5482104, '0.2.11', '0.2.11'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5600056, '1.3.4.1', '1.3.4+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5617453, '1.6.6', '1.6.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5670099, '0.8.3', '0.8.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5811416, '3.4.5', '3.4.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5835723, '0.7', '0.7.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6138488, '0.3.6', '0.3.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6140300, '0.2.6', '0.2.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6155011, '0.3.5', '0.3.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6277397, '1.3.4.2', '1.3.4+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6357014, '3.0.6.1', '3.0.6+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6544148, '3.3.7', '3.3.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6703009, '1.3.1.2', '1.3.1+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (6895007, '0.17.0', '0.17.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7083951, '1.4.8', '1.4.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7235805, '1.5.0.6', '1.5.0+6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7256833, '0.4.4', '0.4.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7405670, '0.14.0', '0.14.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7818861, '0.20.0', '0.20.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (7892814, '1.4.5', '1.4.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8474638, '1.1.9.6', '1.1.9+6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8660478, '1.5.5', '1.5.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8795532, '1.4.7', '1.4.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8912914, '1.1.9.9', '1.1.9+9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (8952136, '0.14.1', '0.14.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9540297, '3.4.8', '3.4.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (9909761, '1.4.5.1', '1.4.5+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10206536, '1.1.9.4', '1.1.9+4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10333707, '1.1.9.8', '1.1.9+8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10429338, '1.5.0.10', '1.5.0+10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10499956, '1.3.5.3', '1.3.5+3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10522622, '1.5.0.4', '1.5.0+4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10817733, '1.5.3', '1.5.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (10907584, '0.6.3', '0.6.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11098064, '0.18.0', '0.18.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11283815, '1.5.0.7', '1.5.0+7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11379260, '3.4.1', '3.4.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11466378, '0.2.10', '0.2.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11562873, '1.5.0.9', '1.5.0+9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11647042, '2.3.12', '2.3.12'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12136986, '0.23.0', '0.23.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12192601, '3.2.11', '3.2.11'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12448282, '3.4.4', '3.4.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12690234, '2.1', '2.1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (12797296, '0.4.5', '0.4.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13093993, '1.1.9.5', '1.1.9+5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13117909, '1.1.9.10', '1.1.9+10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13616284, '1.5', '1.5.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13695671, '1.5.0.1-3', '1.5.0+1.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13819035, '1.5.0.8', '1.5.0+8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13877853, '1.1.9.3', '1.1.9+3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13917822, '1.5.6.1', '1.5.6+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (13934859, '1.1.9.2', '1.1.9+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14051023, '1.9.2', '1.9.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14250461, '3.2.13', '3.2.13'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14251660, '1.5.6.2', '1.5.6+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (14268199, '3.3.8', '3.3.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (16550345, '2.4.10', '2.4.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (17151752, '1.3.5.2', '1.3.5+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19258660, '1.0.91', '1.0.91'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19269674, '0.19.0', '0.19.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19291862, '1.5.6', '1.5.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19295009, '0.17.2', '0.17.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19295050, '0.4.27', '0.4.27'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19299214, '1.9.5', '1.9.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19322787, '1.9.1', '1.9.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19323850, '2.4.8', '2.4.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19324110, '2.3.10', '2.3.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19459307, '7.x-1.0', '7.0.0+x-1.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19460749, '1.5.9', '1.5.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19462818, '1.3.0.1', '1.3.0+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19462820, '1.3.0.2', '1.3.0+2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19462971, '1.5.3.1', '1.5.3+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19465563, '1.5.2.1', '1.5.2+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19467646, '1.4.9', '1.4.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19468446, '3.2.8', '3.2.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19468627, '3.1.7', '3.1.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19468629, '3.1.8', '3.1.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19469911, '1.3.3.1', '1.3.3+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19469924, '1.5.7.1', '1.5.7+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19471530, '1.4.3.1', '1.4.3+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19475780, '1.0.27', '1.0.27'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19478045, '1.4.4.1', '1.4.4+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19478693, '1.1.9.7', '1.1.9+7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19480103, '3.2.12', '3.2.12'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19480292, '3.2.10', '3.2.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19480553, '3.2.9', '3.2.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19481914, '3.4.9', '3.4.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19484820, '3.1.6', '3.1.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19484821, '3.1.9', '3.1.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19485263, '0.4.11', '0.4.11'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19486979, '1.6.3', '1.6.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487001, '1.4', '1.4.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487206, '0.15.1', '0.15.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487278, '1.1.9.1', '1.1.9+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487340, '0.9', '0.9.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487460, '0.5.5', '0.5.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487479, '2.2.1', '2.2.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487480, '0.2.7', '0.2.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487481, '0.2.9', '0.2.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487482, '0.2.8', '0.2.8'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487504, '0.5', '0.5.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487573, '0.3.3', '0.3.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19487577, '0.1.10', '0.1.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19490036, '1.1.4', '1.1.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19490475, '1.6.1.1', '1.6.1+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19491044, '2.0.6', '2.0.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19491083, '3.0.2', '3.0.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19491213, '0.21.1', '0.21.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19491331, '1.3.2.1', '1.3.2+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19491698, '0.6.2', '0.6.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19494556, '2.0', '2.0.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19497916, '2.4.6', '2.4.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19500087, '1.1.9', '1.1.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19500948, '3.2.4', '3.2.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19501164, '3.0.6', '3.0.6'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19501262, '1.9.3', '1.9.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19502604, '2.4.4', '2.4.4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19503485, '2.3.9', '2.3.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19508585, '3.3.3', '3.3.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19513403, '-', ''); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19518492, '2.4.9', '2.4.9'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19525948, '3.3.2', '3.3.2'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19529343, '1.1.10', '1.1.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19531474, '1.5.7', '1.5.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19532454, '3.2.7', '3.2.7'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19532557, '1.3.5.1', '1.3.5+1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19532572, '1.6', '1.6.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19533308, '3.4.3', '3.4.3'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19541079, '1.6.5', '1.6.5'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19541010, '0.0.1', '0.0.1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19541011, '0.0.10', '0.0.10'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (258510, '0.0.12', 'v0.0.12'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11435747, '0.0.11', 'v0.0.1-1'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (19836180,'0.10.52-4','0.10.52+4'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (11640350, '1.7.0', 'v1.7.0'); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (5193086, '1.19.0', ''); -INSERT INTO "versions" ("id", "version_name", "semver") VALUES (30001, '15.0.0', '15.0.0'); \ No newline at end of file +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +INSERT INTO versions (id, version_name, semver) VALUES (1365, '3.4.2', '3.4.2'); +INSERT INTO versions (id, version_name, semver) VALUES (1394, '3.0.3', '3.0.3'); +INSERT INTO versions (id, version_name, semver) VALUES (1794, '5.0.1', '5.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (1795, '3.0', '3.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (1993, '5.0.3', '5.0.3'); +INSERT INTO versions (id, version_name, semver) VALUES (1998, '4.0.1', '4.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (2025, '3.2.0', '3.2.0'); +INSERT INTO versions (id, version_name, semver) VALUES (2683, '2.0.4', '2.0.4'); +INSERT INTO versions (id, version_name, semver) VALUES (8481, '1.6.4', '1.6.4'); +INSERT INTO versions (id, version_name, semver) VALUES (8720, '2.3.8', '2.3.8'); +INSERT INTO versions (id, version_name, semver) VALUES (8723, '3.1.4', '3.1.4'); +INSERT INTO versions (id, version_name, semver) VALUES (8873, '3.4.7', '3.4.7'); +INSERT INTO versions (id, version_name, semver) VALUES (8878, '2.3.6', '2.3.6'); +INSERT INTO versions (id, version_name, semver) VALUES (8889, '3.2.6', '3.2.6'); +INSERT INTO versions (id, version_name, semver) VALUES (8917, '2.4.7', '2.4.7'); +INSERT INTO versions (id, version_name, semver) VALUES (8918, '2.3.5', '2.3.5'); +INSERT INTO versions (id, version_name, semver) VALUES (9111, '3.3.6', '3.3.6'); +INSERT INTO versions (id, version_name, semver) VALUES (9113, '3.1.3', '3.1.3'); +INSERT INTO versions (id, version_name, semver) VALUES (9123, '2.3.11', '2.3.11'); +INSERT INTO versions (id, version_name, semver) VALUES (9154, '3.1.5', '3.1.5'); +INSERT INTO versions (id, version_name, semver) VALUES (10371, '1.5.8', '1.5.8'); +INSERT INTO versions (id, version_name, semver) VALUES (11418, '1.3.3', '1.3.3'); +INSERT INTO versions (id, version_name, semver) VALUES (12882, '4.0.2', '4.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (13146, '1.3.5', '1.3.5'); +INSERT INTO versions (id, version_name, semver) VALUES (13150, '3.1.2', '3.1.2'); +INSERT INTO versions (id, version_name, semver) VALUES (13152, '3.2.1', '3.2.1'); +INSERT INTO versions (id, version_name, semver) VALUES (13279, '1.4.4', '1.4.4'); +INSERT INTO versions (id, version_name, semver) VALUES (13284, '1.5.2', '1.5.2'); +INSERT INTO versions (id, version_name, semver) VALUES (13517, '1.4.6', '1.4.6'); +INSERT INTO versions (id, version_name, semver) VALUES (13571, '2.1.4', '2.1.4'); +INSERT INTO versions (id, version_name, semver) VALUES (13904, '3.0.9', '3.0.9'); +INSERT INTO versions (id, version_name, semver) VALUES (13940, '3.0.8', '3.0.8'); +INSERT INTO versions (id, version_name, semver) VALUES (13943, '3.0.10', '3.0.10'); +INSERT INTO versions (id, version_name, semver) VALUES (13949, '3.0.11', '3.0.11'); +INSERT INTO versions (id, version_name, semver) VALUES (13961, '3.0.12', '3.0.12'); +INSERT INTO versions (id, version_name, semver) VALUES (13966, '3.0.13', '3.0.13'); +INSERT INTO versions (id, version_name, semver) VALUES (13967, '3.0.7', '3.0.7'); +INSERT INTO versions (id, version_name, semver) VALUES (14302, '0.0.9', '0.0.9'); +INSERT INTO versions (id, version_name, semver) VALUES (14400, '3.2.5', '3.2.5'); +INSERT INTO versions (id, version_name, semver) VALUES (14489, '3.4.6', '3.4.6'); +INSERT INTO versions (id, version_name, semver) VALUES (14540, '1.1.5', '1.1.5'); +INSERT INTO versions (id, version_name, semver) VALUES (14619, '3.2.2', '3.2.2'); +INSERT INTO versions (id, version_name, semver) VALUES (14621, '2.2.4', '2.2.4'); +INSERT INTO versions (id, version_name, semver) VALUES (14744, '1.1.6', '1.1.6'); +INSERT INTO versions (id, version_name, semver) VALUES (14796, '0.0.5', '0.0.5'); +INSERT INTO versions (id, version_name, semver) VALUES (14797, '0.0.7', '0.0.7'); +INSERT INTO versions (id, version_name, semver) VALUES (14851, '0.2.5', '0.2.5'); +INSERT INTO versions (id, version_name, semver) VALUES (14867, '0.1.6', '0.1.6'); +INSERT INTO versions (id, version_name, semver) VALUES (14943, '0.13.0', '0.13.0'); +INSERT INTO versions (id, version_name, semver) VALUES (14944, '0.9.0', '0.9.0'); +INSERT INTO versions (id, version_name, semver) VALUES (14945, '0.4.3', '0.4.3'); +INSERT INTO versions (id, version_name, semver) VALUES (14946, '1.5.4', '1.5.4'); +INSERT INTO versions (id, version_name, semver) VALUES (14948, '0.7.2', '0.7.2'); +INSERT INTO versions (id, version_name, semver) VALUES (15000, '0.1.4', '0.1.4'); +INSERT INTO versions (id, version_name, semver) VALUES (15003, '3.0.5', '3.0.5'); +INSERT INTO versions (id, version_name, semver) VALUES (15028, '3.3.4', '3.3.4'); +INSERT INTO versions (id, version_name, semver) VALUES (15029, '2.4.3', '2.4.3'); +INSERT INTO versions (id, version_name, semver) VALUES (15050, '0.15.0', '0.15.0'); +INSERT INTO versions (id, version_name, semver) VALUES (15081, '0.8.0', '0.8.0'); +INSERT INTO versions (id, version_name, semver) VALUES (15145, '2.4.5', '2.4.5'); +INSERT INTO versions (id, version_name, semver) VALUES (15188, '0.1.7', '0.1.7'); +INSERT INTO versions (id, version_name, semver) VALUES (15189, '2.1.5', '2.1.5'); +INSERT INTO versions (id, version_name, semver) VALUES (15193, '5.0.2', '5.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (15211, '0.1.8', '0.1.8'); +INSERT INTO versions (id, version_name, semver) VALUES (15231, '1.5.1', '1.5.1'); +INSERT INTO versions (id, version_name, semver) VALUES (15232, '1.6.1', '1.6.1'); +INSERT INTO versions (id, version_name, semver) VALUES (15235, '0.2.4', '0.2.4'); +INSERT INTO versions (id, version_name, semver) VALUES (15264, '3.3.0', '3.3.0'); +INSERT INTO versions (id, version_name, semver) VALUES (15302, '3.3.5', '3.3.5'); +INSERT INTO versions (id, version_name, semver) VALUES (15337, '2.4.1', '2.4.1'); +INSERT INTO versions (id, version_name, semver) VALUES (17890, '2.3.7', '2.3.7'); +INSERT INTO versions (id, version_name, semver) VALUES (22072, '1.1.2', '1.1.2'); +INSERT INTO versions (id, version_name, semver) VALUES (215573, '1.9.0', '1.9.0'); +INSERT INTO versions (id, version_name, semver) VALUES (233375, '0.1.9', '0.1.9'); +INSERT INTO versions (id, version_name, semver) VALUES (237532, '3.3.1', '3.3.1'); +INSERT INTO versions (id, version_name, semver) VALUES (241746, '0.12.0', '0.12.0'); +INSERT INTO versions (id, version_name, semver) VALUES (243167, '3.4.0', '3.4.0'); +INSERT INTO versions (id, version_name, semver) VALUES (244660, '2.3.2', '2.3.2'); +INSERT INTO versions (id, version_name, semver) VALUES (244764, '0.8', '0.8.0'); +INSERT INTO versions (id, version_name, semver) VALUES (247658, '0.4.2', '0.4.2'); +INSERT INTO versions (id, version_name, semver) VALUES (247848, '1.2.3', '1.2.3'); +INSERT INTO versions (id, version_name, semver) VALUES (248486, '0.6.0', '0.6.0'); +INSERT INTO versions (id, version_name, semver) VALUES (249058, '1.1.3', '1.1.3'); +INSERT INTO versions (id, version_name, semver) VALUES (249253, '3.2.3', '3.2.3'); +INSERT INTO versions (id, version_name, semver) VALUES (249755, '0.4.0', '0.4.0'); +INSERT INTO versions (id, version_name, semver) VALUES (249772, '0.10.0', '0.10.0'); +INSERT INTO versions (id, version_name, semver) VALUES (249774, '0.8.1', '0.8.1'); +INSERT INTO versions (id, version_name, semver) VALUES (250722, '2.1.6', '2.1.6'); +INSERT INTO versions (id, version_name, semver) VALUES (250884, '0.1.3', '0.1.3'); +INSERT INTO versions (id, version_name, semver) VALUES (251176, '2.2.3', '2.2.3'); +INSERT INTO versions (id, version_name, semver) VALUES (251178, '2.4.2', '2.4.2'); +INSERT INTO versions (id, version_name, semver) VALUES (251179, '2.2.0', '2.2.0'); +INSERT INTO versions (id, version_name, semver) VALUES (251181, '2.4.0', '2.4.0'); +INSERT INTO versions (id, version_name, semver) VALUES (251751, '1.0.8', '1.0.8'); +INSERT INTO versions (id, version_name, semver) VALUES (252059, '5.0.0', '5.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252066, '3.0.4', '3.0.4'); +INSERT INTO versions (id, version_name, semver) VALUES (252221, '2.3.4', '2.3.4'); +INSERT INTO versions (id, version_name, semver) VALUES (252261, '0.3.1', '0.3.1'); +INSERT INTO versions (id, version_name, semver) VALUES (252413, '0.6', '0.6.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252454, '0.5.0', '0.5.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252546, '0.1.5', '0.1.5'); +INSERT INTO versions (id, version_name, semver) VALUES (252547, '0.0.4', '0.0.4'); +INSERT INTO versions (id, version_name, semver) VALUES (252611, '1.3.2', '1.3.2'); +INSERT INTO versions (id, version_name, semver) VALUES (252612, '4.0.0', '4.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252638, '0.3.4', '0.3.4'); +INSERT INTO versions (id, version_name, semver) VALUES (252639, '0.11.0', '0.11.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252640, '2.1.3', '2.1.3'); +INSERT INTO versions (id, version_name, semver) VALUES (252657, '1.1.7', '1.1.7'); +INSERT INTO versions (id, version_name, semver) VALUES (252703, '2.2.2', '2.2.2'); +INSERT INTO versions (id, version_name, semver) VALUES (252814, '0.3.0', '0.3.0'); +INSERT INTO versions (id, version_name, semver) VALUES (252815, '2.3.3', '2.3.3'); +INSERT INTO versions (id, version_name, semver) VALUES (252983, '1.1.8', '1.1.8'); +INSERT INTO versions (id, version_name, semver) VALUES (253031, '3.1.1', '3.1.1'); +INSERT INTO versions (id, version_name, semver) VALUES (253139, '0.2.3', '0.2.3'); +INSERT INTO versions (id, version_name, semver) VALUES (253846, '1.0.7', '1.0.7'); +INSERT INTO versions (id, version_name, semver) VALUES (254033, '1.9.4', '1.9.4'); +INSERT INTO versions (id, version_name, semver) VALUES (254832, '2.2.5', '2.2.5'); +INSERT INTO versions (id, version_name, semver) VALUES (255921, '0.3.2', '0.3.2'); +INSERT INTO versions (id, version_name, semver) VALUES (256416, '0.6.1', '0.6.1'); +INSERT INTO versions (id, version_name, semver) VALUES (256715, '1.4.3', '1.4.3'); +INSERT INTO versions (id, version_name, semver) VALUES (257434, '2.0.7', '2.0.7'); +INSERT INTO versions (id, version_name, semver) VALUES (257513, '2.3.0', '2.3.0'); +INSERT INTO versions (id, version_name, semver) VALUES (257682, '1.4.2', '1.4.2'); +INSERT INTO versions (id, version_name, semver) VALUES (258303, '1.2.2', '1.2.2'); +INSERT INTO versions (id, version_name, semver) VALUES (260652, '1.4.0', '1.4.0'); +INSERT INTO versions (id, version_name, semver) VALUES (261941, '1.6.2', '1.6.2'); +INSERT INTO versions (id, version_name, semver) VALUES (262138, '2.0.5', '2.0.5'); +INSERT INTO versions (id, version_name, semver) VALUES (262155, '2.0.2', '2.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (262603, '0.4.1', '0.4.1'); +INSERT INTO versions (id, version_name, semver) VALUES (262607, '3.1.0', '3.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (263095, '3.0.1', '3.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (263168, '1.0.6', '1.0.6'); +INSERT INTO versions (id, version_name, semver) VALUES (263169, '0.1.2', '0.1.2'); +INSERT INTO versions (id, version_name, semver) VALUES (263171, '1.3.1', '1.3.1'); +INSERT INTO versions (id, version_name, semver) VALUES (263265, '1.1', '1.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (263266, '2.1.1', '2.1.1'); +INSERT INTO versions (id, version_name, semver) VALUES (263333, '1.0.9', '1.0.9'); +INSERT INTO versions (id, version_name, semver) VALUES (263437, '1.6.0', '1.6.0'); +INSERT INTO versions (id, version_name, semver) VALUES (263438, '1.2.0', '1.2.0'); +INSERT INTO versions (id, version_name, semver) VALUES (263449, '0.0.6', '0.0.6'); +INSERT INTO versions (id, version_name, semver) VALUES (263539, '2.1.2', '2.1.2'); +INSERT INTO versions (id, version_name, semver) VALUES (263698, '0.2.2', '0.2.2'); +INSERT INTO versions (id, version_name, semver) VALUES (263699, '2.0.3', '2.0.3'); +INSERT INTO versions (id, version_name, semver) VALUES (264098, '1.5.0', '1.5.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264113, '1.3', '1.3.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264114, '1.0.5', '1.0.5'); +INSERT INTO versions (id, version_name, semver) VALUES (264115, '1.4.1', '1.4.1'); +INSERT INTO versions (id, version_name, semver) VALUES (264231, '0.13.1', '0.13.1'); +INSERT INTO versions (id, version_name, semver) VALUES (264249, '0.7.0', '0.7.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264251, '2.1.0', '2.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264337, '1.1.1', '1.1.1'); +INSERT INTO versions (id, version_name, semver) VALUES (264338, '1.3.0', '1.3.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264339, '1.1.0', '1.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264557, '0.2.1', '0.2.1'); +INSERT INTO versions (id, version_name, semver) VALUES (264642, '1.2', '1.2.0'); +INSERT INTO versions (id, version_name, semver) VALUES (264643, '0.0.3', '0.0.3'); +INSERT INTO versions (id, version_name, semver) VALUES (264714, '0.0.8', '0.0.8'); +INSERT INTO versions (id, version_name, semver) VALUES (264721, '0.0.2', '0.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (264897, '1.2.1', '1.2.1'); +INSERT INTO versions (id, version_name, semver) VALUES (264996, '2.3.1', '2.3.1'); +INSERT INTO versions (id, version_name, semver) VALUES (265074, '3.0.0', '3.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (265075, '2.0.1', '2.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (265076, '2.0.0', '2.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (265149, '1.0.3', '1.0.3'); +INSERT INTO versions (id, version_name, semver) VALUES (265150, '1.0.2', '1.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (265151, '0.1.1', '0.1.1'); +INSERT INTO versions (id, version_name, semver) VALUES (265152, '1.0.4', '1.0.4'); +INSERT INTO versions (id, version_name, semver) VALUES (265153, '1.0.0', '1.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (265154, '1.0.1', '1.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (265155, '0.2.0', '0.2.0'); +INSERT INTO versions (id, version_name, semver) VALUES (265156, '0.1.0', '0.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (265157, '1.0', '1.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (1999301, '1.5.0.5', '1.5.0+5'); +INSERT INTO versions (id, version_name, semver) VALUES (3720103, '0.16.0', '0.16.0'); +INSERT INTO versions (id, version_name, semver) VALUES (5127876, '0.22.0', '0.22.0'); +INSERT INTO versions (id, version_name, semver) VALUES (5128616, '0.21.0', '0.21.0'); +INSERT INTO versions (id, version_name, semver) VALUES (5482104, '0.2.11', '0.2.11'); +INSERT INTO versions (id, version_name, semver) VALUES (5600056, '1.3.4.1', '1.3.4+1'); +INSERT INTO versions (id, version_name, semver) VALUES (5617453, '1.6.6', '1.6.6'); +INSERT INTO versions (id, version_name, semver) VALUES (5670099, '0.8.3', '0.8.3'); +INSERT INTO versions (id, version_name, semver) VALUES (5811416, '3.4.5', '3.4.5'); +INSERT INTO versions (id, version_name, semver) VALUES (5835723, '0.7', '0.7.0'); +INSERT INTO versions (id, version_name, semver) VALUES (6138488, '0.3.6', '0.3.6'); +INSERT INTO versions (id, version_name, semver) VALUES (6140300, '0.2.6', '0.2.6'); +INSERT INTO versions (id, version_name, semver) VALUES (6155011, '0.3.5', '0.3.5'); +INSERT INTO versions (id, version_name, semver) VALUES (6277397, '1.3.4.2', '1.3.4+2'); +INSERT INTO versions (id, version_name, semver) VALUES (6357014, '3.0.6.1', '3.0.6+1'); +INSERT INTO versions (id, version_name, semver) VALUES (6544148, '3.3.7', '3.3.7'); +INSERT INTO versions (id, version_name, semver) VALUES (6703009, '1.3.1.2', '1.3.1+2'); +INSERT INTO versions (id, version_name, semver) VALUES (6895007, '0.17.0', '0.17.0'); +INSERT INTO versions (id, version_name, semver) VALUES (7083951, '1.4.8', '1.4.8'); +INSERT INTO versions (id, version_name, semver) VALUES (7235805, '1.5.0.6', '1.5.0+6'); +INSERT INTO versions (id, version_name, semver) VALUES (7256833, '0.4.4', '0.4.4'); +INSERT INTO versions (id, version_name, semver) VALUES (7405670, '0.14.0', '0.14.0'); +INSERT INTO versions (id, version_name, semver) VALUES (7818861, '0.20.0', '0.20.0'); +INSERT INTO versions (id, version_name, semver) VALUES (7892814, '1.4.5', '1.4.5'); +INSERT INTO versions (id, version_name, semver) VALUES (8474638, '1.1.9.6', '1.1.9+6'); +INSERT INTO versions (id, version_name, semver) VALUES (8660478, '1.5.5', '1.5.5'); +INSERT INTO versions (id, version_name, semver) VALUES (8795532, '1.4.7', '1.4.7'); +INSERT INTO versions (id, version_name, semver) VALUES (8912914, '1.1.9.9', '1.1.9+9'); +INSERT INTO versions (id, version_name, semver) VALUES (8952136, '0.14.1', '0.14.1'); +INSERT INTO versions (id, version_name, semver) VALUES (9540297, '3.4.8', '3.4.8'); +INSERT INTO versions (id, version_name, semver) VALUES (9909761, '1.4.5.1', '1.4.5+1'); +INSERT INTO versions (id, version_name, semver) VALUES (10206536, '1.1.9.4', '1.1.9+4'); +INSERT INTO versions (id, version_name, semver) VALUES (10333707, '1.1.9.8', '1.1.9+8'); +INSERT INTO versions (id, version_name, semver) VALUES (10429338, '1.5.0.10', '1.5.0+10'); +INSERT INTO versions (id, version_name, semver) VALUES (10499956, '1.3.5.3', '1.3.5+3'); +INSERT INTO versions (id, version_name, semver) VALUES (10522622, '1.5.0.4', '1.5.0+4'); +INSERT INTO versions (id, version_name, semver) VALUES (10817733, '1.5.3', '1.5.3'); +INSERT INTO versions (id, version_name, semver) VALUES (10907584, '0.6.3', '0.6.3'); +INSERT INTO versions (id, version_name, semver) VALUES (11098064, '0.18.0', '0.18.0'); +INSERT INTO versions (id, version_name, semver) VALUES (11283815, '1.5.0.7', '1.5.0+7'); +INSERT INTO versions (id, version_name, semver) VALUES (11379260, '3.4.1', '3.4.1'); +INSERT INTO versions (id, version_name, semver) VALUES (11466378, '0.2.10', '0.2.10'); +INSERT INTO versions (id, version_name, semver) VALUES (11562873, '1.5.0.9', '1.5.0+9'); +INSERT INTO versions (id, version_name, semver) VALUES (11647042, '2.3.12', '2.3.12'); +INSERT INTO versions (id, version_name, semver) VALUES (12136986, '0.23.0', '0.23.0'); +INSERT INTO versions (id, version_name, semver) VALUES (12192601, '3.2.11', '3.2.11'); +INSERT INTO versions (id, version_name, semver) VALUES (12448282, '3.4.4', '3.4.4'); +INSERT INTO versions (id, version_name, semver) VALUES (12690234, '2.1', '2.1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (12797296, '0.4.5', '0.4.5'); +INSERT INTO versions (id, version_name, semver) VALUES (13093993, '1.1.9.5', '1.1.9+5'); +INSERT INTO versions (id, version_name, semver) VALUES (13117909, '1.1.9.10', '1.1.9+10'); +INSERT INTO versions (id, version_name, semver) VALUES (13616284, '1.5', '1.5.0'); +INSERT INTO versions (id, version_name, semver) VALUES (13695671, '1.5.0.1-3', '1.5.0+1.3'); +INSERT INTO versions (id, version_name, semver) VALUES (13819035, '1.5.0.8', '1.5.0+8'); +INSERT INTO versions (id, version_name, semver) VALUES (13877853, '1.1.9.3', '1.1.9+3'); +INSERT INTO versions (id, version_name, semver) VALUES (13917822, '1.5.6.1', '1.5.6+1'); +INSERT INTO versions (id, version_name, semver) VALUES (13934859, '1.1.9.2', '1.1.9+2'); +INSERT INTO versions (id, version_name, semver) VALUES (14051023, '1.9.2', '1.9.2'); +INSERT INTO versions (id, version_name, semver) VALUES (14250461, '3.2.13', '3.2.13'); +INSERT INTO versions (id, version_name, semver) VALUES (14251660, '1.5.6.2', '1.5.6+2'); +INSERT INTO versions (id, version_name, semver) VALUES (14268199, '3.3.8', '3.3.8'); +INSERT INTO versions (id, version_name, semver) VALUES (16550345, '2.4.10', '2.4.10'); +INSERT INTO versions (id, version_name, semver) VALUES (17151752, '1.3.5.2', '1.3.5+2'); +INSERT INTO versions (id, version_name, semver) VALUES (19258660, '1.0.91', '1.0.91'); +INSERT INTO versions (id, version_name, semver) VALUES (19269674, '0.19.0', '0.19.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19291862, '1.5.6', '1.5.6'); +INSERT INTO versions (id, version_name, semver) VALUES (19295009, '0.17.2', '0.17.2'); +INSERT INTO versions (id, version_name, semver) VALUES (19295050, '0.4.27', '0.4.27'); +INSERT INTO versions (id, version_name, semver) VALUES (19299214, '1.9.5', '1.9.5'); +INSERT INTO versions (id, version_name, semver) VALUES (19322787, '1.9.1', '1.9.1'); +INSERT INTO versions (id, version_name, semver) VALUES (19323850, '2.4.8', '2.4.8'); +INSERT INTO versions (id, version_name, semver) VALUES (19324110, '2.3.10', '2.3.10'); +INSERT INTO versions (id, version_name, semver) VALUES (19459307, '7.x-1.0', '7.0.0+x-1.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19460749, '1.5.9', '1.5.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19462818, '1.3.0.1', '1.3.0+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19462820, '1.3.0.2', '1.3.0+2'); +INSERT INTO versions (id, version_name, semver) VALUES (19462971, '1.5.3.1', '1.5.3+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19465563, '1.5.2.1', '1.5.2+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19467646, '1.4.9', '1.4.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19468446, '3.2.8', '3.2.8'); +INSERT INTO versions (id, version_name, semver) VALUES (19468627, '3.1.7', '3.1.7'); +INSERT INTO versions (id, version_name, semver) VALUES (19468629, '3.1.8', '3.1.8'); +INSERT INTO versions (id, version_name, semver) VALUES (19469911, '1.3.3.1', '1.3.3+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19469924, '1.5.7.1', '1.5.7+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19471530, '1.4.3.1', '1.4.3+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19475780, '1.0.27', '1.0.27'); +INSERT INTO versions (id, version_name, semver) VALUES (19478045, '1.4.4.1', '1.4.4+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19478693, '1.1.9.7', '1.1.9+7'); +INSERT INTO versions (id, version_name, semver) VALUES (19480103, '3.2.12', '3.2.12'); +INSERT INTO versions (id, version_name, semver) VALUES (19480292, '3.2.10', '3.2.10'); +INSERT INTO versions (id, version_name, semver) VALUES (19480553, '3.2.9', '3.2.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19481914, '3.4.9', '3.4.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19484820, '3.1.6', '3.1.6'); +INSERT INTO versions (id, version_name, semver) VALUES (19484821, '3.1.9', '3.1.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19485263, '0.4.11', '0.4.11'); +INSERT INTO versions (id, version_name, semver) VALUES (19486979, '1.6.3', '1.6.3'); +INSERT INTO versions (id, version_name, semver) VALUES (19487001, '1.4', '1.4.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19487206, '0.15.1', '0.15.1'); +INSERT INTO versions (id, version_name, semver) VALUES (19487278, '1.1.9.1', '1.1.9+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19487340, '0.9', '0.9.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19487460, '0.5.5', '0.5.5'); +INSERT INTO versions (id, version_name, semver) VALUES (19487479, '2.2.1', '2.2.1'); +INSERT INTO versions (id, version_name, semver) VALUES (19487480, '0.2.7', '0.2.7'); +INSERT INTO versions (id, version_name, semver) VALUES (19487481, '0.2.9', '0.2.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19487482, '0.2.8', '0.2.8'); +INSERT INTO versions (id, version_name, semver) VALUES (19487504, '0.5', '0.5.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19487573, '0.3.3', '0.3.3'); +INSERT INTO versions (id, version_name, semver) VALUES (19487577, '0.1.10', '0.1.10'); +INSERT INTO versions (id, version_name, semver) VALUES (19490036, '1.1.4', '1.1.4'); +INSERT INTO versions (id, version_name, semver) VALUES (19490475, '1.6.1.1', '1.6.1+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19491044, '2.0.6', '2.0.6'); +INSERT INTO versions (id, version_name, semver) VALUES (19491083, '3.0.2', '3.0.2'); +INSERT INTO versions (id, version_name, semver) VALUES (19491213, '0.21.1', '0.21.1'); +INSERT INTO versions (id, version_name, semver) VALUES (19491331, '1.3.2.1', '1.3.2+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19491698, '0.6.2', '0.6.2'); +INSERT INTO versions (id, version_name, semver) VALUES (19494556, '2.0', '2.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19497916, '2.4.6', '2.4.6'); +INSERT INTO versions (id, version_name, semver) VALUES (19500087, '1.1.9', '1.1.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19500948, '3.2.4', '3.2.4'); +INSERT INTO versions (id, version_name, semver) VALUES (19501164, '3.0.6', '3.0.6'); +INSERT INTO versions (id, version_name, semver) VALUES (19501262, '1.9.3', '1.9.3'); +INSERT INTO versions (id, version_name, semver) VALUES (19502604, '2.4.4', '2.4.4'); +INSERT INTO versions (id, version_name, semver) VALUES (19503485, '2.3.9', '2.3.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19508585, '3.3.3', '3.3.3'); +INSERT INTO versions (id, version_name, semver) VALUES (19513403, '-', ''); +INSERT INTO versions (id, version_name, semver) VALUES (19518492, '2.4.9', '2.4.9'); +INSERT INTO versions (id, version_name, semver) VALUES (19525948, '3.3.2', '3.3.2'); +INSERT INTO versions (id, version_name, semver) VALUES (19529343, '1.1.10', '1.1.10'); +INSERT INTO versions (id, version_name, semver) VALUES (19531474, '1.5.7', '1.5.7'); +INSERT INTO versions (id, version_name, semver) VALUES (19532454, '3.2.7', '3.2.7'); +INSERT INTO versions (id, version_name, semver) VALUES (19532557, '1.3.5.1', '1.3.5+1'); +INSERT INTO versions (id, version_name, semver) VALUES (19532572, '1.6', '1.6.0'); +INSERT INTO versions (id, version_name, semver) VALUES (19533308, '3.4.3', '3.4.3'); +INSERT INTO versions (id, version_name, semver) VALUES (19541079, '1.6.5', '1.6.5'); +INSERT INTO versions (id, version_name, semver) VALUES (19541010, '0.0.1', '0.0.1'); +INSERT INTO versions (id, version_name, semver) VALUES (19541011, '0.0.10', '0.0.10'); +INSERT INTO versions (id, version_name, semver) VALUES (258510, '0.0.12', 'v0.0.12'); +INSERT INTO versions (id, version_name, semver) VALUES (11435747, '0.0.11', 'v0.0.1-1'); +INSERT INTO versions (id, version_name, semver) VALUES (19836180, '0.10.52-4', '0.10.52+4'); +INSERT INTO versions (id, version_name, semver) VALUES (11640350, '1.7.0', 'v1.7.0'); +INSERT INTO versions (id, version_name, semver) VALUES (5193086, '1.19.0', ''); +INSERT INTO versions (id, version_name, semver) VALUES (30001, '15.0.0', '15.0.0'); diff --git a/pkg/models/tests/vulns_scenario.sql b/pkg/models/tests/vulns_scenario.sql new file mode 100644 index 0000000..387af29 --- /dev/null +++ b/pkg/models/tests/vulns_scenario.sql @@ -0,0 +1,54 @@ +-- Test data only. The schema comes from testSchemaDDL in pkg/models/test_schema.go; do not add DDL here. +-- +-- A deterministic vulnerability scenario for one component, wired the way the real +-- schema links things: purl -> short_cpe_purl.cpe_id -> nvd_match_criteria_ids.short_cpe_id +-- -> match_criteria_id -> cves.match_criteria_ids. +-- +-- The pre-existing fixtures cannot exercise this path at all: every row in +-- ndv_match_criteria_ids.sql has short_cpe_id = null, because the old query joined +-- through a cpe_ids column the schema does not define. +-- +-- Component: pkg:github/scanoss/testcomp, versions 1.0.0 / 2.0.0 / 3.0.0. +-- The four match criteria below cover each version-bound combination, so the +-- version filtering can be asserted at its edges. + +INSERT INTO purls (purl, id) VALUES ('pkg:github/scanoss/testcomp', 900001); +INSERT INTO short_cpes (id) VALUES (900001); +INSERT INTO short_cpe_purl (cpe_id, purl_id, purl) VALUES (900001, 900001, 'pkg:github/scanoss/testcomp'); + +INSERT INTO versions (id, version_name, semver) VALUES (900001, '1.0.0', '1.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (900002, '2.0.0', '2.0.0'); +INSERT INTO versions (id, version_name, semver) VALUES (900003, '3.0.0', '3.0.0'); + +INSERT INTO cpes (cpe, version_id, short_cpe_id) VALUES ('cpe:2.3:a:scanoss:testcomp:1.0.0:*:*:*:*:*:*:*', 900001, 900001); +INSERT INTO cpes (cpe, version_id, short_cpe_id) VALUES ('cpe:2.3:a:scanoss:testcomp:2.0.0:*:*:*:*:*:*:*', 900002, 900001); +INSERT INTO cpes (cpe, version_id, short_cpe_id) VALUES ('cpe:2.3:a:scanoss:testcomp:3.0.0:*:*:*:*:*:*:*', 900003, 900001); + +-- everything up to and including 2.0.0 -> matches 1.0.0, 2.0.0 +INSERT INTO nvd_match_criteria_ids (match_criteria_id, short_cpe_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding) +VALUES ('MC-END-INCL-2', 900001, '', '', '2.0.0', ''); +-- everything from 3.0.0 upwards -> matches 3.0.0 +INSERT INTO nvd_match_criteria_ids (match_criteria_id, short_cpe_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding) +VALUES ('MC-START-INCL-3', 900001, '3.0.0', '', '', ''); +-- exactly 1.0.0 +INSERT INTO nvd_match_criteria_ids (match_criteria_id, short_cpe_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding) +VALUES ('MC-EXACT-1', 900001, '1.0.0', '', '1.0.0', ''); +-- strictly between 1.0.0 and 3.0.0 -> matches 2.0.0 only +INSERT INTO nvd_match_criteria_ids (match_criteria_id, short_cpe_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding) +VALUES ('MC-BETWEEN-EXCL', 900001, '', '1.0.0', '', '3.0.0'); +-- belongs to a different component: must never show up for testcomp +INSERT INTO nvd_match_criteria_ids (match_criteria_id, short_cpe_id, version_start_including, version_start_excluding, version_end_including, version_end_excluding) +VALUES ('MC-UNRELATED', 900099, '', '', '', ''); + +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) +VALUES ('CVE-TEST-0001', 'HIGH', '2020-01-15', '2020-06-30', 'affects up to and including 2.0.0', '{MC-END-INCL-2}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) +VALUES ('CVE-TEST-0002', 'LOW', '2021-02-20', '2021-07-01', 'affects 3.0.0 and later', '{MC-START-INCL-3}'); +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) +VALUES ('CVE-TEST-0003', 'CRITICAL', '2019-03-25', '2019-08-10', 'affects exactly 1.0.0', '{MC-EXACT-1}'); +-- two criteria on one CVE, to check the row is matched via either of them +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) +VALUES ('CVE-TEST-0004', 'MEDIUM', '2022-04-05', '2022-09-15', 'affects strictly between 1.0.0 and 3.0.0', '{MC-BETWEEN-EXCL,MC-UNRELATED}'); +-- unrelated component only: must never show up for testcomp +INSERT INTO cves (cve, severity, published, modified, summary, match_criteria_ids) +VALUES ('CVE-TEST-9999', 'HIGH', '2023-05-05', '2023-10-20', 'unrelated component', '{MC-UNRELATED}'); diff --git a/pkg/models/version_range.go b/pkg/models/version_range.go new file mode 100644 index 0000000..4118065 --- /dev/null +++ b/pkg/models/version_range.go @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Version range matching for NVD match criteria. +// +// This used to live in SQL, comparing versions with natural_sort_order, a custom +// PostgreSQL function. Comparing here instead keeps the queries portable across +// PostgreSQL and SQLite, and gives proper semantic version ordering rather than a +// string sort - the same approach FilterCpesByRequirement already takes in cpe_purl.go. + +package models + +import ( + "strings" + + "github.com/Masterminds/semver/v3" +) + +// versionBounds holds the version limits of an NVD match criterion. An empty bound +// means the range is open on that side. +type versionBounds struct { + StartIncluding string + StartExcluding string + EndIncluding string + EndExcluding string +} + +// isOpen reports whether the criterion constrains the version at all. +func (b versionBounds) isOpen() bool { + return len(strings.TrimSpace(b.StartIncluding)) == 0 && + len(strings.TrimSpace(b.StartExcluding)) == 0 && + len(strings.TrimSpace(b.EndIncluding)) == 0 && + len(strings.TrimSpace(b.EndExcluding)) == 0 +} + +// covers reports whether the given version falls inside the bounds. +func (b versionBounds) covers(version string) bool { + version = strings.TrimSpace(version) + // An exact match on an inclusive bound settles it without parsing, so versions that + // are not valid semver still match the criteria that name them outright. The query + // this replaces short-circuited the same way. + if len(version) > 0 && + (version == strings.TrimSpace(b.StartIncluding) || version == strings.TrimSpace(b.EndIncluding)) { + return true + } + if b.isOpen() { + return true + } + target, err := semver.NewVersion(version) + if err != nil { + // Nothing left to compare against: only the shortcut above could have matched. + return false + } + // cmp is the target compared against the bound. + checks := []struct { + bound string + ok func(cmp int) bool + }{ + {b.StartIncluding, func(cmp int) bool { return cmp >= 0 }}, + {b.StartExcluding, func(cmp int) bool { return cmp > 0 }}, + {b.EndIncluding, func(cmp int) bool { return cmp <= 0 }}, + {b.EndExcluding, func(cmp int) bool { return cmp < 0 }}, + } + for _, c := range checks { + bound := strings.TrimSpace(c.bound) + if len(bound) == 0 { + continue + } + bv, err := semver.NewVersion(bound) + if err != nil { + // Skip a bound we cannot parse rather than treat it as a mismatch: missing a + // real vulnerability is worse than reporting a borderline one. + continue + } + if !c.ok(target.Compare(bv)) { + return false + } + } + return true +} diff --git a/pkg/models/version_range_test.go b/pkg/models/version_range_test.go new file mode 100644 index 0000000..a92d0f7 --- /dev/null +++ b/pkg/models/version_range_test.go @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package models + +import "testing" + +func TestVersionBoundsCovers(t *testing.T) { + tests := []struct { + name string + bounds versionBounds + // version -> whether the bounds should cover it + cases map[string]bool + }{ + { + name: "no bounds covers everything", + bounds: versionBounds{}, + cases: map[string]bool{"1.0.0": true, "99.0.0": true, "not-a-version": true, "": true}, + }, + { + name: "end including is inclusive", + bounds: versionBounds{EndIncluding: "2.0.0"}, + cases: map[string]bool{"1.0.0": true, "2.0.0": true, "2.0.1": false, "3.0.0": false}, + }, + { + name: "end excluding is exclusive", + bounds: versionBounds{EndExcluding: "2.0.0"}, + cases: map[string]bool{"1.9.9": true, "2.0.0": false, "3.0.0": false}, + }, + { + name: "start including is inclusive", + bounds: versionBounds{StartIncluding: "2.0.0"}, + cases: map[string]bool{"1.9.9": false, "2.0.0": true, "2.0.1": true}, + }, + { + name: "start excluding is exclusive", + bounds: versionBounds{StartExcluding: "2.0.0"}, + cases: map[string]bool{"1.9.9": false, "2.0.0": false, "2.0.1": true}, + }, + { + name: "closed inclusive range", + bounds: versionBounds{StartIncluding: "1.0.0", EndIncluding: "2.0.0"}, + cases: map[string]bool{"0.9.9": false, "1.0.0": true, "1.5.0": true, "2.0.0": true, "2.0.1": false}, + }, + { + name: "closed exclusive range", + bounds: versionBounds{StartExcluding: "1.0.0", EndExcluding: "3.0.0"}, + cases: map[string]bool{"1.0.0": false, "2.0.0": true, "3.0.0": false}, + }, + { + name: "single version range", + bounds: versionBounds{StartIncluding: "1.0.0", EndIncluding: "1.0.0"}, + cases: map[string]bool{"1.0.0": true, "1.0.1": false, "0.9.9": false}, + }, + { + name: "semantic ordering, not string ordering", + bounds: versionBounds{EndIncluding: "10.0.0"}, + // a string sort would put "9.0.0" after "10.0.0" and wrongly exclude it + cases: map[string]bool{"9.0.0": true, "10.0.0": true, "11.0.0": false}, + }, + { + name: "pre-release ordering", + bounds: versionBounds{StartIncluding: "1.0.0"}, + cases: map[string]bool{"1.0.0-alpha": false, "1.0.0": true, "1.0.1-beta": true}, + }, + { + name: "a version equal to an inclusive bound matches even when unparseable", + bounds: versionBounds{StartIncluding: "1.5.2.3", EndIncluding: "2.0"}, + cases: map[string]bool{"1.5.2.3": true, "2.0": true}, + }, + { + name: "an unparseable version matches nothing else", + bounds: versionBounds{EndIncluding: "2.0.0"}, + cases: map[string]bool{"not-a-version": false, "": false}, + }, + { + name: "an unparseable bound is ignored rather than excluding the version", + // Losing a real vulnerability is worse than reporting a borderline one. + bounds: versionBounds{StartIncluding: "garbage", EndIncluding: "2.0.0"}, + cases: map[string]bool{"1.0.0": true, "3.0.0": false}, + }, + { + name: "surrounding whitespace is tolerated", + bounds: versionBounds{EndIncluding: " 2.0.0 "}, + cases: map[string]bool{" 1.0.0 ": true, "2.0.0": true, "3.0.0": false}, + }, + { + name: "a v prefix is accepted on both sides", + bounds: versionBounds{EndIncluding: "v2.0.0"}, + cases: map[string]bool{"v1.0.0": true, "v3.0.0": false}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + for version, want := range tt.cases { + if got := tt.bounds.covers(version); got != want { + t.Errorf("versionBounds%+v.covers(%q) = %v, want %v", tt.bounds, version, got, want) + } + } + }) + } +} + +func TestVersionBoundsIsOpen(t *testing.T) { + tests := []struct { + name string + bounds versionBounds + want bool + }{ + {name: "all empty", bounds: versionBounds{}, want: true}, + {name: "whitespace only", bounds: versionBounds{StartIncluding: " ", EndExcluding: "\t"}, want: true}, + {name: "start including set", bounds: versionBounds{StartIncluding: "1.0.0"}, want: false}, + {name: "start excluding set", bounds: versionBounds{StartExcluding: "1.0.0"}, want: false}, + {name: "end including set", bounds: versionBounds{EndIncluding: "1.0.0"}, want: false}, + {name: "end excluding set", bounds: versionBounds{EndExcluding: "1.0.0"}, want: false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := tt.bounds.isOpen(); got != tt.want { + t.Errorf("versionBounds%+v.isOpen() = %v, want %v", tt.bounds, got, tt.want) + } + }) + } +} diff --git a/pkg/models/versions.go b/pkg/models/versions.go index fc92a49..8682f44 100644 --- a/pkg/models/versions.go +++ b/pkg/models/versions.go @@ -57,8 +57,10 @@ func (m *VersionModel) GetVersionByName(ctx context.Context, name string, create return Version{}, errors.New("please specify a valid Version Name to query") } var version Version + // COALESCE on id because the schema does not generate one: versions.id has no + // autoincrement, so a row written by saveVersion below has a NULL id. err := m.db.QueryRowxContext(ctx, - "SELECT id, version_name, semver FROM versions"+ + "SELECT COALESCE(id, 0) AS id, version_name, semver FROM versions"+ " WHERE version_name = $1", name).StructScan(&version) if err != nil && !errors.Is(err, sql.ErrNoRows) { @@ -80,10 +82,13 @@ func (m *VersionModel) saveVersion(ctx context.Context, name string) (Version, e } zlog.S.Debugf("Attempting to save '%v' to the versions table...", name) var version Version + // The row is written without an id: the schema declares versions.id as a plain + // column with no autoincrement, so there is nothing to generate one. No caller + // reaches this path today, and none reads the returned ID. err := m.db.QueryRowxContext(ctx, "INSERT INTO versions (version_name, semver) VALUES($1, $2)"+ - " RETURNING id, version_name, semver", - name, "", false, false, + " RETURNING COALESCE(id, 0) AS id, version_name, semver", + name, "", ).StructScan(&version) if err != nil { zlog.S.Errorf("Error: Failed to insert new version name into versions table for %v: %v", name, err) diff --git a/pkg/models/versions_test.go b/pkg/models/versions_test.go index 6cdcab7..78590c3 100644 --- a/pkg/models/versions_test.go +++ b/pkg/models/versions_test.go @@ -33,12 +33,12 @@ func TestVersionsSearch(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer CloseDB(db) - err = loadTestSQLDataFiles(db, ctx, nil, []string{"../models/tests/versions.sql"}) + err = loadTestSQLDataFilesWithSchema(db, ctx, nil, []string{"../models/tests/versions.sql"}) if err != nil { t.Fatalf("failed to load SQL test data: %v", err) } @@ -101,7 +101,7 @@ func TestVersionsSearchBadSql(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/models/vulns_purl.go b/pkg/models/vulns_purl.go index e24ec14..df85d5e 100644 --- a/pkg/models/vulns_purl.go +++ b/pkg/models/vulns_purl.go @@ -71,82 +71,113 @@ func (m *VulnsForPurlModel) GetVulnsByPurl(ctx context.Context, purl string, ver return m.GetVulnsByPurlName(ctx, purlName) } +// vulnsForPurlQuery returns every CVE reachable from a purl, paired with the version +// bounds of the match criterion that connects the two. The path through the schema is +// purl -> short_cpe_purl.cpe_id -> nvd_match_criteria_ids.short_cpe_id -> +// match_criteria_id -> cves.match_criteria_ids. +// +// cves.match_criteria_ids holds a delimited list of criteria ids, so the last join +// has to test for membership textually. The CAST keeps that working whether the column +// is TEXT (SQLite) or an array (PostgreSQL), and COALESCE guards the nullable columns. +// +// Version filtering is deliberately absent here; it happens in Go, see version_range.go. +const vulnsForPurlQuery = `SELECT DISTINCT + c.cve, + COALESCE(c.severity, '') AS severity, + c.published, + c.modified, + COALESCE(c.summary, '') AS summary, + COALESCE(nmci.version_start_including, '') AS version_start_including, + COALESCE(nmci.version_start_excluding, '') AS version_start_excluding, + COALESCE(nmci.version_end_including, '') AS version_end_including, + COALESCE(nmci.version_end_excluding, '') AS version_end_excluding +FROM short_cpe_purl scp +INNER JOIN nvd_match_criteria_ids nmci ON nmci.short_cpe_id = scp.cpe_id +INNER JOIN cves c ON CAST(c.match_criteria_ids AS TEXT) LIKE '%' || nmci.match_criteria_id || '%' +WHERE scp.purl = $1 +ORDER BY c.cve` + +// vulnRow is a single (CVE, match criterion) pair returned by vulnsForPurlQuery. One +// CVE can appear more than once, via different criteria. +type vulnRow struct { + VulnsForPurl + StartIncluding string `db:"version_start_including"` + StartExcluding string `db:"version_start_excluding"` + EndIncluding string `db:"version_end_including"` + EndExcluding string `db:"version_end_excluding"` +} + +// bounds returns the version limits carried by this row. +func (r vulnRow) bounds() versionBounds { + return versionBounds{ + StartIncluding: r.StartIncluding, + StartExcluding: r.StartExcluding, + EndIncluding: r.EndIncluding, + EndExcluding: r.EndExcluding, + } +} + +// queryVulnRows runs the shared query for the given purl name. +func (m *VulnsForPurlModel) queryVulnRows(ctx context.Context, purlName string) ([]vulnRow, error) { + var rows []vulnRow + err := m.db.SelectContext(ctx, &rows, vulnsForPurlQuery, strings.TrimSpace(purlName)) + if err != nil { + zlog.S.Errorf("Failed to query short_cpe for %s: %v", purlName, err) + return nil, fmt.Errorf("failed to query the table: %v", err) + } + return rows, nil +} + +// collapseByCve reduces the rows to one entry per CVE, keeping only those whose match +// criterion satisfies keep. A nil keep accepts every row. Query order is preserved. +func collapseByCve(rows []vulnRow, keep func(versionBounds) bool) []VulnsForPurl { + vulns := make([]VulnsForPurl, 0, len(rows)) + seen := make(map[string]bool, len(rows)) + for _, row := range rows { + if keep != nil && !keep(row.bounds()) { + continue + } + if seen[row.Cve] { + continue + } + seen[row.Cve] = true + vulns = append(vulns, row.VulnsForPurl) + } + return vulns +} + // GetVulnsByPurlName searches for component details of the specified Purl Name/Type (and optional requirement). func (m *VulnsForPurlModel) GetVulnsByPurlName(ctx context.Context, purlName string) ([]VulnsForPurl, error) { if len(purlName) == 0 { zlog.S.Errorf("Please specify a valid Purl Name to query") return []VulnsForPurl{}, errors.New("please specify a valid Purl Name to query") } - - var vulns []VulnsForPurl - purlName = strings.TrimSpace(purlName) - err := m.db.SelectContext(ctx, &vulns, - "SELECT c2.cve, c2.severity, c2.published, c2.modified, c2.summary "+ - "FROM short_cpe_purl scp "+ - "INNER JOIN cpes c ON scp.cpe_id = c.id "+ - "INNER JOIN nvd_match_criteria_ids nmci ON trim(CAST(nmci.cpe_ids AS TEXT), '{}') LIKE '%' || scp.cpe_id || '%' "+ - "INNER JOIN cves c2 ON trim(CAST(nmci.cpe_ids AS TEXT), '{}') LIKE '%' || nmci.match_criteria_id || '%' "+ - "WHERE "+ - "scp.purl = $1", - purlName) - + rows, err := m.queryVulnRows(ctx, purlName) if err != nil { - zlog.S.Errorf("Failed to query short_cpe for %s: %v", purlName, err) - return []VulnsForPurl{}, fmt.Errorf("failed to query the table: %v", err) + return []VulnsForPurl{}, err } + vulns := collapseByCve(rows, nil) zlog.S.Debugf("Found %v results for %v.", len(vulns), purlName) return vulns, nil } +// GetVulnsByPurlVersion searches for the vulnerabilities of the specified Purl Name/Type +// that apply to a given version. An empty version matches only the criteria that place +// no bound on the version at all. func (m *VulnsForPurlModel) GetVulnsByPurlVersion(ctx context.Context, purlName string, purlVersion string) ([]VulnsForPurl, error) { if len(purlName) == 0 { zlog.S.Errorf("Please specify a valid Purl Name to query") return []VulnsForPurl{}, errors.New("please specify a valid Purl Name to query") } - - var vulns []VulnsForPurl - purlName = strings.TrimSpace(purlName) - query := `WITH matching_criteria AS ( - SELECT array_agg(nmci.match_criteria_id) as criteria_ids - FROM short_cpe_purl scp - INNER JOIN short_cpes sc ON sc.id = scp.cpe_id - INNER JOIN nvd_match_criteria_ids nmci ON nmci.short_cpe_id = sc.id - WHERE scp.purl = $1 - AND ( - $2 = nmci.version_start_including - OR $2 = nmci.version_end_including - OR ( - ( - (nmci.version_start_excluding = '' AND nmci.version_start_including = '') - OR (nmci.version_start_excluding != '' AND natural_sort_order($2, 20) > natural_sort_order(nmci.version_start_excluding, 20)) - OR (nmci.version_start_including != '' AND natural_sort_order($2, 20) > natural_sort_order(nmci.version_start_including, 20)) - ) - AND ( - (nmci.version_end_excluding = '' AND nmci.version_end_including = '') - OR (nmci.version_end_excluding != '' AND natural_sort_order($2, 20) < natural_sort_order(nmci.version_end_excluding, 20)) - OR (nmci.version_end_including != '' AND natural_sort_order($2, 20) < natural_sort_order(nmci.version_end_including, 20)) - ) - ) - ) - ) - SELECT DISTINCT - c2.cve, - c2.severity, - c2.published, - c2.modified, - c2.summary - FROM cves c2, matching_criteria mc - WHERE c2.match_criteria_ids && mc.criteria_ids - ORDER BY c2.cve, c2.severity, c2.published, c2.modified, c2.summary;` - - err := m.db.SelectContext(ctx, &vulns, query, purlName, purlVersion) - + rows, err := m.queryVulnRows(ctx, purlName) if err != nil { - zlog.S.Errorf("Failed to query short_cpe for %s: %v", purlName, err) - return []VulnsForPurl{}, fmt.Errorf("failed to query the table: %v", err) + return []VulnsForPurl{}, err } + vulns := collapseByCve(rows, func(b versionBounds) bool { + return b.covers(purlVersion) + }) + zlog.S.Debugf("Found %v results for %v (version %v).", len(vulns), purlName, purlVersion) - zlog.S.Debugf("Found %v results for %v.", len(vulns), purlName) return vulns, nil } diff --git a/pkg/models/vulns_purl_scenario_test.go b/pkg/models/vulns_purl_scenario_test.go new file mode 100644 index 0000000..8a9a72c --- /dev/null +++ b/pkg/models/vulns_purl_scenario_test.go @@ -0,0 +1,226 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Tests that exercise the vulnerability queries against real data, on the production +// schema. The pre-existing tests in vulns_purl_test.go only cover the +// error paths (empty purl, closed connection), which is why a query referencing +// columns that do not exist could pass CI. + +package models + +import ( + "context" + "sort" + "testing" + "time" + + "github.com/jmoiron/sqlx" + zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" + "scanoss.com/vulnerabilities/pkg/utils" +) + +const scenarioPurl = "pkg:github/scanoss/testcomp" + +// newScenarioDB returns a DB loaded with the production schema and all test fixtures. +func newScenarioDB(t *testing.T) (*sqlx.DB, context.Context) { + t.Helper() + if err := zlog.NewSugaredDevLogger(); err != nil { + t.Fatalf("failed to open a sugared logger: %v", err) + } + t.Cleanup(zlog.SyncZap) + ctx := context.Background() + db, err := sqlx.Connect("sqlite", ":memory:") + if err != nil { + t.Fatalf("failed to open a stub database connection: %v", err) + } + db.SetMaxOpenConns(1) + t.Cleanup(func() { CloseDB(db) }) + if err = LoadTestSQLData(db, ctx, nil); err != nil { + t.Fatalf("failed to load SQL test data: %v", err) + } + return db, ctx +} + +func timeOf(d utils.OnlyDate) time.Time { + return time.Time(d) +} + +func cveNames(vulns []VulnsForPurl) []string { + out := make([]string, 0, len(vulns)) + for _, v := range vulns { + out = append(out, v.Cve) + } + sort.Strings(out) + return out +} + +func equalStrings(a, b []string) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if a[i] != b[i] { + return false + } + } + return true +} + +// TestGetVulnsByPurlNameWithData checks every CVE reachable from a purl is returned, +// and that criteria belonging to other components are not. +func TestGetVulnsByPurlNameWithData(t *testing.T) { + db, ctx := newScenarioDB(t) + model := NewVulnsForPurlModel(db) + + vulns, err := model.GetVulnsByPurlName(ctx, scenarioPurl) + if err != nil { + t.Fatalf("GetVulnsByPurlName() unexpected error: %v", err) + } + want := []string{"CVE-TEST-0001", "CVE-TEST-0002", "CVE-TEST-0003", "CVE-TEST-0004"} + if got := cveNames(vulns); !equalStrings(got, want) { + t.Errorf("GetVulnsByPurlName() = %v, want %v", got, want) + } + for _, v := range vulns { + if v.Cve == "CVE-TEST-9999" { + t.Errorf("GetVulnsByPurlName() returned a CVE from an unrelated component") + } + } +} + +// TestGetVulnsByPurlNameFieldsPopulated guards the scan of every selected column. +// cves.published and cves.modified are TEXT in the schema, so this is what +// catches utils.OnlyDate not implementing sql.Scanner. +func TestGetVulnsByPurlNameFieldsPopulated(t *testing.T) { + db, ctx := newScenarioDB(t) + model := NewVulnsForPurlModel(db) + + vulns, err := model.GetVulnsByPurlName(ctx, scenarioPurl) + if err != nil { + t.Fatalf("GetVulnsByPurlName() unexpected error: %v", err) + } + var found bool + for _, v := range vulns { + if v.Cve != "CVE-TEST-0003" { + continue + } + found = true + if v.Severity != "CRITICAL" { + t.Errorf("Severity = %q, want %q", v.Severity, "CRITICAL") + } + if v.Summary != "affects exactly 1.0.0" { + t.Errorf("Summary = %q, want %q", v.Summary, "affects exactly 1.0.0") + } + if got := utils.ParseTime("2019-03-25"); !got.Equal(timeOf(v.Published)) { + t.Errorf("Published = %v, want %v", timeOf(v.Published), got) + } + if got := utils.ParseTime("2019-08-10"); !got.Equal(timeOf(v.Modified)) { + t.Errorf("Modified = %v, want %v", timeOf(v.Modified), got) + } + } + if !found { + t.Errorf("CVE-TEST-0003 not returned by GetVulnsByPurlName()") + } +} + +// TestGetVulnsByPurlVersionWithData checks the version-bound filtering at its edges: +// inclusive and exclusive, upper and lower. +func TestGetVulnsByPurlVersionWithData(t *testing.T) { + db, ctx := newScenarioDB(t) + model := NewVulnsForPurlModel(db) + + tests := []struct { + version string + want []string + reason string + }{ + { + version: "1.0.0", + want: []string{"CVE-TEST-0001", "CVE-TEST-0003"}, + reason: "end_including 2.0.0 and the exact 1.0.0 match; start_excluding 1.0.0 must not", + }, + { + version: "2.0.0", + want: []string{"CVE-TEST-0001", "CVE-TEST-0004"}, + reason: "end_including 2.0.0 is inclusive, and 2.0.0 sits strictly between 1.0.0 and 3.0.0", + }, + { + version: "3.0.0", + want: []string{"CVE-TEST-0002"}, + reason: "start_including 3.0.0 matches; end_excluding 3.0.0 must not", + }, + { + version: "9.9.9", + want: []string{"CVE-TEST-0002"}, + reason: "only the open-ended start_including 3.0.0 range applies", + }, + } + for _, tt := range tests { + t.Run(tt.version, func(t *testing.T) { + vulns, err := model.GetVulnsByPurlVersion(ctx, scenarioPurl, tt.version) + if err != nil { + t.Fatalf("GetVulnsByPurlVersion(%q) unexpected error: %v", tt.version, err) + } + if got := cveNames(vulns); !equalStrings(got, tt.want) { + t.Errorf("GetVulnsByPurlVersion(%q) = %v, want %v (%s)", + tt.version, got, tt.want, tt.reason) + } + }) + } +} + +// TestGetVulnsByPurlDispatch checks GetVulnsByPurl routes to the name or the version +// variant according to the version argument. +func TestGetVulnsByPurlDispatch(t *testing.T) { + db, ctx := newScenarioDB(t) + model := NewVulnsForPurlModel(db) + + withVersion, err := model.GetVulnsByPurl(ctx, scenarioPurl, "1.0.0") + if err != nil { + t.Fatalf("GetVulnsByPurl() with version, unexpected error: %v", err) + } + want := []string{"CVE-TEST-0001", "CVE-TEST-0003"} + if got := cveNames(withVersion); !equalStrings(got, want) { + t.Errorf("GetVulnsByPurl() with version = %v, want %v", got, want) + } + + noVersion, err := model.GetVulnsByPurl(ctx, scenarioPurl, "") + if err != nil { + t.Fatalf("GetVulnsByPurl() without version, unexpected error: %v", err) + } + if len(noVersion) <= len(withVersion) { + t.Errorf("GetVulnsByPurl() without version returned %d CVEs, expected more than the %d for a single version", + len(noVersion), len(withVersion)) + } +} + +// TestGetVulnsByPurlIgnoresEmbeddedVersion pins current behaviour: a version inside the +// purl string is stripped, not used to filter. Callers pass the version separately, as +// the local use case does. +func TestGetVulnsByPurlIgnoresEmbeddedVersion(t *testing.T) { + db, ctx := newScenarioDB(t) + model := NewVulnsForPurlModel(db) + + got, err := model.GetVulnsByPurl(ctx, scenarioPurl+"@1.0.0", "") + if err != nil { + t.Fatalf("GetVulnsByPurl() unexpected error: %v", err) + } + want := []string{"CVE-TEST-0001", "CVE-TEST-0002", "CVE-TEST-0003", "CVE-TEST-0004"} + if names := cveNames(got); !equalStrings(names, want) { + t.Errorf("GetVulnsByPurl(%q, \"\") = %v, want every CVE for the component %v", + scenarioPurl+"@1.0.0", names, want) + } +} diff --git a/pkg/models/vulns_purl_test.go b/pkg/models/vulns_purl_test.go index 2fa548a..45db419 100644 --- a/pkg/models/vulns_purl_test.go +++ b/pkg/models/vulns_purl_test.go @@ -33,7 +33,7 @@ func TestGetVulnsByPurl(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -96,7 +96,7 @@ func TestGetVulnsByPurlName(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -122,7 +122,7 @@ func TestGetVulnsByPurlVersion(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -146,9 +146,13 @@ func TestGetVulnsByPurlVersion(t *testing.T) { t.Errorf("Error was expected because purl is empty in cpeModel.GetVulnsByPurlVersion()") } + // The model queries through the pool, so the DB itself has to be closed to make the + // query fail. Closing conn only returns it to the pool; this assertion used to pass + // for the wrong reason, on a query SQLite could not even parse. CloseConn(conn) + CloseDB(db) _, err = cpeModel.GetVulnsByPurlVersion(ctx, "pkg:github/hapijs/call", "1.0.0") if err == nil { - t.Errorf("Error was expected because purl is empty in cpeModel.GetVulnsByPurlVersion()") + t.Errorf("Error was expected because the DB is closed in cpeModel.GetVulnsByPurlVersion()") } } diff --git a/pkg/service/vulnerability_service_test.go b/pkg/service/vulnerability_service_test.go index ec31602..ad5e451 100644 --- a/pkg/service/vulnerability_service_test.go +++ b/pkg/service/vulnerability_service_test.go @@ -23,10 +23,10 @@ import ( "testing" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" common "github.com/scanoss/papi/api/commonv2" pb "github.com/scanoss/papi/api/vulnerabilitiesv2" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" myconfig "scanoss.com/vulnerabilities/pkg/config" "scanoss.com/vulnerabilities/pkg/models" ) @@ -38,7 +38,7 @@ func TestVulnerabilityServer_Echo(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -91,7 +91,7 @@ func TestVulnerabilityServer_GetCpe(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -194,7 +194,7 @@ func TestVulnerabilityServer_GetComponentCpe(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -274,7 +274,7 @@ func TestVulnerabilityServer_GetComponentsCpes(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -399,7 +399,7 @@ func TestVulnerabilityServer_GetComponentsVulnerabilities(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -520,7 +520,7 @@ func TestVulnerabilityServer_GetComponentVulnerabilities(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -601,7 +601,7 @@ func TestVulnerabilityServer_GetVulnerabilities(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -704,7 +704,7 @@ func TestVulnerabilityServer_GetVulnerabilities(t *testing.T) { } // Test DB connection error path - use a separate DB instance - dbClosed, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + dbClosed, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } @@ -723,7 +723,7 @@ func TestVulnerabilityServer_CloseDBConnection(t *testing.T) { t.Fatalf("an error '%s' was not expected when opening a sugared logger", err) } defer zlog.SyncZap() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/usecase/cpe_test.go b/pkg/usecase/cpe_test.go index b5b861f..2fff378 100644 --- a/pkg/usecase/cpe_test.go +++ b/pkg/usecase/cpe_test.go @@ -26,8 +26,8 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" myconfig "scanoss.com/vulnerabilities/pkg/config" "scanoss.com/vulnerabilities/pkg/models" ) @@ -40,7 +40,7 @@ func TestGetCpeUseCase(t *testing.T) { defer zlog.SyncZap() ctx := ctxzap.ToContext(context.Background(), zlog.L) s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/usecase/local_use_case_scenario_test.go b/pkg/usecase/local_use_case_scenario_test.go new file mode 100644 index 0000000..d3b5edc --- /dev/null +++ b/pkg/usecase/local_use_case_scenario_test.go @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// End-to-end coverage for the local use case, asserting on the vulnerabilities it +// returns rather than only on the absence of an error. +// +// vulnerabilityWorker swallows query failures: it logs the error and emits the +// component with no vulnerabilities attached (local_use_case.go). That means a +// completely broken SQL query still produces a successful, empty response, and the +// pre-existing TestGetVulnerabilityUseCase cannot tell the difference because it makes +// no assertions on the result. + +package usecase + +import ( + "context" + "testing" + + "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" + "github.com/jmoiron/sqlx" + "github.com/scanoss/go-component-helper/componenthelper" + zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" + "scanoss.com/vulnerabilities/pkg/config" + "scanoss.com/vulnerabilities/pkg/models" +) + +const scenarioPurl = "pkg:github/scanoss/testcomp" + +func newScenarioUseCase(t *testing.T) (*LocalVulnerabilityUseCase, context.Context) { + t.Helper() + if err := zlog.NewSugaredDevLogger(); err != nil { + t.Fatalf("failed to open a sugared logger: %v", err) + } + t.Cleanup(zlog.SyncZap) + ctx := ctxzap.ToContext(context.Background(), zlog.L) + s := ctxzap.Extract(ctx).Sugar() + db, err := sqlx.Connect("sqlite", ":memory:") + if err != nil { + t.Fatalf("failed to open a stub database connection: %v", err) + } + t.Cleanup(func() { models.CloseDB(db) }) + if err = models.LoadTestSQLData(db, ctx, nil); err != nil { + t.Fatalf("failed to load test data: %v", err) + } + serverConfig, err := config.NewServerConfig(nil) + if err != nil { + t.Fatalf("failed to load config: %v", err) + } + return NewLocalVulnerabilitiesUseCase(ctx, s, serverConfig, db), ctx +} + +// TestGetVulnerabilitiesReturnsResults checks vulnerabilities actually reach the +// use case output, for a component with and without a version. +func TestGetVulnerabilitiesReturnsResults(t *testing.T) { + tests := []struct { + name string + version string + wantCves []string + }{ + { + name: "no version returns every CVE for the component", + version: "", + wantCves: []string{"CVE-TEST-0001", "CVE-TEST-0002", "CVE-TEST-0003", "CVE-TEST-0004"}, + }, + { + name: "version 1.0.0 returns only the CVEs whose range covers it", + version: "1.0.0", + wantCves: []string{"CVE-TEST-0001", "CVE-TEST-0003"}, + }, + { + name: "a v prefix on the version is trimmed before querying", + version: "v1.0.0", + wantCves: []string{"CVE-TEST-0001", "CVE-TEST-0003"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + vulnUc, ctx := newScenarioUseCase(t) + components := []componenthelper.Component{ + {Purl: scenarioPurl, Version: tt.version}, + } + out, err := vulnUc.GetVulnerabilities(ctx, components) + if err != nil { + t.Fatalf("GetVulnerabilities() unexpected error: %v", err) + } + if len(out.Components) != 1 { + t.Fatalf("GetVulnerabilities() returned %d components, want 1", len(out.Components)) + } + got := make(map[string]bool) + for _, v := range out.Components[0].Vulnerabilities { + got[v.Cve] = true + } + if len(got) != len(tt.wantCves) { + t.Errorf("GetVulnerabilities() returned %d CVEs (%v), want %d (%v)", + len(got), got, len(tt.wantCves), tt.wantCves) + } + for _, want := range tt.wantCves { + if !got[want] { + t.Errorf("GetVulnerabilities() missing expected CVE %v, got %v", want, got) + } + } + }) + } +} + +// TestGetVulnerabilitiesPopulatesFields guards the fields carried through to the +// output, including the dates that come out of TEXT columns. +func TestGetVulnerabilitiesPopulatesFields(t *testing.T) { + vulnUc, ctx := newScenarioUseCase(t) + out, err := vulnUc.GetVulnerabilities(ctx, []componenthelper.Component{ + {Purl: scenarioPurl, Version: "1.0.0"}, + }) + if err != nil { + t.Fatalf("GetVulnerabilities() unexpected error: %v", err) + } + if len(out.Components) != 1 { + t.Fatalf("GetVulnerabilities() returned %d components, want 1", len(out.Components)) + } + var found bool + for _, v := range out.Components[0].Vulnerabilities { + if v.Cve != "CVE-TEST-0003" { + continue + } + found = true + if v.Severity != "CRITICAL" { + t.Errorf("Severity = %q, want %q", v.Severity, "CRITICAL") + } + if v.Source != "NVD" { + t.Errorf("Source = %q, want %q", v.Source, "NVD") + } + wantURL := "https://nvd.nist.gov/vuln/detail/CVE-TEST-0003" + if v.URL != wantURL { + t.Errorf("URL = %q, want %q", v.URL, wantURL) + } + if v.Summary != "affects exactly 1.0.0" { + t.Errorf("Summary = %q, want %q", v.Summary, "affects exactly 1.0.0") + } + } + if !found { + t.Errorf("CVE-TEST-0003 missing from the use case output") + } +} diff --git a/pkg/usecase/local_use_case_test.go b/pkg/usecase/local_use_case_test.go index 44fc166..7615ee1 100644 --- a/pkg/usecase/local_use_case_test.go +++ b/pkg/usecase/local_use_case_test.go @@ -28,8 +28,8 @@ import ( "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" "scanoss.com/vulnerabilities/pkg/models" ) @@ -41,7 +41,7 @@ func TestGetVulnerabilityUseCase(t *testing.T) { defer zlog.SyncZap() ctx := ctxzap.ToContext(context.Background(), zlog.L) s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", ":memory:") + db, err := sqlx.Connect("sqlite", ":memory:") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/usecase/vulnerability_use_case_test.go b/pkg/usecase/vulnerability_use_case_test.go index aba3b54..c76b649 100644 --- a/pkg/usecase/vulnerability_use_case_test.go +++ b/pkg/usecase/vulnerability_use_case_test.go @@ -28,8 +28,8 @@ import ( myconfig "scanoss.com/vulnerabilities/pkg/config" "github.com/jmoiron/sqlx" - _ "github.com/mattn/go-sqlite3" zlog "github.com/scanoss/zap-logging-helper/pkg/logger" + _ "modernc.org/sqlite" "scanoss.com/vulnerabilities/pkg/models" ) @@ -41,7 +41,7 @@ func TestVulnerabilityUseCase(t *testing.T) { defer zlog.SyncZap() ctx := ctxzap.ToContext(context.Background(), zlog.L) s := ctxzap.Extract(ctx).Sugar() - db, err := sqlx.Connect("sqlite3", "file::memory:?cache=shared&uri=true") + db, err := sqlx.Connect("sqlite", "file::memory:?cache=shared&uri=true") if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } diff --git a/pkg/utils/only_date.go b/pkg/utils/only_date.go index fa7e016..fb23383 100644 --- a/pkg/utils/only_date.go +++ b/pkg/utils/only_date.go @@ -17,6 +17,7 @@ package utils import ( + "database/sql/driver" "fmt" "strings" "time" @@ -48,6 +49,65 @@ func (ct *OnlyDate) String() string { return fmt.Sprintf("%q", t.Format(ctLayout)) } +// scanLayouts are the formats accepted when reading a date from a database column, +// most specific first. A time part, if present, is discarded. +var scanLayouts = []string{ + ctLayout, + "2006-01-02 15:04:05", + "2006-01-02T15:04:05", + time.RFC3339, +} + +// Scan implements sql.Scanner. A date reaches us differently depending on the engine: +// the schema declares cves.published as TEXT so SQLite hands back a string, while a +// PostgreSQL date column hands back a time.Time. Both are accepted. +func (ct *OnlyDate) Scan(src interface{}) error { + switch v := src.(type) { + case nil: + *ct = OnlyDate(time.Time{}) + return nil + case time.Time: + *ct = OnlyDate(dateOnly(v)) + return nil + case []byte: + return ct.scanString(string(v)) + case string: + return ct.scanString(v) + default: + return fmt.Errorf("cannot scan %T into OnlyDate", src) + } +} + +// Value implements driver.Valuer, so a date is written in a form both engines accept. +func (ct OnlyDate) Value() (driver.Value, error) { + t := time.Time(ct) + if t.IsZero() { + return nil, nil + } + return t.Format(ctLayout), nil +} + +// scanString parses a date out of a textual column value. +func (ct *OnlyDate) scanString(s string) error { + s = strings.TrimSpace(s) + if len(s) == 0 { + *ct = OnlyDate(time.Time{}) + return nil + } + for _, layout := range scanLayouts { + if t, err := time.Parse(layout, s); err == nil { + *ct = OnlyDate(dateOnly(t)) + return nil + } + } + return fmt.Errorf("cannot parse %q as a date", s) +} + +// dateOnly drops the time part, keeping the calendar date in UTC. +func dateOnly(t time.Time) time.Time { + return time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC) +} + func ParseTime(t string) time.Time { timeValue, err := time.Parse(time.DateOnly, t) if err != nil { diff --git a/pkg/utils/only_date_db_test.go b/pkg/utils/only_date_db_test.go new file mode 100644 index 0000000..684a7ea --- /dev/null +++ b/pkg/utils/only_date_db_test.go @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// OnlyDate has to survive being scanned out of a database column. The schema declares +// cves.published and cves.modified as TEXT, so the driver hands back a string; a +// PostgreSQL date column hands back a time.Time. Both must work, since the service +// supports both engines. + +package utils + +import ( + "testing" + "time" +) + +func TestOnlyDateScan(t *testing.T) { + want := time.Date(2020, 1, 15, 0, 0, 0, 0, time.UTC) + tests := []struct { + name string + src interface{} + want time.Time + wantErr bool + }{ + {name: "string date, as SQLite returns TEXT", src: "2020-01-15", want: want}, + {name: "byte slice date", src: []byte("2020-01-15"), want: want}, + {name: "time.Time, as PostgreSQL returns date", src: want, want: want}, + {name: "timestamp string with time part", src: "2020-01-15 10:30:00", want: want}, + {name: "nil is the zero date", src: nil, want: time.Time{}}, + {name: "empty string is the zero date", src: "", want: time.Time{}}, + {name: "unparseable string", src: "not-a-date", wantErr: true}, + {name: "unsupported type", src: 12345, wantErr: true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var d OnlyDate + err := d.Scan(tt.src) + if (err != nil) != tt.wantErr { + t.Fatalf("OnlyDate.Scan(%v) error = %v, wantErr %v", tt.src, err, tt.wantErr) + } + if tt.wantErr { + return + } + if got := time.Time(d); !got.Equal(tt.want) { + t.Errorf("OnlyDate.Scan(%v) = %v, want %v", tt.src, got, tt.want) + } + }) + } +} From 5839c0053a58d109694c48308d5112090bf1c9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Go=C3=B1i?= Date: Thu, 6 Aug 2026 17:28:52 -0300 Subject: [PATCH 2/5] fix(version-matching): port natural_sort_order instead of comparing semver Verified against the production PostgreSQL database, the semver comparison returned fewer CVEs than the SQL it replaced on 3 of 48 sampled purl/version pairs, losing 27 CVEs. Version matching now ports natural_sort_order faithfully, and the same sample comes back with lost=0, gained=0. The data does not support semantic version ordering. 48% of the version names and 39.5% of the version bounds in production are not valid semver - "*", "-", "00.00.01a", "0.001.00.060", buildbot branch names. Semver has to drop those, and dropping them loses real vulnerabilities: the two anuko/time-tracker versions "*" and "-" went from 12 CVEs each to none. Pre-releases were the other divergence. natural_sort_order places 1.10.0-rc1 after 1.10.0, since it shares the prefix and carries extra characters, so a pre-release inherits the vulnerabilities of its release. Semver orders it before and excludes it, which cost 3 CVEs on apache/ant 1.10.0-rc1. Matching production is the safer default for a vulnerability service. Worth noting the zero padding preserves numeric ordering, so 9.0.0 still sorts before 10.0.0 - the bug in the original string comparison this was meant to fix does not exist. Padding to 20 digits, as every call site did, handles it. covers now mirrors the boolean shape of the original SQL exactly, quirks included: an exact match on an inclusive bound short-circuits before the range tests, so it wins even when the opposite bound would exclude the version. Tests ----- - naturalSortKey is pinned against 20 values produced by the real natural_sort_order function, including the overflow case where a number exceeds max_length and the extra digit is emitted as a plain character - pg_parity_test.go compares both rewritten queries against the originals on a real database. Skipped unless PG_DSN is set, so CI is unaffected. This is the test that caught the regression, and the one to run after touching either query Also confirms the queries are sound on PostgreSQL: cves.match_criteria_ids is a real array there, so the CAST is required; published and modified are date columns, which OnlyDate.Scan handles; and id columns are integer, so COALESCE(id, 0) is well typed. Co-Authored-By: Claude Opus 5 (1M context) --- pkg/models/pg_parity_test.go | 176 +++++++++++++++++++++++++++++++ pkg/models/version_range.go | 121 ++++++++++++--------- pkg/models/version_range_test.go | 139 +++++++++++++++++++----- 3 files changed, 360 insertions(+), 76 deletions(-) create mode 100644 pkg/models/pg_parity_test.go diff --git a/pkg/models/pg_parity_test.go b/pkg/models/pg_parity_test.go new file mode 100644 index 0000000..51ba011 --- /dev/null +++ b/pkg/models/pg_parity_test.go @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Parity check between the rewritten queries and the SQL they replaced, run against a +// real PostgreSQL database. Skipped unless PG_DSN is set, so it does not run in CI. +// +// This is the test that justifies the port in version_range.go. Run it after touching +// the queries or the version matching: +// +// PG_DSN='postgres://user:pass@host:5432/db?sslmode=disable' \ +// go test ./pkg/models/ -run TestComparePostgres -v -timeout 900s +// +// Expect lost=0 everywhere. Anything lost means the rewrite reports fewer +// vulnerabilities than production does, which is a regression regardless of whether the +// new answer is arguably more correct. +// +// Last run against the production database: 48 purl/version pairs, lost=0, gained=0. +// The variant without a version gains rows by design - the query it replaces joined +// cpes.id and nvd_match_criteria_ids.cpe_ids in a way that never matched, so it +// returned 0 CVEs for every purl. + +package models + +import ( + "context" + "fmt" + "os" + "sort" + "testing" + + "github.com/jmoiron/sqlx" + _ "github.com/lib/pq" + zlog "github.com/scanoss/zap-logging-helper/pkg/logger" +) + +func TestComparePostgres(t *testing.T) { + dsn := os.Getenv("PG_DSN") + if dsn == "" { + t.Skip("PG_DSN not set") + } + _ = zlog.NewSugaredDevLogger() + defer zlog.SyncZap() + ctx := context.Background() + db, err := sqlx.Connect("postgres", dsn) + if err != nil { + t.Fatalf("connect: %v", err) + } + defer db.Close() + model := NewVulnsForPurlModel(db) + + oldNameQuery := `SELECT DISTINCT c2.cve FROM short_cpe_purl scp + INNER JOIN cpes c ON scp.cpe_id = c.id + INNER JOIN nvd_match_criteria_ids nmci ON trim(CAST(nmci.cpe_ids AS TEXT), '{}') LIKE '%' || scp.cpe_id || '%' + INNER JOIN cves c2 ON trim(CAST(nmci.cpe_ids AS TEXT), '{}') LIKE '%' || nmci.match_criteria_id || '%' + WHERE scp.purl = $1` + + oldVersionQuery := `WITH matching_criteria AS ( + SELECT array_agg(nmci.match_criteria_id) as criteria_ids + FROM short_cpe_purl scp + INNER JOIN short_cpes sc ON sc.id = scp.cpe_id + INNER JOIN nvd_match_criteria_ids nmci ON nmci.short_cpe_id = sc.id + WHERE scp.purl = $1 + AND ( + $2 = nmci.version_start_including + OR $2 = nmci.version_end_including + OR ( + ( + (nmci.version_start_excluding = '' AND nmci.version_start_including = '') + OR (nmci.version_start_excluding != '' AND natural_sort_order($2, 20) > natural_sort_order(nmci.version_start_excluding, 20)) + OR (nmci.version_start_including != '' AND natural_sort_order($2, 20) > natural_sort_order(nmci.version_start_including, 20)) + ) + AND ( + (nmci.version_end_excluding = '' AND nmci.version_end_including = '') + OR (nmci.version_end_excluding != '' AND natural_sort_order($2, 20) < natural_sort_order(nmci.version_end_excluding, 20)) + OR (nmci.version_end_including != '' AND natural_sort_order($2, 20) < natural_sort_order(nmci.version_end_including, 20)) + ) + ) + ) + ) + SELECT DISTINCT c2.cve + FROM cves c2, matching_criteria mc + WHERE c2.match_criteria_ids && mc.criteria_ids` + + set := func(s []string) map[string]bool { + m := map[string]bool{} + for _, v := range s { + m[v] = true + } + return m + } + diff := func(a, b map[string]bool) []string { + var out []string + for k := range a { + if !b[k] { + out = append(out, k) + } + } + sort.Strings(out) + return out + } + + purls := []string{"pkg:apache/ant", "pkg:apache/arrow", "pkg:anuko/time-tracker", "pkg:apache/allura"} + + fmt.Println("\n########## variant WITHOUT version ##########") + for _, purl := range purls { + var oldCves []string + if err := db.SelectContext(ctx, &oldCves, oldNameQuery, purl); err != nil { + fmt.Printf(" %-28s OLD ERROR: %v\n", purl, err) + continue + } + newVulns, err := model.GetVulnsByPurlName(ctx, purl) + if err != nil { + fmt.Printf(" %-28s NEW ERROR: %v\n", purl, err) + continue + } + var newCves []string + for _, v := range newVulns { + newCves = append(newCves, v.Cve) + } + o, n := set(oldCves), set(newCves) + fmt.Printf(" %-28s old=%-4d new=%-4d lost=%v gained=%d\n", + purl, len(o), len(n), diff(o, n), len(diff(n, o))) + } + + fmt.Println("\n########## variant WITH version ##########") + for _, purl := range purls { + // real versions this component has CPEs for + var versions []string + err := db.SelectContext(ctx, &versions, `SELECT DISTINCT v.version_name + FROM short_cpe_purl scp + JOIN cpes c ON c.short_cpe_id = scp.cpe_id + JOIN versions v ON v.id = c.version_id + WHERE scp.purl = $1 AND v.version_name <> '' ORDER BY v.version_name LIMIT 12`, purl) + if err != nil { + fmt.Printf(" %s versions error: %v\n", purl, err) + continue + } + for _, ver := range versions { + var oldCves []string + if err := db.SelectContext(ctx, &oldCves, oldVersionQuery, purl, ver); err != nil { + fmt.Printf(" %-24s %-14s OLD ERROR: %v\n", purl, ver, err) + continue + } + newVulns, err := model.GetVulnsByPurlVersion(ctx, purl, ver) + if err != nil { + fmt.Printf(" %-24s %-14s NEW ERROR: %v\n", purl, ver, err) + continue + } + var newCves []string + for _, v := range newVulns { + newCves = append(newCves, v.Cve) + } + o, n := set(oldCves), set(newCves) + lost, gained := diff(o, n), diff(n, o) + flag := " " + if len(lost) > 0 { + flag = "!!" + } + fmt.Printf("%s %-24s %-14s old=%-4d new=%-4d lost=%-3d gained=%-3d\n", + flag, purl, ver, len(o), len(n), len(lost), len(gained)) + } + } +} diff --git a/pkg/models/version_range.go b/pkg/models/version_range.go index 4118065..fdec6ba 100644 --- a/pkg/models/version_range.go +++ b/pkg/models/version_range.go @@ -17,18 +17,66 @@ // Version range matching for NVD match criteria. // // This used to live in SQL, comparing versions with natural_sort_order, a custom -// PostgreSQL function. Comparing here instead keeps the queries portable across -// PostgreSQL and SQLite, and gives proper semantic version ordering rather than a -// string sort - the same approach FilterCpesByRequirement already takes in cpe_purl.go. +// PostgreSQL function that SQLite has no equivalent for. The comparison happens here +// instead so the queries stay portable across both engines. +// +// naturalSortKey is a faithful port of that function rather than a semantic version +// comparison, and covers reproduces the exact boolean shape of the original SQL. That +// is deliberate: the data does not support semver ordering. 48% of the version names +// and 39.5% of the version bounds in the production database are not valid semver - +// values like "*", "-", "00.00.01a", "0.001.00.060" or buildbot branch names. Comparing +// those semantically means either dropping them or guessing, and dropping them loses +// real vulnerabilities. Measured against production data, a semver implementation +// returned fewer CVEs than the SQL it replaced on 3 of 48 sampled purl/version pairs. +// +// Note that the zero padding preserves numeric ordering, so 9.0.0 still sorts before +// 10.0.0. Where this differs from semver is pre-releases: 1.10.0-rc1 sorts *after* +// 1.10.0, because it shares its prefix and carries extra characters. A pre-release +// therefore inherits the vulnerabilities of its release, which is the behaviour the +// service has in production today. package models import ( "strings" - - "github.com/Masterminds/semver/v3" ) +// nsoMaxLength is the digit padding width. The SQL passed 20 at every call site. +const nsoMaxLength = 20 + +// naturalSortKey ports the natural_sort_order PostgreSQL function: each run of digits +// is left-padded with zeros to maxLength so that numbers compare in numeric order, +// while every other character is copied through. Comparing two keys as plain strings +// then yields the same ordering the database produced. +func naturalSortKey(value string, maxLength int) string { + // Bounds applied by the original function. + if maxLength <= 0 || maxLength > 150 { + maxLength = 75 + } + var result, digits strings.Builder + flushDigits := func() { + if digits.Len() == 0 { + return + } + if pad := maxLength - digits.Len(); pad > 0 { + result.WriteString(strings.Repeat("0", pad)) + } + result.WriteString(digits.String()) + digits.Reset() + } + for _, char := range value { + // A digit past maxLength is emitted as a plain character, matching the original. + if char >= '0' && char <= '9' && digits.Len() < maxLength { + digits.WriteRune(char) + continue + } + flushDigits() + result.WriteRune(char) + } + flushDigits() + return result.String() +} + // versionBounds holds the version limits of an NVD match criterion. An empty bound // means the range is open on that side. type versionBounds struct { @@ -40,54 +88,27 @@ type versionBounds struct { // isOpen reports whether the criterion constrains the version at all. func (b versionBounds) isOpen() bool { - return len(strings.TrimSpace(b.StartIncluding)) == 0 && - len(strings.TrimSpace(b.StartExcluding)) == 0 && - len(strings.TrimSpace(b.EndIncluding)) == 0 && - len(strings.TrimSpace(b.EndExcluding)) == 0 + return len(b.StartIncluding) == 0 && len(b.StartExcluding) == 0 && + len(b.EndIncluding) == 0 && len(b.EndExcluding) == 0 } -// covers reports whether the given version falls inside the bounds. +// covers reports whether the given version falls inside the bounds. It mirrors the +// boolean structure of the SQL it replaces, quirks included: an exact match against an +// inclusive bound short-circuits on its own, so it wins even when the opposite bound +// would exclude the version, and the range tests are strict comparisons because that +// equality case is already handled. func (b versionBounds) covers(version string) bool { - version = strings.TrimSpace(version) - // An exact match on an inclusive bound settles it without parsing, so versions that - // are not valid semver still match the criteria that name them outright. The query - // this replaces short-circuited the same way. - if len(version) > 0 && - (version == strings.TrimSpace(b.StartIncluding) || version == strings.TrimSpace(b.EndIncluding)) { - return true - } - if b.isOpen() { + if version == b.StartIncluding || version == b.EndIncluding { return true } - target, err := semver.NewVersion(version) - if err != nil { - // Nothing left to compare against: only the shortcut above could have matched. - return false - } - // cmp is the target compared against the bound. - checks := []struct { - bound string - ok func(cmp int) bool - }{ - {b.StartIncluding, func(cmp int) bool { return cmp >= 0 }}, - {b.StartExcluding, func(cmp int) bool { return cmp > 0 }}, - {b.EndIncluding, func(cmp int) bool { return cmp <= 0 }}, - {b.EndExcluding, func(cmp int) bool { return cmp < 0 }}, - } - for _, c := range checks { - bound := strings.TrimSpace(c.bound) - if len(bound) == 0 { - continue - } - bv, err := semver.NewVersion(bound) - if err != nil { - // Skip a bound we cannot parse rather than treat it as a mismatch: missing a - // real vulnerability is worse than reporting a borderline one. - continue - } - if !c.ok(target.Compare(bv)) { - return false - } - } - return true + key := naturalSortKey(version, nsoMaxLength) + // Lower bound: unconstrained, or past whichever start bound is set. + afterStart := (len(b.StartExcluding) == 0 && len(b.StartIncluding) == 0) || + (len(b.StartExcluding) > 0 && key > naturalSortKey(b.StartExcluding, nsoMaxLength)) || + (len(b.StartIncluding) > 0 && key > naturalSortKey(b.StartIncluding, nsoMaxLength)) + // Upper bound: unconstrained, or short of whichever end bound is set. + beforeEnd := (len(b.EndExcluding) == 0 && len(b.EndIncluding) == 0) || + (len(b.EndExcluding) > 0 && key < naturalSortKey(b.EndExcluding, nsoMaxLength)) || + (len(b.EndIncluding) > 0 && key < naturalSortKey(b.EndIncluding, nsoMaxLength)) + return afterStart && beforeEnd } diff --git a/pkg/models/version_range_test.go b/pkg/models/version_range_test.go index a92d0f7..a1beea5 100644 --- a/pkg/models/version_range_test.go +++ b/pkg/models/version_range_test.go @@ -18,6 +18,97 @@ package models import "testing" +// TestNaturalSortKeyMatchesPostgres pins naturalSortKey against the output of the +// natural_sort_order PostgreSQL function it ports. Every expected value below was +// produced by that function on the production database with max_length 20: +// +// SELECT v, natural_sort_order(v, 20) FROM (VALUES ('1.0.0'), ...) t(v); +// +// If this test fails, the port has drifted and the two engines will disagree about +// which vulnerabilities apply to a version. +func TestNaturalSortKeyMatchesPostgres(t *testing.T) { + tests := []struct{ in, want string }{ + {"1.0.0", "00000000000000000001.00000000000000000000.00000000000000000000"}, + {"9.0.0", "00000000000000000009.00000000000000000000.00000000000000000000"}, + {"10.0.0", "00000000000000000010.00000000000000000000.00000000000000000000"}, + {"1.10.0", "00000000000000000001.00000000000000000010.00000000000000000000"}, + {"1.10.0-rc1", "00000000000000000001.00000000000000000010.00000000000000000000-rc00000000000000000001"}, + {"1.2.3-alpha", "00000000000000000001.00000000000000000002.00000000000000000003-alpha"}, + {"*", "*"}, + {"-", "-"}, + {".", "."}, + {"", ""}, + {"00.00.01a", "00000000000000000000.00000000000000000000.00000000000000000001a"}, + {"0.0.0.1", "00000000000000000000.00000000000000000000.00000000000000000000.00000000000000000001"}, + {"0.001.00.060", "00000000000000000000.00000000000000000001.00000000000000000000.00000000000000000060"}, + {"v1.0.0", "v00000000000000000001.00000000000000000000.00000000000000000000"}, + {"2017a", "00000000000000002017a"}, + {"r32-p4", "r00000000000000000032-p00000000000000000004"}, + {"1.0.0.RELEASE", "00000000000000000001.00000000000000000000.00000000000000000000.RELEASE"}, + // more digits than max_length: the overflow digit is emitted as a plain character + {"123456789012345678901234", "12345678901234567890100000000000000000234"}, + {"a1b2", "a00000000000000000001b00000000000000000002"}, + {"1a2b3", "00000000000000000001a00000000000000000002b00000000000000000003"}, + } + for _, tt := range tests { + t.Run(tt.in, func(t *testing.T) { + if got := naturalSortKey(tt.in, 20); got != tt.want { + t.Errorf("naturalSortKey(%q, 20)\n got %q\nwant %q", tt.in, got, tt.want) + } + }) + } +} + +// TestNaturalSortKeyMaxLengthBounds covers the guard the original function applies. +func TestNaturalSortKeyMaxLengthBounds(t *testing.T) { + // out of range values fall back to 75 + for _, maxLength := range []int{0, -1, 151} { + got := naturalSortKey("1", maxLength) + if len(got) != 75 { + t.Errorf("naturalSortKey(%q, %d) length = %d, want 75", "1", maxLength, len(got)) + } + } + if got := naturalSortKey("1", 5); got != "00001" { + t.Errorf("naturalSortKey(%q, 5) = %q, want %q", "1", got, "00001") + } +} + +// TestNaturalSortKeyOrdering states the ordering properties the range matching relies on. +func TestNaturalSortKeyOrdering(t *testing.T) { + tests := []struct { + name string + lower string + higher string + whyItRuns string + }{ + { + name: "zero padding keeps numeric order", lower: "9.0.0", higher: "10.0.0", + whyItRuns: "a plain string sort would put 10.0.0 first", + }, + { + name: "minor versions order numerically", lower: "1.9.0", higher: "1.10.0", + whyItRuns: "same reason, one level down", + }, + { + name: "a pre-release sorts after its release", lower: "1.10.0", higher: "1.10.0-rc1", + whyItRuns: "opposite of semver, and the reason a pre-release inherits its release's CVEs", + }, + { + name: "patch beats minor", lower: "1.0.0", higher: "1.0.1", + whyItRuns: "ordinary case", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + lo, hi := naturalSortKey(tt.lower, 20), naturalSortKey(tt.higher, 20) + if !(lo < hi) { + t.Errorf("expected %q < %q (%s)\n lower key %q\nhigher key %q", + tt.lower, tt.higher, tt.whyItRuns, lo, hi) + } + }) + } +} + func TestVersionBoundsCovers(t *testing.T) { tests := []struct { name string @@ -28,7 +119,7 @@ func TestVersionBoundsCovers(t *testing.T) { { name: "no bounds covers everything", bounds: versionBounds{}, - cases: map[string]bool{"1.0.0": true, "99.0.0": true, "not-a-version": true, "": true}, + cases: map[string]bool{"1.0.0": true, "99.0.0": true, "not-a-version": true, "*": true}, }, { name: "end including is inclusive", @@ -66,41 +157,38 @@ func TestVersionBoundsCovers(t *testing.T) { cases: map[string]bool{"1.0.0": true, "1.0.1": false, "0.9.9": false}, }, { - name: "semantic ordering, not string ordering", + name: "numeric ordering, not string ordering", bounds: versionBounds{EndIncluding: "10.0.0"}, - // a string sort would put "9.0.0" after "10.0.0" and wrongly exclude it + // a plain string sort would place 9.0.0 after 10.0.0 and wrongly exclude it cases: map[string]bool{"9.0.0": true, "10.0.0": true, "11.0.0": false}, }, { - name: "pre-release ordering", - bounds: versionBounds{StartIncluding: "1.0.0"}, - cases: map[string]bool{"1.0.0-alpha": false, "1.0.0": true, "1.0.1-beta": true}, + name: "a pre-release is covered by a range ending at its release", + // natural sort places 1.10.0-rc1 after 1.10.0, so the rc inherits the CVEs of + // its release. This is what production does today; semver would exclude it. + bounds: versionBounds{StartIncluding: "1.10.0"}, + cases: map[string]bool{"1.10.0-rc1": true, "1.10.0": true, "1.9.0": false}, }, { - name: "a version equal to an inclusive bound matches even when unparseable", - bounds: versionBounds{StartIncluding: "1.5.2.3", EndIncluding: "2.0"}, - cases: map[string]bool{"1.5.2.3": true, "2.0": true}, + name: "versions that are not semver still compare", + // 48% of production version names are not valid semver. Dropping them would + // lose real vulnerabilities, so they are compared as natural sort keys. + bounds: versionBounds{StartIncluding: "0.0.0", EndIncluding: "1.0.0"}, + cases: map[string]bool{"00.00.01a": true, "0.0.0.1": true, "0.001.00.060": true}, }, { - name: "an unparseable version matches nothing else", + name: "placeholder versions still fall in range", bounds: versionBounds{EndIncluding: "2.0.0"}, - cases: map[string]bool{"not-a-version": false, "": false}, - }, - { - name: "an unparseable bound is ignored rather than excluding the version", - // Losing a real vulnerability is worse than reporting a borderline one. - bounds: versionBounds{StartIncluding: "garbage", EndIncluding: "2.0.0"}, - cases: map[string]bool{"1.0.0": true, "3.0.0": false}, - }, - { - name: "surrounding whitespace is tolerated", - bounds: versionBounds{EndIncluding: " 2.0.0 "}, - cases: map[string]bool{" 1.0.0 ": true, "2.0.0": true, "3.0.0": false}, + // '*' and '-' are left untouched by the key, and both sort below '0', so they + // land inside an upper-bounded range. Production relies on this: dropping + // them instead cost 24 CVEs across two sampled components. + cases: map[string]bool{"*": true, "-": true}, }, { - name: "a v prefix is accepted on both sides", - bounds: versionBounds{EndIncluding: "v2.0.0"}, - cases: map[string]bool{"v1.0.0": true, "v3.0.0": false}, + name: "an exact match on an inclusive bound wins over the opposite bound", + // mirrors the SQL: the equality check short-circuits before the range tests + bounds: versionBounds{StartIncluding: "5.0.0", EndExcluding: "1.0.0"}, + cases: map[string]bool{"5.0.0": true}, }, } for _, tt := range tests { @@ -121,7 +209,6 @@ func TestVersionBoundsIsOpen(t *testing.T) { want bool }{ {name: "all empty", bounds: versionBounds{}, want: true}, - {name: "whitespace only", bounds: versionBounds{StartIncluding: " ", EndExcluding: "\t"}, want: true}, {name: "start including set", bounds: versionBounds{StartIncluding: "1.0.0"}, want: false}, {name: "start excluding set", bounds: versionBounds{StartExcluding: "1.0.0"}, want: false}, {name: "end including set", bounds: versionBounds{EndIncluding: "1.0.0"}, want: false}, From b4fea82170ce19f54317f6f313039aabccd9c06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Go=C3=B1i?= Date: Thu, 6 Aug 2026 19:10:26 -0300 Subject: [PATCH 3/5] style: fix the six issues golangci-lint reported CI caught these because the linter could not be run locally earlier: the installed version was 1.62.2 against a config targeting 2.10.1. Verified now with the exact version the workflow installs, which reports 0 issues. - lll: wrapped the three CREATE TABLE statements in testSchemaDDL that exceeded 180 characters. Same DDL, split across lines - unparam: naturalSortKey took a maxLength every caller passed 20 for, so it now uses the nsoMaxLength constant directly. The original function guarded against out-of-range widths, which is unreachable at a fixed 20 and is no longer reproduced - unused: dropped versionBounds.isOpen. Porting natural_sort_order removed its last caller, since an open range now falls out of the bound comparisons on its own - unused: moved loadTestSQLDataFilesWithSchema into a _test.go file. Only tests in this package call it, so it does not belong in the binary. LoadTestSchema and LoadTestSQLData stay in common.go because tests in other packages use them Dropped the two tests covering the removed maxLength parameter and isOpen along with them. Go Unit Test already passed on the previous commit; the earlier run failures on 1a386ea were infrastructure, with both jobs waiting 15 minutes for a hosted runner that never arrived. Co-Authored-By: Claude Opus 5 (1M context) --- pkg/models/common.go | 10 -------- pkg/models/common_helpers_test.go | 37 ++++++++++++++++++++++++++++ pkg/models/test_schema.go | 19 +++++++++++--- pkg/models/version_range.go | 34 ++++++++++--------------- pkg/models/version_range_test.go | 41 +++---------------------------- 5 files changed, 69 insertions(+), 72 deletions(-) create mode 100644 pkg/models/common_helpers_test.go diff --git a/pkg/models/common.go b/pkg/models/common.go index 534b1f0..c63cf21 100644 --- a/pkg/models/common.go +++ b/pkg/models/common.go @@ -101,16 +101,6 @@ func LoadTestSQLData(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn) error { return loadTestSQLDataFiles(db, ctx, conn, testDataFiles) } -// loadTestSQLDataFilesWithSchema loads the production schema followed by the given -// data fixtures. Use this instead of loadTestSQLDataFiles when a test only needs a -// subset of the fixtures, since the fixtures no longer create their own tables. -func loadTestSQLDataFilesWithSchema(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, files []string) error { - if err := LoadTestSchema(db, ctx, conn); err != nil { - return err - } - return loadTestSQLDataFiles(db, ctx, conn, files) -} - // loadTestSQLDataFiles loads a list of test SQL files. func loadTestSQLDataFiles(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, files []string) error { for _, file := range files { diff --git a/pkg/models/common_helpers_test.go b/pkg/models/common_helpers_test.go new file mode 100644 index 0000000..04fb6d6 --- /dev/null +++ b/pkg/models/common_helpers_test.go @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018-2025 SCANOSS.COM + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Helpers shared by the tests in this package. They live in a _test.go file so they do +// not ship in the binary; LoadTestSchema and LoadTestSQLData stay in common.go because +// tests in other packages call them. + +package models + +import ( + "context" + + "github.com/jmoiron/sqlx" +) + +// loadTestSQLDataFilesWithSchema loads the production schema followed by the given data +// fixtures. Use this instead of loadTestSQLDataFiles when a test only needs a subset of +// the fixtures, since the fixtures do not create their own tables. +func loadTestSQLDataFilesWithSchema(db *sqlx.DB, ctx context.Context, conn *sqlx.Conn, files []string) error { + if err := LoadTestSchema(db, ctx, conn); err != nil { + return err + } + return loadTestSQLDataFiles(db, ctx, conn, files) +} diff --git a/pkg/models/test_schema.go b/pkg/models/test_schema.go index 44075ca..2be8405 100644 --- a/pkg/models/test_schema.go +++ b/pkg/models/test_schema.go @@ -36,7 +36,12 @@ CREATE TABLE db_version ( created_at TEXT NOT NULL, db_release TEXT NOT NULL ); -CREATE TABLE all_urls (package_hash TEXT, component TEXT, purl_name TEXT, mine_id TEXT, vendor TEXT, version TEXT, version_id TEXT, date TEXT, license_id TEXT, is_mined TEXT, indexed_date TEXT, version_status TEXT, version_status_change_date TEXT, total_files TEXT, indexed_files TEXT, source_files TEXT, ignored_files TEXT, package_size TEXT); +CREATE TABLE all_urls ( + package_hash TEXT, component TEXT, purl_name TEXT, mine_id TEXT, vendor TEXT, version TEXT, + version_id TEXT, date TEXT, license_id TEXT, is_mined TEXT, indexed_date TEXT, version_status TEXT, + version_status_change_date TEXT, total_files TEXT, indexed_files TEXT, source_files TEXT, + ignored_files TEXT, package_size TEXT +); CREATE INDEX idx_allurls_name ON all_urls (purl_name, mine_id, license_id, version_id); CREATE INDEX idx_allurls_comp ON all_urls (component, vendor, mine_id); CREATE INDEX idx_allurls_phash ON all_urls (purl_name, package_hash, mine_id, version_id); @@ -46,7 +51,12 @@ CREATE TABLE licenses (id TEXT, license_name TEXT, spdx_id TEXT, is_spdx TEXT); CREATE INDEX idx_license_id_license_name_spdx_id_is_spdx ON licenses (id, license_name, spdx_id, is_spdx); CREATE TABLE mines (id TEXT, purl_type TEXT, mine_name TEXT, can_download TEXT, repository_url TEXT); CREATE INDEX idx_mines_purl_type ON mines (purl_type, id); -CREATE TABLE projects (mine_id TEXT, purl_name TEXT, vendor TEXT, component TEXT, versions TEXT, license_id TEXT, git_license_id TEXT, first_version_date TEXT, git_created_at TEXT, git_forks TEXT, git_stars TEXT, first_indexed_date TEXT, last_indexed_date TEXT, status TEXT, status_change_date TEXT, source_mine_id TEXT, source_purl_name TEXT); +CREATE TABLE projects ( + mine_id TEXT, purl_name TEXT, vendor TEXT, component TEXT, versions TEXT, license_id TEXT, + git_license_id TEXT, first_version_date TEXT, git_created_at TEXT, git_forks TEXT, git_stars TEXT, + first_indexed_date TEXT, last_indexed_date TEXT, status TEXT, status_change_date TEXT, + source_mine_id TEXT, source_purl_name TEXT +); CREATE INDEX idx_projects ON projects (purl_name, mine_id, license_id, git_license_id); CREATE TABLE versions (id TEXT, version_name TEXT, semver TEXT); CREATE INDEX idx_versions_version_name_id_semver ON versions (version_name, id, semver); @@ -64,7 +74,10 @@ CREATE INDEX idx_vendor_locations_declared_location ON vendor_locations (declare CREATE TABLE cpes (cpe TEXT, version_id TEXT, short_cpe_id TEXT); CREATE TABLE short_cpe_purl (cpe_id TEXT, purl_id TEXT, purl TEXT); CREATE INDEX short_cpe_purl_purl ON short_cpe_purl (purl); -CREATE TABLE nvd_match_criteria_ids (match_criteria_id TEXT, short_cpe_id TEXT, version_start_including TEXT, version_start_excluding TEXT, version_end_including TEXT, version_end_excluding TEXT); +CREATE TABLE nvd_match_criteria_ids ( + match_criteria_id TEXT, short_cpe_id TEXT, version_start_including TEXT, + version_start_excluding TEXT, version_end_including TEXT, version_end_excluding TEXT +); CREATE TABLE short_cpes (id TEXT); CREATE TABLE cves (cve TEXT, severity TEXT, published TEXT, modified TEXT, summary TEXT, match_criteria_ids TEXT); CREATE INDEX idx_cves_match_criteria_ids ON cves (match_criteria_ids); diff --git a/pkg/models/version_range.go b/pkg/models/version_range.go index fdec6ba..204819c 100644 --- a/pkg/models/version_range.go +++ b/pkg/models/version_range.go @@ -41,32 +41,30 @@ import ( "strings" ) -// nsoMaxLength is the digit padding width. The SQL passed 20 at every call site. +// nsoMaxLength is the digit padding width. The SQL passed 20 at every call site, so +// that is fixed here; the original function's guard for out-of-range widths is +// unreachable at this width and is not reproduced. const nsoMaxLength = 20 // naturalSortKey ports the natural_sort_order PostgreSQL function: each run of digits -// is left-padded with zeros to maxLength so that numbers compare in numeric order, +// is left-padded with zeros to nsoMaxLength so that numbers compare in numeric order, // while every other character is copied through. Comparing two keys as plain strings // then yields the same ordering the database produced. -func naturalSortKey(value string, maxLength int) string { - // Bounds applied by the original function. - if maxLength <= 0 || maxLength > 150 { - maxLength = 75 - } +func naturalSortKey(value string) string { var result, digits strings.Builder flushDigits := func() { if digits.Len() == 0 { return } - if pad := maxLength - digits.Len(); pad > 0 { + if pad := nsoMaxLength - digits.Len(); pad > 0 { result.WriteString(strings.Repeat("0", pad)) } result.WriteString(digits.String()) digits.Reset() } for _, char := range value { - // A digit past maxLength is emitted as a plain character, matching the original. - if char >= '0' && char <= '9' && digits.Len() < maxLength { + // A digit past nsoMaxLength is emitted as a plain character, as the original does. + if char >= '0' && char <= '9' && digits.Len() < nsoMaxLength { digits.WriteRune(char) continue } @@ -86,12 +84,6 @@ type versionBounds struct { EndExcluding string } -// isOpen reports whether the criterion constrains the version at all. -func (b versionBounds) isOpen() bool { - return len(b.StartIncluding) == 0 && len(b.StartExcluding) == 0 && - len(b.EndIncluding) == 0 && len(b.EndExcluding) == 0 -} - // covers reports whether the given version falls inside the bounds. It mirrors the // boolean structure of the SQL it replaces, quirks included: an exact match against an // inclusive bound short-circuits on its own, so it wins even when the opposite bound @@ -101,14 +93,14 @@ func (b versionBounds) covers(version string) bool { if version == b.StartIncluding || version == b.EndIncluding { return true } - key := naturalSortKey(version, nsoMaxLength) + key := naturalSortKey(version) // Lower bound: unconstrained, or past whichever start bound is set. afterStart := (len(b.StartExcluding) == 0 && len(b.StartIncluding) == 0) || - (len(b.StartExcluding) > 0 && key > naturalSortKey(b.StartExcluding, nsoMaxLength)) || - (len(b.StartIncluding) > 0 && key > naturalSortKey(b.StartIncluding, nsoMaxLength)) + (len(b.StartExcluding) > 0 && key > naturalSortKey(b.StartExcluding)) || + (len(b.StartIncluding) > 0 && key > naturalSortKey(b.StartIncluding)) // Upper bound: unconstrained, or short of whichever end bound is set. beforeEnd := (len(b.EndExcluding) == 0 && len(b.EndIncluding) == 0) || - (len(b.EndExcluding) > 0 && key < naturalSortKey(b.EndExcluding, nsoMaxLength)) || - (len(b.EndIncluding) > 0 && key < naturalSortKey(b.EndIncluding, nsoMaxLength)) + (len(b.EndExcluding) > 0 && key < naturalSortKey(b.EndExcluding)) || + (len(b.EndIncluding) > 0 && key < naturalSortKey(b.EndIncluding)) return afterStart && beforeEnd } diff --git a/pkg/models/version_range_test.go b/pkg/models/version_range_test.go index a1beea5..ee95276 100644 --- a/pkg/models/version_range_test.go +++ b/pkg/models/version_range_test.go @@ -52,27 +52,13 @@ func TestNaturalSortKeyMatchesPostgres(t *testing.T) { } for _, tt := range tests { t.Run(tt.in, func(t *testing.T) { - if got := naturalSortKey(tt.in, 20); got != tt.want { - t.Errorf("naturalSortKey(%q, 20)\n got %q\nwant %q", tt.in, got, tt.want) + if got := naturalSortKey(tt.in); got != tt.want { + t.Errorf("naturalSortKey(%q)\n got %q\nwant %q", tt.in, got, tt.want) } }) } } -// TestNaturalSortKeyMaxLengthBounds covers the guard the original function applies. -func TestNaturalSortKeyMaxLengthBounds(t *testing.T) { - // out of range values fall back to 75 - for _, maxLength := range []int{0, -1, 151} { - got := naturalSortKey("1", maxLength) - if len(got) != 75 { - t.Errorf("naturalSortKey(%q, %d) length = %d, want 75", "1", maxLength, len(got)) - } - } - if got := naturalSortKey("1", 5); got != "00001" { - t.Errorf("naturalSortKey(%q, 5) = %q, want %q", "1", got, "00001") - } -} - // TestNaturalSortKeyOrdering states the ordering properties the range matching relies on. func TestNaturalSortKeyOrdering(t *testing.T) { tests := []struct { @@ -100,7 +86,7 @@ func TestNaturalSortKeyOrdering(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - lo, hi := naturalSortKey(tt.lower, 20), naturalSortKey(tt.higher, 20) + lo, hi := naturalSortKey(tt.lower), naturalSortKey(tt.higher) if !(lo < hi) { t.Errorf("expected %q < %q (%s)\n lower key %q\nhigher key %q", tt.lower, tt.higher, tt.whyItRuns, lo, hi) @@ -201,24 +187,3 @@ func TestVersionBoundsCovers(t *testing.T) { }) } } - -func TestVersionBoundsIsOpen(t *testing.T) { - tests := []struct { - name string - bounds versionBounds - want bool - }{ - {name: "all empty", bounds: versionBounds{}, want: true}, - {name: "start including set", bounds: versionBounds{StartIncluding: "1.0.0"}, want: false}, - {name: "start excluding set", bounds: versionBounds{StartExcluding: "1.0.0"}, want: false}, - {name: "end including set", bounds: versionBounds{EndIncluding: "1.0.0"}, want: false}, - {name: "end excluding set", bounds: versionBounds{EndExcluding: "1.0.0"}, want: false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := tt.bounds.isOpen(); got != tt.want { - t.Errorf("versionBounds%+v.isOpen() = %v, want %v", tt.bounds, got, tt.want) - } - }) - } -} From f038a2b7e79abd19b89599af55a77791029a005b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Go=C3=B1i?= Date: Thu, 6 Aug 2026 20:02:36 -0300 Subject: [PATCH 4/5] test(parity): fail the PostgreSQL parity test instead of only printing Flagged in review, and correctly: the test printed lost CVEs and query errors but still exited successfully, so it was a comparison tool rather than a guard. A future change could lose vulnerabilities and the test would stay green. - lost CVEs now fail the test, in both the version and version-less variants - a query error fails instead of being skipped past; if the original query cannot run there is no parity to verify, which is not a pass - a run that compares nothing fails too, since a silent pass over an empty sample looks identical to a clean run Re-run against the production database: PASS, 48 pairs, no false positives from the new assertions. Co-Authored-By: Claude Opus 5 (1M context) --- pkg/models/pg_parity_test.go | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkg/models/pg_parity_test.go b/pkg/models/pg_parity_test.go index 51ba011..4d46d0d 100644 --- a/pkg/models/pg_parity_test.go +++ b/pkg/models/pg_parity_test.go @@ -113,17 +113,18 @@ func TestComparePostgres(t *testing.T) { } purls := []string{"pkg:apache/ant", "pkg:apache/arrow", "pkg:anuko/time-tracker", "pkg:apache/allura"} + comparisons := 0 fmt.Println("\n########## variant WITHOUT version ##########") for _, purl := range purls { var oldCves []string if err := db.SelectContext(ctx, &oldCves, oldNameQuery, purl); err != nil { - fmt.Printf(" %-28s OLD ERROR: %v\n", purl, err) + t.Errorf("%s: original query failed, parity cannot be checked: %v", purl, err) continue } newVulns, err := model.GetVulnsByPurlName(ctx, purl) if err != nil { - fmt.Printf(" %-28s NEW ERROR: %v\n", purl, err) + t.Errorf("%s: GetVulnsByPurlName failed: %v", purl, err) continue } var newCves []string @@ -131,8 +132,12 @@ func TestComparePostgres(t *testing.T) { newCves = append(newCves, v.Cve) } o, n := set(oldCves), set(newCves) - fmt.Printf(" %-28s old=%-4d new=%-4d lost=%v gained=%d\n", - purl, len(o), len(n), diff(o, n), len(diff(n, o))) + lost := diff(o, n) + fmt.Printf(" %-28s old=%-4d new=%-4d lost=%d gained=%d\n", + purl, len(o), len(n), len(lost), len(diff(n, o))) + if len(lost) > 0 { + t.Errorf("%s: rewrite lost %d CVEs the original returned: %v", purl, len(lost), lost) + } } fmt.Println("\n########## variant WITH version ##########") @@ -145,18 +150,18 @@ func TestComparePostgres(t *testing.T) { JOIN versions v ON v.id = c.version_id WHERE scp.purl = $1 AND v.version_name <> '' ORDER BY v.version_name LIMIT 12`, purl) if err != nil { - fmt.Printf(" %s versions error: %v\n", purl, err) + t.Errorf("%s: could not list versions: %v", purl, err) continue } for _, ver := range versions { var oldCves []string if err := db.SelectContext(ctx, &oldCves, oldVersionQuery, purl, ver); err != nil { - fmt.Printf(" %-24s %-14s OLD ERROR: %v\n", purl, ver, err) + t.Errorf("%s@%s: original query failed, parity cannot be checked: %v", purl, ver, err) continue } newVulns, err := model.GetVulnsByPurlVersion(ctx, purl, ver) if err != nil { - fmt.Printf(" %-24s %-14s NEW ERROR: %v\n", purl, ver, err) + t.Errorf("%s@%s: GetVulnsByPurlVersion failed: %v", purl, ver, err) continue } var newCves []string @@ -171,6 +176,15 @@ func TestComparePostgres(t *testing.T) { } fmt.Printf("%s %-24s %-14s old=%-4d new=%-4d lost=%-3d gained=%-3d\n", flag, purl, ver, len(o), len(n), len(lost), len(gained)) + if len(lost) > 0 { + t.Errorf("%s@%s: rewrite lost %d CVEs the original returned: %v", + purl, ver, len(lost), lost) + } + comparisons++ } } + // A silent pass with nothing compared would look identical to a clean run. + if comparisons == 0 { + t.Errorf("no purl/version pairs were compared; the sample data may have changed") + } } From 919a1f3096f8ca1d867f9d590a58479c0f71abfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Go=C3=B1i?= Date: Tue, 11 Aug 2026 14:40:30 -0300 Subject: [PATCH 5/5] docs: add the 0.14.0 changelog entry and document the SQLite configuration The changelog was missed when the work landed. Filed under 0.14.0 rather than Unreleased, since that is the version this becomes on merge. The README documented DB_DRIVER=postgres with no mention of the alternative, so nobody could tell how to point the service at SQLite. It now shows DB_DRIVER=sqlite with DB_DSN, and notes that the remaining DB_* values only matter when DB_DSN is empty, which is how OpenDBConnection behaves. Verified end to end rather than from reading the code: built the server, created a SQLite file from the schema, seeded one component and started the service with DB_DRIVER=sqlite. /health answered, and a REST query returned the vulnerability with its dates parsed correctly - the OnlyDate fix working on the real path, not just in tests. The changelog carries a Deployment section for the epss_data requirement. Without that table the EPSS lookup fails per request and every vulnerability comes back with epss.probability and epss.percentile at 0, which is indistinguishable from a real score of zero. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 23 +++++++++++++++++++++++ README.md | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b94a79c..bca35f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Upcoming changes... +## [0.14.0] - 2026-08-11 +### Added +- SQLite support alongside PostgreSQL: set `DB_DRIVER=sqlite` and `DB_DSN` to a database file +- `sql.Scanner` and `driver.Valuer` on `utils.OnlyDate`, so a date reads from a `TEXT` column (SQLite) or a `date` column (PostgreSQL) +- `pkg/models/test_schema.go` holding the production schema the tests build their database from +- `pkg/models/tests/vulns_scenario.sql`, a deterministic fixture whose match criteria cover every version-bound combination +- `pkg/models/pg_parity_test.go`, comparing the rewritten queries against the ones they replace on a real PostgreSQL database. Skipped unless `PG_DSN` is set + +### Changed +- Rewrote both vulnerability queries as portable SQL, valid on PostgreSQL and SQLite +- Moved version range matching out of SQL into `pkg/models/version_range.go`, porting the `natural_sort_order` PostgreSQL function so both engines agree on which vulnerabilities apply to a version +- Test fixtures under `pkg/models/tests/` now carry data only. They used to define their own tables, describing a schema that does not exist, which is what let queries referencing non-existent columns pass CI +- Unified the test driver on `modernc.org/sqlite`, the one the server uses; `mattn/go-sqlite3` is no longer a direct dependency and CGO is not required + +### Fixed +- `GetVulnsByPurlName` joined `cpes.id` and `nvd_match_criteria_ids.cpe_ids`, matching numeric CPE ids against a UUID. It returned no vulnerabilities at all on PostgreSQL and could not run on SQLite +- `GetVulnsByPurlVersion` relied on `array_agg`, the `&&` array overlap operator and the custom `natural_sort_order` function, none available in SQLite +- `saveLicense` inserted `is_sanitized`, which is not a column in the `licenses` table +- `saveVersion` passed four arguments to an insert with two placeholders + +### Deployment +- Requires an `epss_data` table (`cve`, `epss`, `percentile`) plus an index on `cve`. Without it the EPSS lookup fails on every request and every vulnerability is returned with `epss.probability` and `epss.percentile` reading `0`, indistinguishable from a genuine zero + ## [0.13.0] - 2026-06-22 ### Added - `/health` liveness endpoint (GET) on the REST gateway diff --git a/README.md b/README.md index 9ecf2a0..919f04a 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,18 @@ APP_PORT=50052 APP_MODE=dev APP_DEBUG=false -DB_DRIVER=postgres +DB_DRIVER=postgres # postgres or sqlite DB_HOST=localhost DB_USER=scanoss DB_PASSWD= DB_SCHEMA=vulnerabilities DB_SSL_MODE=disable +# To run against SQLite instead, point DB_DSN at the database file. +# The remaining DB_* values are only used to build a DSN when DB_DSN is empty. +# DB_DRIVER=sqlite +# DB_DSN=/path/to/vulnerabilities.db + # Vulnerability data sources OSV_ENABLED=true # Enable/disable OSV (Open Source Vulnerabilities) database OSV_API_BASE_URL=https://api.osv.dev/v1