Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Added the loading of CPE match rules from JSON files. #2277

Merged
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ find_package (Threads)
## might occur.

pkg_check_modules (CJSON REQUIRED libcjson>=1.7.14)
pkg_check_modules (LIBGVM_BASE REQUIRED libgvm_base>=22.10)
pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.10)
pkg_check_modules (LIBGVM_OSP REQUIRED libgvm_osp>=22.10)
pkg_check_modules (LIBGVM_GMP REQUIRED libgvm_gmp>=22.10)
pkg_check_modules (LIBGVM_BASE REQUIRED libgvm_base>=22.12)
pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.12)
pkg_check_modules (LIBGVM_OSP REQUIRED libgvm_osp>=22.12)
pkg_check_modules (LIBGVM_GMP REQUIRED libgvm_gmp>=22.12)
pkg_check_modules (GNUTLS REQUIRED gnutls>=3.2.15)
pkg_check_modules (GLIB REQUIRED glib-2.0>=2.42)
pkg_check_modules (LIBBSD REQUIRED libbsd)
Expand Down
16 changes: 16 additions & 0 deletions src/manage_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3530,6 +3530,22 @@
" cve_refs INTEGER DEFAULT 0,"
" nvd_id text);");

sql ("CREATE TABLE scap2.cpe_match_nodes"

Check warning on line 3533 in src/manage_pg.c

View check run for this annotation

Codecov / codecov/patch

src/manage_pg.c#L3533

Added line #L3533 was not covered by tests
" (id SERIAL PRIMARY KEY,"
" parent_id INTEGER DEFAULT 0,"
" cve_id INTEGER DEFAULT 0,"
" operator text);");

sql ("CREATE TABLE scap2.cpe_match_range"

Check warning on line 3539 in src/manage_pg.c

View check run for this annotation

Codecov / codecov/patch

src/manage_pg.c#L3539

Added line #L3539 was not covered by tests
" (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);");

a-h-abdelsalam marked this conversation as resolved.
Show resolved Hide resolved
sql ("CREATE TABLE scap2.cpe_details"
" (id SERIAL PRIMARY KEY,"
" cpe_id text,"
Expand Down
Loading
Loading