Skip to content

Atlassian Insight (Assets) Executor

Category: Asset Inventory and Network Management Script: jira_insight.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.atlassian.com/software/jira/service-management/features/assets

Description

Imports the objects of an Atlassian Insight (Jira Service Management Assets) CMDB into Faraday as an asset inventory. Each object becomes a host with one informational vulnerability prefixed with [ASSET-INVENTORY].

Prerequisites

  • A Jira instance with Insight (Assets) and its v1 REST API (/rest/insight/1.0) reachable from the agent
  • A Jira user and API token with permission to read the Insight objects

Configuration

Environment Variables (Setup)

Variable Required Description
JIRA_HOST Yes Jira URL (e.g., https://mycompany.atlassian.net)
JIRA_USER Yes Jira user name or email
INSIGHT_PAGES No Maximum number of pages (50 objects each) to read, from 1 to 50 (default: 5)
JIRA_API_TOKEN Yes Jira API token

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

Execution Arguments

Parameter Type Mandatory Description
INSIGHT_WORKSPACE_ID string No ID of the Insight object schema to import (default: all schemas)
INSIGHT_IQL string No Insight Query Language filter (e.g., "Owner" = "ops"). Default: all objects.
INSIGHT_OBJECT_TYPE string No Import only objects of this type (e.g., Server, Network Device)

YAML Configuration Example

executors:
  jira_insight:
    repo_executor: jira_insight.py
    max_size: 65536
    varenvs:
      JIRA_HOST: "https://mycompany.atlassian.net"
      JIRA_USER: "<jira_user>"
      JIRA_API_TOKEN: "<jira_api_token>"
    params:
      INSIGHT_WORKSPACE_ID:
        mandatory: false
        type: string
        base: string
      INSIGHT_IQL:
        mandatory: false
        type: string
        base: string
      INSIGHT_OBJECT_TYPE:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with HTTP Basic using JIRA_USER and JIRA_API_TOKEN
  2. Queries /rest/insight/1.0/iql/objects, 50 objects per page, with an IQL query built from INSIGHT_OBJECT_TYPE, INSIGHT_IQL and INSIGHT_WORKSPACE_ID, and with objectSchemaId set when a workspace is given
  3. Creates one host per object:
    • IP: the first IP address found in the object's attributes
    • Hostname: the object's label or key, plus any domain names found in its attributes
    • MAC and OS: the first MAC address and operating system names found in its attributes
  4. Adds one vulnerability with severity info to each host, listing the object's attributes

Notes

  • Objects without an IP address attribute use the IP 0.0.0.0. Loopback addresses are ignored.
  • When both INSIGHT_OBJECT_TYPE and INSIGHT_IQL are set, the query is objectType = "<type>" AND (<iql>).
  • Reads at most INSIGHT_PAGES pages.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.