Rapid7 InsightVM asset import

kenmcneil
Tera Expert

We are trying to solve a problem with importing non-persistent VDI's (Workstations). Because we are required to install the Rapid7 agent on all workstations (mostly remote) and servers, I use the following site for asset import:

 

- Rapid7 Insight Agents

 

This import works great, except it imports all non-persistent VDIs (ephemeral assets), creates a few thousand unmatched CIs, and we do not want that. The non-persistent VDI's have the same naming convention ( first 8 characters are the same). 

 

I talked to my friend Copilot and asked about editing the Script Include - Rapid7APIVulnerableItemIntegration to allow adding an exception for the VDIs based on the naming convention, and it warned me about changing OOTB code and gave me the following recommendation:

 

if (this._isExcludedAsset(sourceData)) {
    // Option 1 (safer): tag and continue
    sourceData.u_asset_exception = true;

 

    // Option 2 (riskier): skip creation
    return;
}

 

In InsightVM, I have tried adding a dynamic asset group to a site scan, but because the site scanner cannot scan remote assets, most workstations are missing from the asset import (Servers are fine since they are not remote), which is why I am looking into editing the script include. Another option would be to create a workflow that deletes the non-persistent VDI's after import.

 

Other solutions are appreciated. TIA