Skip to content

AssetNote Executor

Category: Attack Surface Management Script: assetnote.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.assetnote.io/

Description

Imports externally discovered assets and security issues from AssetNote (Searchlight Cyber) attack surface management into Faraday. Each asset becomes a host, and its issues become vulnerabilities.

Prerequisites

  • An AssetNote tenant with API access
  • An AssetNote API key with permission to read assets and issues
  • requests available in the agent's Python environment

Configuration

Environment Variables (Setup)

Variable Required Description
AN_HOST Yes AssetNote API host (e.g., api.assetnote.io). https:// is added if missing.
AN_API_KEY Yes AssetNote API key. Create it in the AssetNote console under Settings > API Keys.

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

Execution Arguments

Parameter Type Mandatory Description
AN_MIN_SEVERITY string No Minimum severity of the issues to import: info, low, medium, high or critical. AssetNote names such as Important, Moderate, Sev1 to Sev5 and P1 to P5 also work. Default: import all issues.
AN_PAGES string No Maximum number of pages of 100 records to read for assets and, separately, for issues (default: 5, maximum: 50)

YAML Configuration Example

executors:
  assetnote:
    repo_executor: assetnote.py
    max_size: 65536
    varenvs:
      AN_HOST: "api.assetnote.io"
      AN_API_KEY: "<an_api_key>"
    params:
      AN_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string
      AN_PAGES:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates every request with Authorization: Bearer <AN_API_KEY>
  2. Reads the external assets from GET {AN_HOST}/api/v1/assets and the issues from GET {AN_HOST}/api/v1/issues, 100 records per page
  3. Creates one host per asset, using its first public IP (or 0.0.0.0) and its domain and hostname values as hostnames
  4. Attaches each issue to its asset by asset ID and maps it to a Faraday vulnerability:
    • Name: [EASM] AssetNote followed by the issue name
    • Severity: the issue's severity or priority, its risk score (0 to 10), or its CVSS score
    • Status: resolved, remediated and fixed issues become closed. Risk-accepted, false-positive and dismissed issues become risk-accepted. Everything else is open.
    • Resolution: AssetNote's remediation text, or a generic hint to review the issue in the AssetNote console

Notes

  • Issues that do not match any imported asset are grouped under one host with the IP 0.0.0.0 and the hostname (unattached).
  • Assets without an ID are skipped.
  • By default the executor reads at most 500 assets and 500 issues per run. Raise AN_PAGES for larger tenants.
  • AN_MIN_SEVERITY only filters issues. Assets are still imported as hosts when all their issues are filtered out. Unrecognized values are ignored.
  • AN_HOST can be given with or without https://. Without it, https:// is assumed.
  • The run stops if the API key is rejected (HTTP 401). If AssetNote 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. Use AN_MIN_SEVERITY to filter by severity.