Hello all,
I am trying to build a workflow to scan 1 particular asset from InsightVM.
The ‘Scan’ module requires ‘Site ID’ and ‘Hostname’ values. ‘Hostname’ is optional, but because I want to scan 1 asset, I would have to provide it.
The following is the logic:
List all Sites → Loop through the SiteID → List all assets for each site (nested loop) → pattern Match against a host that we want to scan → if found initiate the scan with the ‘Hostname’ and its ‘SiteID’ → break both loops when the scan succeeds.
Now we were able to get to the scanning and breaking the 2nd loop, but have not found an efficient way to break the 1st loop along with the 2nd loop. Even if we break the 2nd loop after the successful scan, the 1st loop keeps on running. What would be the best way to break a nested loop?
Any suggestions / advices would be much appreciated.