Skip to content

runZero Executor

Category: Asset Inventory and Network Management Script: runzero.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.runzero.com

Description

Imports the assets and services discovered by runZero into Faraday. Each asset and each service becomes a Faraday host with an informational [ASSET-INVENTORY] entry, so your discovered inventory sits next to the findings from other tools.

Prerequisites

  • A runZero account with discovered assets
  • A runZero Organization API key (not an Account key), created under Account > API Keys in the runZero console
  • requests available in the agent's Python environment (checked with python3 -c 'import requests')

Configuration

Environment Variables (Setup)

Variable Required Description
RUNZERO_HOST No URL or host name of your runZero console (default: console.runzero.com). Set it for self-hosted consoles, e.g. https://runzero.example.com. If you omit the scheme, https:// is used.
RUNZERO_TOKEN Yes runZero Organization API key
RUNZERO_PAGES No Maximum number of pages to read from each of the assets and services lists (default: 5, maximum: 50)

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

Execution Arguments

Parameter Type Mandatory Description
RUNZERO_SEARCH string No runZero search query applied to both assets and services (e.g., type:server os:linux, site:HQ alive:true or tag:pci). If empty, the whole organization is imported.
RUNZERO_LIMIT string No Number of records per page (default: 1000, maximum: 5000). Values above the maximum are lowered to it.

YAML Configuration Example

executors:
  runzero:
    repo_executor: runzero.py
    max_size: 65536
    varenvs:
      RUNZERO_HOST: "console.runzero.com"
      RUNZERO_TOKEN: "<runzero_token>"
    params:
      RUNZERO_SEARCH:
        mandatory: false
        type: string
        base: string
      RUNZERO_LIMIT:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with Authorization: Bearer <RUNZERO_TOKEN>
  2. Reads assets from GET /api/v1.0/org/assets, then services from GET /api/v1.0/org/services, page by page with limit and offset, passing RUNZERO_SEARCH as the search filter on both
  3. Creates one host per asset: first usable IP, host names, MAC address, and operating system and hardware details, with an [ASSET-INVENTORY] runZero asset: <name> entry that lists all the asset's attributes
  4. Creates one host per service, using the service's address and port, with an [ASSET-INVENTORY] runZero service: <address>:<port> entry

Notes

  • All entries have info severity and open status. They are inventory records, not vulnerabilities.
  • Assets without a usable IP (loopback and 0.0.0.0 are skipped) are created with 0.0.0.0.
  • Services are imported as separate hosts from their asset, so the same IP can appear twice in the workspace.
  • At most RUNZERO_PAGES pages are read per list, so with the defaults up to 5000 assets and 5000 services are imported.
  • If the token is rejected (401), the run stops. On other errors (403, 429, 5xx), the executor keeps what it has already read from that list.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.