Skip to content

Rapid7 InsightCloudSec (CNAPP) Executor

Category: Cloud Security Script: rapid7_insightcloudsec.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.rapid7.com/products/insightcloudsec/

Description

Imports cloud security findings from Rapid7 InsightCloudSec (formerly DivvyCloud) into Faraday. The executor evaluates the tenant's insights and creates a [CNAPP] vulnerability for each cloud resource that matches an insight, grouped by cloud account.

Prerequisites

  • An InsightCloudSec tenant with API access
  • An API key of a service account that can list insights and run evaluations (created under Administration > API Keys)
  • Network access from the agent to your InsightCloudSec URL

Configuration

Environment Variables (Setup)

Variable Required Description
ICS_HOST Yes URL of your InsightCloudSec tenant (e.g., https://my-tenant.divvycloud.com). If you omit the scheme, https:// is used.
ICS_API_KEY Yes InsightCloudSec API key. It is sent in the Api-Key header. A value that starts with Bearer is sent as an Authorization header instead.

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
ICS_INSIGHT_ID string No ID of a single insight to evaluate. If empty, all visible insights are listed and evaluated. Setting it avoids the insight listing call, which helps with restricted API keys.
ICS_RESOURCE_GROUP_ID string No Comma-separated resource group (scope) IDs to limit the evaluation to. If empty, all resource groups visible to the key are used.
ICS_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: info)

YAML Configuration Example

executors:
  rapid7_insightcloudsec:
    repo_executor: rapid7_insightcloudsec.py
    max_size: 65536
    varenvs:
      ICS_HOST: "https://my-tenant.divvycloud.com"
      ICS_API_KEY: "<ics_api_key>"
    params:
      ICS_INSIGHT_ID:
        mandatory: false
        type: string
        base: string
      ICS_RESOURCE_GROUP_ID:
        mandatory: false
        type: string
        base: string
      ICS_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with the API key
  2. Gets the insights: the one in ICS_INSIGHT_ID, or all of them with POST /v2/public/insights/list
  3. Runs each insight with POST /v2/public/insight/{id}/evaluation/run, limited to ICS_RESOURCE_GROUP_ID if set, and reads the matching resources page by page
  4. Maps each matching resource to a Faraday vulnerability:
    • Name: [CNAPP] followed by the insight name and the affected resource
    • Severity: the insight's severity (native scale 1 low, 2 medium, 3 high, or severity names), or the CVSS score when missing
    • Status: open, or risk-accepted when the resource is suppressed or exempted
    • Details: cloud provider, account, region, CVEs and references
  5. Drops findings below ICS_MIN_SEVERITY and groups the rest by cloud account

Notes

  • Hosts use IP 0.0.0.0, because cloud findings belong to accounts and resources and not to IP addresses. The hostname is <account name>@<account id>.
  • Cloud accounts without findings (after the severity filter) are not imported.
  • An unrecognized ICS_MIN_SEVERITY falls back to info.
  • TLS certificate verification is disabled for requests to the API.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use ICS_MIN_SEVERITY to filter by severity.