---
title: "Scheduled Script – Scan Results Enrichment"
canonical: "https://docs.infoblox.com/space/DeploymentGuideIPAMTDwithRapid7/1631879332/Scheduled%20Script%20%E2%80%93%20Scan%20Results%20Enrichment"
format: markdown
---
This scheduled script is designed to enrich asset records in Infoblox with vulnerability data from Rapid7 **after scans have completed**. It ensures that critical vulnerabilities are visible directly within Infoblox for prioritization and action.

### Data Flow Summary

1. **Retrieve Active Scan Information**
  - The script pulls scan-related identifiers from the global session:
    - `asset_id`
    - `scan_id`
    - `rapid7_asset_id`
2. **Monitor Scan Status**
  - For each `scan_id`, the script queries the Rapid7 API to check scan status.
  - If the status is **"finished"**, it proceeds to pull detailed results.
3. **Extract Critical Vulnerabilities**
  - Once a scan is completed, the script retrieves full scan results from Rapid7.
  - It filters the results to extract only **critical vulnerabilities**, including:
    - CVE identifiers
    - Vulnerability severity ratings
4. **Update Infoblox Asset Records**
  - The relevant asset in Infoblox is updated with scan findings using the following tags:
    - `Rapid7_Vulnerabilities_CVE_Id`: List of detected CVEs
    - `Rapid7_Vulnerability_Severity`: Highest severity level identified (e.g., Critical)

### Configuration – Destination Parameters

| Parameter | Description |
| --- | --- |
| **cspInstance** | Infoblox portal URL (e.g., `csp.infoblox.com`) |
| **cspApiKey** | API key for authenticating to Infoblox |
| **rapid7Instance** | URL of the Rapid7 InsightVM API endpoint (e.g., `<IP>:<Port>`) |
| **rapid7Username** | Rapid7 API user for authentication |
| **rapid7Password** | Password for the above user |

> ℹ️ Parameter names are pre-defined by the system. User only need to fill in the corresponding values during configuration.