Skip to content

Commit

Permalink
Add tags used for result NVTs to update_nvti_cache
Browse files Browse the repository at this point in the history
When getting NVTs for results, some tags that were previously included
in "tag" are still fetched from the NVTi cache, so update_nvti_cache has
to fetch them from the nvts table.
These are: summary, insight, affected, impact and detection.
  • Loading branch information
timopollmeier committed Dec 20, 2019
1 parent 538eaeb commit 8db6525
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -15732,7 +15732,10 @@ update_nvti_cache ()
nvti_cache = nvtis_new ();

init_iterator (&nvts,
"SELECT oid, name, family, cvss_base, tag, solution, solution_type FROM nvts;");
"SELECT oid, name, family, cvss_base, tag,"
" solution, solution_type, summary, insight, affected,"
" impact, detection"
" FROM nvts;");
while (next (&nvts))
{
iterator_t refs;
Expand All @@ -15745,6 +15748,11 @@ update_nvti_cache ()
nvti_set_tag (nvti, iterator_string (&nvts, 4));
nvti_set_solution (nvti, iterator_string (&nvts, 5));
nvti_set_solution_type (nvti, iterator_string (&nvts, 6));
nvti_set_summary (nvti, iterator_string (&nvts, 7));
nvti_set_insight (nvti, iterator_string (&nvts, 8));
nvti_set_affected (nvti, iterator_string (&nvts, 9));
nvti_set_impact (nvti, iterator_string (&nvts, 10));
nvti_set_detection (nvti, iterator_string (&nvts, 11));

init_iterator (&refs,
"SELECT type, ref_id, ref_text"
Expand Down

0 comments on commit 8db6525

Please sign in to comment.