diff options
author | Paul Duncan <pabs@pablotron.org> | 2022-02-19 12:06:00 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2022-02-19 12:06:00 -0500 |
commit | 3b926f0deed58f197b466203fe591224fbce885d (patch) | |
tree | 359dd5e295ff831a95520c60998425405746af87 | |
parent | d4d9a43e49b5746a55af665078b24a6b92d7d8c4 (diff) | |
download | cvez-3b926f0deed58f197b466203fe591224fbce885d.tar.bz2 cvez-3b926f0deed58f197b466203fe591224fbce885d.zip |
add dbstore/sql/feed
-rw-r--r-- | dbstore/sql/feed/insert-cve-desc.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-cve-problem-desc.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-cve-problem.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-cve-ref-tag.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-cve-ref.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-cve.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-desc.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-item-cvss-v2.sql | 20 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-item-cvss-v3.sql | 14 | ||||
-rw-r--r-- | dbstore/sql/feed/insert-item.sql | 2 | ||||
-rw-r--r-- | dbstore/sql/feed/insert.sql | 2 |
11 files changed, 52 insertions, 0 deletions
diff --git a/dbstore/sql/feed/insert-cve-desc.sql b/dbstore/sql/feed/insert-cve-desc.sql new file mode 100644 index 0000000..cf1f589 --- /dev/null +++ b/dbstore/sql/feed/insert-cve-desc.sql @@ -0,0 +1,2 @@ +-- insert CVE description +INSERT INTO cve_descriptions(cve_id, desc_id) VALUES (?, ?); diff --git a/dbstore/sql/feed/insert-cve-problem-desc.sql b/dbstore/sql/feed/insert-cve-problem-desc.sql new file mode 100644 index 0000000..5c7afad --- /dev/null +++ b/dbstore/sql/feed/insert-cve-problem-desc.sql @@ -0,0 +1,2 @@ +-- add description for cve problem type +INSERT INTO cve_problem_descriptions(cve_id, desc_id) VALUES (?, ?); diff --git a/dbstore/sql/feed/insert-cve-problem.sql b/dbstore/sql/feed/insert-cve-problem.sql new file mode 100644 index 0000000..be324aa --- /dev/null +++ b/dbstore/sql/feed/insert-cve-problem.sql @@ -0,0 +1,2 @@ +-- add cve problem type +INSERT INTO cve_problems(cve_id) VALUES (?); diff --git a/dbstore/sql/feed/insert-cve-ref-tag.sql b/dbstore/sql/feed/insert-cve-ref-tag.sql new file mode 100644 index 0000000..6bcdd7a --- /dev/null +++ b/dbstore/sql/feed/insert-cve-ref-tag.sql @@ -0,0 +1,2 @@ +-- add tag for cve reference +INSERT INTO cve_ref_tags(cve_ref_id, tag) VALUES (?, ?); diff --git a/dbstore/sql/feed/insert-cve-ref.sql b/dbstore/sql/feed/insert-cve-ref.sql new file mode 100644 index 0000000..35afe21 --- /dev/null +++ b/dbstore/sql/feed/insert-cve-ref.sql @@ -0,0 +1,2 @@ +-- insert cve reference +INSERT INTO cve_refs(cve_id, url, name, source) VALUES (?, ?, ?, ?); diff --git a/dbstore/sql/feed/insert-cve.sql b/dbstore/sql/feed/insert-cve.sql new file mode 100644 index 0000000..02c0a8a --- /dev/null +++ b/dbstore/sql/feed/insert-cve.sql @@ -0,0 +1,2 @@ +-- add cve +INSERT INTO cves(item_id, nvd_cve_id, assigner) VALUES (?, ?, ?); diff --git a/dbstore/sql/feed/insert-desc.sql b/dbstore/sql/feed/insert-desc.sql new file mode 100644 index 0000000..139056e --- /dev/null +++ b/dbstore/sql/feed/insert-desc.sql @@ -0,0 +1,2 @@ +-- add description +INSERT INTO descriptions(lang, value) VALUES (?, ?); diff --git a/dbstore/sql/feed/insert-item-cvss-v2.sql b/dbstore/sql/feed/insert-item-cvss-v2.sql new file mode 100644 index 0000000..01d91f8 --- /dev/null +++ b/dbstore/sql/feed/insert-item-cvss-v2.sql @@ -0,0 +1,20 @@ +-- add item CVSSv2 impact. +INSERT INTO item_cvss_v2_impacts ( + item_id, + v2_vector, + v2_base_score, + v2_severity_id, + v2_impact_score, + v2_expl_score, + v2_insufficient_info, + v2_obtain_all_priv, + v2_obtain_user_priv, + v2_obtain_other_priv, + v2_ui_req +) VALUES ( + ?, ?, ?, + (SELECT severity_id FROM severities WHERE name = ?), + ?, ?, ?, + ?, ?, ?, + ? +); diff --git a/dbstore/sql/feed/insert-item-cvss-v3.sql b/dbstore/sql/feed/insert-item-cvss-v3.sql new file mode 100644 index 0000000..c5af1fe --- /dev/null +++ b/dbstore/sql/feed/insert-item-cvss-v3.sql @@ -0,0 +1,14 @@ +-- add item CVSSv2 impact. +INSERT INTO item_cvss_v3_impacts ( + item_id, + v3_vector, + v3_base_score, + v2_severity_id, + v3_impact_score, + v3_expl_score +) VALUES ( + ?, ?, ?, + (SELECT severity_id FROM severities WHERE name = ?), + ?, + ? +); diff --git a/dbstore/sql/feed/insert-item.sql b/dbstore/sql/feed/insert-item.sql new file mode 100644 index 0000000..3508553 --- /dev/null +++ b/dbstore/sql/feed/insert-item.sql @@ -0,0 +1,2 @@ +-- add feed item +INSERT INTO feed_items(feed_id, published_at, modified_at) VALUES (?, ?, ?); diff --git a/dbstore/sql/feed/insert.sql b/dbstore/sql/feed/insert.sql new file mode 100644 index 0000000..73fb784 --- /dev/null +++ b/dbstore/sql/feed/insert.sql @@ -0,0 +1,2 @@ +-- add feed +INSERT INTO feeds(data_time) VALUES (?); |