Skip to content

WhiteHat Sentinel Executor

Category: Web Application Scanners Script: whitehat_sentinel.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.blackduck.com/dynamic-analysis-tools-dast.html

Description

Imports the dynamic application security testing (DAST) findings of one site from a legacy WhiteHat Sentinel tenant into Faraday. The site becomes a host and each finding becomes a vulnerability prefixed with [DAST].

Prerequisites

  • A legacy WhiteHat Sentinel tenant (the /api/site and /api/vuln API). Black Duck Continuous Dynamic is not covered.
  • A WhiteHat API key with read access to the site
  • The ID of the site to import
  • Network access to your Sentinel URL

Configuration

Environment Variables (Setup)

Variable Required Description
WH_HOST Yes WhiteHat Sentinel URL (e.g., https://sentinel.whitehatsec.com)
WH_API_KEY Yes WhiteHat API key

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

Execution Arguments

Parameter Type Mandatory Description
WH_SITE_ID string Yes ID of the WhiteHat site whose vulnerabilities are imported
WH_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: info)

YAML Configuration Example

executors:
  whitehat_sentinel:
    repo_executor: whitehat_sentinel.py
    max_size: 65536
    varenvs:
      WH_HOST: "https://sentinel.whitehatsec.com"
      WH_API_KEY: "<wh_api_key>"
    params:
      WH_SITE_ID:
        mandatory: true
        type: string
        base: string
      WH_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with WH_API_KEY, sent as the key query parameter and as the X-API-Key header. A value starting with Bearer is sent as the Authorization header instead.
  2. Reads the site details from /api/site/{site_id}, falling back to the /api/site list
  3. Reads the site's vulnerabilities from /api/vuln?query_site={site_id}, 100 per page
  4. Maps each vulnerability to Faraday:
    • Name: [DAST] <vulnerability class> in <location>
    • Severity: WhiteHat's 1-5 scale (5 critical, 4 high, 3 medium, 2 low, 1 info) or its text label, falling back to the CVSS score
    • Status: open, new and reopened are open. Closed and fixed are closed. Mitigated, accepted and false-positive are risk-accepted.

Notes

  • The site becomes a single host with IP 0.0.0.0 and hostname <site label>@<site id>, because WhiteHat reports URLs rather than IP addresses.
  • Run the executor once per site.
  • WH_HOST may be given without https://, which is added automatically.
  • An unrecognized WH_MIN_SEVERITY falls back to info.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use WH_MIN_SEVERITY to filter by severity.