Skip to content

Commit

Permalink
Add: Added the loading of CPE match rules from JSON files.
Browse files Browse the repository at this point in the history
Added the functionality to load the CPE match rules for CVEs from
JSON files and to store them in the database.
  • Loading branch information
jhelmold committed Aug 7, 2024
1 parent 5ce67ca commit 8755c57
Show file tree
Hide file tree
Showing 2 changed files with 522 additions and 13 deletions.
16 changes: 16 additions & 0 deletions src/manage_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3479,6 +3479,22 @@ manage_db_init (const gchar *name)
" cve_refs INTEGER DEFAULT 0,"
" nvd_id text);");

sql ("CREATE TABLE scap2.cpe_match_nodes"
" (id SERIAL PRIMARY KEY,"
" parent_id INTEGER DEFAULT 0,"
" cve_id INTEGER DEFAULT 0,"
" operator text);");

sql ("CREATE TABLE scap2.cpe_match_range"
" (id SERIAL PRIMARY KEY,"
" node_id INTEGER DEFAULT 0,"
" vulnerable INTEGER DEFAULT 0,"
" cpe text,"
" version_start_incl text,"
" version_start_excl text,"
" version_end_incl text,"
" version_end_excl text);");

sql ("CREATE TABLE scap2.cpe_details"
" (id SERIAL PRIMARY KEY,"
" cpe_id text,"
Expand Down
Loading

0 comments on commit 8755c57

Please sign in to comment.