Skip to content

Ordr Executor

Category: OT and IoT Security Script: ordr.py Integration: REST API Faraday Plugin: Raw JSON Website: https://ordr.net

Description

Imports the connected-device inventory and security alerts from an Ordr tenant into Faraday. Each device becomes a host with an asset-inventory vulnerability, and each alert becomes a vulnerability on the device it relates to.

Prerequisites

  • An Ordr tenant (SaaS or on-premises) reachable from the agent
  • An Ordr API token with read access to devices and alerts
  • The Python requests library installed in the agent environment

Configuration

Environment Variables (Setup)

Variable Required Description
ORDR_HOST Yes Base URL of your Ordr tenant (e.g., https://ordr.example.com). https:// is added if you omit the scheme.
ORDR_TOKEN Yes Ordr API token, sent as a Bearer token
ORDR_PAGES No Maximum number of pages to read from each endpoint, 1 to 100 (default: 10)

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

Execution Arguments

Parameter Type Mandatory Description
ORDR_CATEGORY string No Device category to import, as a label (e.g., medical, iot, ot, it) or a numeric category ID. Leave empty to import every category.
ORDR_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: import everything)

YAML Configuration Example

executors:
  ordr:
    repo_executor: ordr.py
    max_size: 65536
    varenvs:
      ORDR_HOST: "https://ordr.example.com"
      ORDR_TOKEN: "<api_token>"
    params:
      ORDR_CATEGORY:
        mandatory: false
        type: string
        base: string
      ORDR_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Sends every request with the API token in the Authorization: Bearer header
  2. Reads /api/v1/devices and then /api/v1/alerts, 100 records per page, filtered by ORDR_CATEGORY when set
  3. Creates one host per device, with its IP, name, MAC address and an OS string built from the manufacturer, model, OS and firmware. The device itself is added as an [ASSET-INVENTORY] Ordr device: <name> vulnerability.
  4. Creates one host per alert, keyed on the first related device IP (or the alert's source/destination IP), with an [Ordr Alert] <title> vulnerability
  5. Maps severity:
    • Devices: the device criticality (label or 0–4 number)
    • Alerts: the alert severity (label or 0–10 score), or risk_score when severity is missing. Resolved, muted, suppressed and dismissed alerts are set to info.
  6. Adds CVE IDs found on the record, plus references with the Ordr IDs, location, category, status and risk score

Notes

  • Devices and alerts without a usable IP are imported on host 0.0.0.0.
  • All vulnerabilities are created with status open. The Ordr alert status is kept in an Ordr-Status reference.
  • A 401 response stops the run. A 403, 429 or other error stops reading that endpoint and imports what was already read.
  • An unrecognized ORDR_MIN_SEVERITY value imports everything.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use ORDR_MIN_SEVERITY to filter by severity.