Skip to content

BitSight Security Ratings Executor

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

Description

Imports the security rating and open findings of one monitored company from BitSight into Faraday. BitSight is a security-ratings platform, so all findings attach to a single host that represents the company, not to individual assets.

Prerequisites

  • A BitSight account with the company you want to import added to your portfolio
  • A BitSight API token, created in the console under Account > Settings > API Token
  • requests available in the agent's Python environment

Configuration

Environment Variables (Setup)

Variable Required Description
BITSIGHT_TOKEN Yes BitSight API token, created in the console under Account > Settings > API Token

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

Execution Arguments

Parameter Type Mandatory Description
BITSIGHT_COMPANY_GUID string Yes GUID of the monitored company (visible in the BitSight portal URL when viewing the company, e.g. My Companies > <company> > https://service.bitsighttech.com/app/company/<guid>/)
BITSIGHT_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical. BitSight names (severe, material, moderate, minor, neutral) also work. Default: info (import everything).

YAML Configuration Example

executors:
  bitsight:
    repo_executor: bitsight.py
    max_size: 65536
    varenvs:
      BITSIGHT_TOKEN: "<bitsight_token>"
    params:
      BITSIGHT_COMPANY_GUID:
        mandatory: true
        type: string
        base: string
      BITSIGHT_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates every request with HTTP Basic, using BITSIGHT_TOKEN as the username and an empty password
  2. Reads the company's rating record from GET /ratings/v2/companies/{guid}
  3. Reads the company's open findings from GET /ratings/v2/companies/{guid}/findings, 100 per page
  4. Maps each finding to a Faraday vulnerability:
    • Name: [SECURITY-RATING] followed by the risk vector label
    • Severity: BitSight's severity category (severe becomes critical, material becomes high, etc.), or its numeric 0-10 severity
    • Status: the finding's remediation status (resolved/fixed/patched becomes closed, risk_accepted/false_positive/waived becomes risk-accepted, everything else is open)
    • Details: risk vector, risk category, first/last seen, affected assets and remediation guidance

Notes

  • One run imports a single company. Its GUID must be a valid UUID; the run stops otherwise.
  • All findings attach to a single synthetic host per company (IP 0.0.0.0). Its os field shows the company's BitSight rating and grade (for example BitSight 750 (Advanced)) and its hostname is the company's primary domain.
  • The run stops if the token is rejected (HTTP 401). If BitSight denies or fails 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 BITSIGHT_MIN_SEVERITY to filter by severity.