How to Retrieve All Report IDs for a Specific Task in Greenbone/OpenVAS Using gvm-tools?

Hello everyone,
I’m working with Greenbone and trying to retrieve all report IDs associated with a specific task ID using gvm-tools. I have a solid understanding of how to use gmp.get_reports() to filter reports based on status, but I’m struggling to extract all report IDs for a specific task.

Can someone guide me on the correct way to retrieve all report IDs for a specific task ID using gvm-tools? Any advice or example code snippets would be greatly appreciated.

Thanks in advance for your help!

You can use the filter_string attribute to filter for task IDs ( → documentation ). The filter string in that case would look like this: task_id=1234abcd-1234-abcd-1234-123456abcdef. After that, you just need to extract the report IDs.

1 Like