How to filter host with severity != "N/A"

I’m somewhat new to GMP and openVAS at all and try to get al list of assets of type “host” which were not yet scanned. To me it looks like these hosts do have a severity of “N/A” and I tried to define a filter to extract just these hosts. Next task would be to get a list of these hosts by using gvm-cli.
I wasn’t able to find a filter expression using the Greenbone Security Assistant nor a solution using gvm-cli.
I’m using this command line to get an - unfiltered - list of assets:

gvm-cli -c /home/administrator/.config/gvm-tools.conf socket --xml “<get_assets type="host" ignore_pagination="true" />” --pretty

How to extend this to get only the “N/A”-hosts?
gvm-cli 21.1.0 (API version 21.1.3)

IIRC you need to add filter="severity=''". But I am not 100 percent sure.

1 Like

Sorry for my late response. I managed to get my filter working… Thanks for your hint
The proper filter expression for the Greenbone Security Assistant is
severity=""

The command line looks like this:
gvm-cli -c /home/administrator/.config/gvm-tools.conf socket --xml “<get_assets type=“host” ignore_pagination=“true” filter='severity=”"’/>" --pretty
Be aware: the outer quotes of filter=… are single quotes, the inner ones are double quotes.
Pretty simple - if you know :slight_smile:
Thanks for help
Juergen

1 Like