Axonius Executor¶
Category: Asset Inventory and Network Management
Script: axonius.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.axonius.com
Description¶
Imports the device and user inventory from Axonius into Faraday. Each Axonius device and user becomes a host with one informational record, and you can limit the import with an Axonius query (AQL).
Prerequisites¶
- An Axonius instance reachable from the agent
- An Axonius API key and secret with permission to read devices and users
requestsavailable in the agent's Python environment
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
AXONIUS_HOST |
Yes | Axonius host (e.g., axonius.mycorp.com). https:// is added if missing. |
AXONIUS_API_KEY |
Yes | Axonius API key. Create it in the Axonius console under Account > API Key. |
AXONIUS_API_SECRET |
Yes | API secret paired with the API key |
AXONIUS_PAGES |
No | Maximum number of pages of 100 records to read for devices and, separately, for users (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 |
|---|---|---|---|
AXONIUS_QUERY |
string | No | Axonius Query Language (AQL) filter applied to both devices and users, e.g. ("specific_data.data.os.type" == "Windows") and ("specific_data.data.last_seen" > date("NOW - 30d")). Default: all assets. |
AXONIUS_FIELDS |
string | No | Comma-separated Axonius field paths to request, e.g. specific_data.data.hostname,specific_data.data.network_interfaces.ips,specific_data.data.os.type. The same list is used for devices and users. Default: a built-in set of hostname, IP, MAC, OS and last-seen fields for devices, and username, mail and domain fields for users. |
YAML Configuration Example¶
executors:
axonius:
repo_executor: axonius.py
max_size: 65536
varenvs:
AXONIUS_HOST: "axonius.mycorp.com"
AXONIUS_API_KEY: "<axonius_api_key>"
AXONIUS_API_SECRET: "<axonius_api_secret>"
params:
AXONIUS_QUERY:
mandatory: false
type: string
base: string
AXONIUS_FIELDS:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates every request with the
api-keyandapi-secretheaders - Reads devices with
POST {AXONIUS_HOST}/api/V4.0/assets/devicesand users withPOST {AXONIUS_HOST}/api/V4.0/assets/users, 100 records per page, usingAXONIUS_QUERYas the filter - Creates one host per device, with the first usable IP, hostnames, MAC address and OS from the device record
- Creates one host per user, with the user name as hostname
- Adds one informational vulnerability to each host, named
[ASSET-INVENTORY] Axonius device: <name>or[ASSET-INVENTORY] Axonius user: <name>, with all returned fields in its description
Notes¶
- Axonius data is inventory, not vulnerabilities. Every vulnerability has
infoseverity. - Devices without a usable IP address (loopback and
0.0.0.0are ignored) use0.0.0.0. Users always use0.0.0.0because they are not tied to an IP address. - CVEs found in an asset's fields are added to its vulnerability.
- By default the executor reads at most 500 devices and 500 users per run. Raise
AXONIUS_PAGESfor larger tenants. AXONIUS_HOSTcan be given with or withouthttps://. Without it,https://is assumed.- The run stops if the credentials are rejected (HTTP 401). If Axonius rate-limits or denies a later request, the executor keeps what it has already read.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.