immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
354 stars 102 forks source link

How to export a full report when result more than 1000 #143

Closed tpaiii3 closed 2 years ago

tpaiii3 commented 2 years ago

My scan result have 9000 items. I try to export in csv/xml format. But it can export just 1000 items.

immauss commented 2 years ago

Best to follow the guidance over on the community forum. This is more a Greenbone thing than a container thing. But let me know if you have any trouble implementing their fixes in the container. And please let me know if you manage to work this out.

Thanks, -Scott

lokalhorstkme commented 2 years ago

Scott,

great work ...

found the stuff to get huge reports: (https://forum.greenbone.net/t/export-all-scan-results-from-a-single-report-or-multiple-when-then-are-more-than-1000-results/12383)

To make a long story short:

gvm-cli is needed to get the reports. But unfortunately in the actual docker, startup of gvmd is not creating the necessary /var/run/gvmd.sock. Could you please modify the gvmd startup script ( /scripts/gvmd.sh) in that way:

-------- CUT -------- su -c "exec gvmd --unix-socket=/var/run/gvmd.sock -f $GMP ..... -------- CUT --------

you could test if the socket (/var/run/gvmd.sock) is exsting : _docker exec -it -u gvm openvas bash gvm-cli socket --xml ""_

Hope this works / helps .. Best regards -Kay

immauss commented 2 years ago

Kay, You "should" be able to make this work with the 'ssh' connection option. GMP is enabled in the container and gvmd is listening on port 9390 for connections. I know this should work, but have not had the opportunity (or need) to do much with it other than verify the port is listening. I'll try to do some tests with it, but it might be a few days. If you work it out, please let me know.

   I disabled the sockets to allow for easier inter-container communications. Re-enabling the sockets breaks the network connections (gvmd will only do one or the other, not both). 

Let me know.

-Scott

immauss commented 2 years ago

Correction ... it's 'tls' not 'ssh'

scott@XXXX ~ $ scott@XXXX ~ $ docker exec -t -u gvm openvas-prod /usr/local/bin/gvm-cli --gmp-username admin --gmp-password XXXXXXXXX tls --xml ""

21.4
lokalhorstkme commented 2 years ago

Scott,

awesome! You're my man!

TLS makes sense, otherwise communication via socks over containers is a nightmare ;-).

Works like charming with TLS, even from other containers. So there is no need for re-enabeling socks.

Thanx lot for your help!

Best regards Kay

immauss commented 2 years ago

Awesome! Glad you worked it out.