From 42446fcdcf9d752201414afc7e5c7bcb2fb2ee6e Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 17 Feb 2022 23:19:55 -0500 Subject: dbstore/sql: add cpe and cpe-match subdirs --- dbstore/sql/cpe-match/insert-name.sql | 5 +++++ dbstore/sql/cpe-match/insert-version-max.sql | 5 +++++ dbstore/sql/cpe-match/insert-version-min.sql | 5 +++++ dbstore/sql/cpe-match/insert-vulnerable.sql | 4 ++++ dbstore/sql/cpe-match/insert.sql | 1 + 5 files changed, 20 insertions(+) create mode 100644 dbstore/sql/cpe-match/insert-name.sql create mode 100644 dbstore/sql/cpe-match/insert-version-max.sql create mode 100644 dbstore/sql/cpe-match/insert-version-min.sql create mode 100644 dbstore/sql/cpe-match/insert-vulnerable.sql create mode 100644 dbstore/sql/cpe-match/insert.sql (limited to 'dbstore/sql/cpe-match') diff --git a/dbstore/sql/cpe-match/insert-name.sql b/dbstore/sql/cpe-match/insert-name.sql new file mode 100644 index 0000000..adc99f4 --- /dev/null +++ b/dbstore/sql/cpe-match/insert-name.sql @@ -0,0 +1,5 @@ +INSERT INTO cpe_match_cpes( + cpe_match_id, + cpe_id, + cpe22_uri +) VALUES (?, (SELECT cpe_id FROM cpes WHERE cpe23 = ?), ?); diff --git a/dbstore/sql/cpe-match/insert-version-max.sql b/dbstore/sql/cpe-match/insert-version-max.sql new file mode 100644 index 0000000..b39944f --- /dev/null +++ b/dbstore/sql/cpe-match/insert-version-max.sql @@ -0,0 +1,5 @@ +INSERT INTO cpe_match_version_maxs( + cpe_match_id, + is_inclusive, + max_version +) VALUES (?, ?, ?); diff --git a/dbstore/sql/cpe-match/insert-version-min.sql b/dbstore/sql/cpe-match/insert-version-min.sql new file mode 100644 index 0000000..a7e8643 --- /dev/null +++ b/dbstore/sql/cpe-match/insert-version-min.sql @@ -0,0 +1,5 @@ +INSERT INTO cpe_match_version_mins( + cpe_match_id, + is_inclusive, + min_version +) VALUES (?, ?, ?); diff --git a/dbstore/sql/cpe-match/insert-vulnerable.sql b/dbstore/sql/cpe-match/insert-vulnerable.sql new file mode 100644 index 0000000..062c95b --- /dev/null +++ b/dbstore/sql/cpe-match/insert-vulnerable.sql @@ -0,0 +1,4 @@ +INSERT INTO cpe_match_vulnerables ( + cpe_match_id, + is_vulnerable +) VALUES (?, ?) diff --git a/dbstore/sql/cpe-match/insert.sql b/dbstore/sql/cpe-match/insert.sql new file mode 100644 index 0000000..bc5d2c0 --- /dev/null +++ b/dbstore/sql/cpe-match/insert.sql @@ -0,0 +1 @@ +INSERT INTO cpe_matches(cpe23, cpe22_uri) VALUES (?, ?); -- cgit v1.2.3