From 1e26b31ec2dc9f29ab72e9bdada2f3f4c5a329e3 Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Tue, 28 Jan 2025 09:02:16 +0100 Subject: [PATCH] Fix: Limit query size for affected products update The update of the affected products is now limited to 1000 CVEs per SQL query. This number can be changed with the --affected-products-query-size option. Also, an index has been added to make the queries a little faster. This is meant to prevent the WAL from becoming very large during the affected products update. --- doc/gvmd.8 | 6 ++++ doc/gvmd.8.xml | 18 ++++++++++ doc/gvmd.html | 14 ++++++++ src/gvmd.c | 10 ++++++ src/manage_pg.c | 2 ++ src/manage_sql_secinfo.c | 78 +++++++++++++++++++++++++++++++++++----- src/manage_sql_secinfo.h | 8 +++++ 7 files changed, 127 insertions(+), 9 deletions(-) diff --git a/doc/gvmd.8 b/doc/gvmd.8 index 1460e997e..a27871484 100644 --- a/doc/gvmd.8 +++ b/doc/gvmd.8 @@ -13,6 +13,12 @@ It manages the storage of any vulnerability management configurations and of the \fB-h, --help\f1 Show help options. .TP +\fB--affected-products-query-size=\fINUMBER\fB\f1 +Sets the number of CVEs to process per query when updating the affected products. Defaults to 1000. +.TP +\fB--auth-timeout=\fITIMEOUT\fB\f1 +Sets the authentication timeout time for the cached authentication. Defaults to 15 minutes. +.TP \fB--broker-address=\fIADDRESS\fB\f1 Sets the address for the publish-subscribe message (MQTT) broker. Defaults to localhost:9138. Set to empty to disable. .TP diff --git a/doc/gvmd.8.xml b/doc/gvmd.8.xml index 49bed2b70..70616d63b 100644 --- a/doc/gvmd.8.xml +++ b/doc/gvmd.8.xml @@ -52,6 +52,24 @@ along with this program. If not, see .

Show help options.

+ +