This workflow manages the scan request itself. It prevents an interrupted worker from submitting a second scan when it can resume polling the original scan_id.

Requirements

  • FullHunt Enterprise access with the OEM module
  • Python 3.10 or later with requests
  • A domain, host, public IP, or public CIDR you own or are authorized to test
  • Stable tenant and job identifiers for query_tags
Validate the target against your own authorization allowlist before running this workflow. A syntactically valid target is not proof of authorization.

Lifecycle contract

A non-deduplicated queued request consumes one OEM credit. Status checks do not consume scan credit. Queue requests are limited to 5 per minute, while status checks are limited to 10 per minute.

Run the worker

oem_scan_lifecycle.py

Retrieve updated observations

scan_completed confirms the OEM scan job reached completion. It does not return the resulting host collection in the status response. Query the relevant indexed endpoint after completion:
  • Domain: GET /api/v1/domain/{domain}/details
  • Host: GET /api/v1/host/{host}
  • OEM history: POST /api/v1/oem/historical-hosts/search
Check returned observation timestamps before treating the data as post-scan evidence. Index updates can lag behind the terminal queue state.

Recovery rules

  • Resume an existing non-terminal scan_id instead of automatically queueing another scan.
  • Set FULLHUNT_FORCE_NEW_SCAN=1 only when intentionally replacing a completed state with a new scan.
  • Treat unknown status values as non-terminal until the timeout expires.
  • Stop retries on 400, 401, 403, and 404 until the request or account configuration changes.
  • Keep state files and API keys out of source control.
  • Reconcile tenant and job tags through OEM audit logs.