Skip to main content

Overview

The Attack Surface API provides comprehensive reconnaissance and attack surface mapping capabilities for both blackbox and whitebox testing scenarios. Key Features:
  • Automatic mode selection based on input (whitebox vs blackbox)
  • Asset discovery and enumeration
  • Endpoint and page detection
  • Authentication flow mapping
  • Target prioritization for deep testing

runAttackSurfaceAgent

Run the appropriate attack surface agent based on the input configuration. Behavior:
  • If cwd is provided, runs the whitebox agent which analyzes source code directly to map endpoints and pages
  • Otherwise, runs the blackbox agent which probes a live target from the outside
  • target is always required (the live URL to test against)

Parameters

AttackSurfaceAgentInput
required
Configuration for the attack surface agent

Response

AttackSurfaceAnalysisResults | WhiteboxAttackSurfaceResult | null
The full analysis results with discovered assets and key findings
PentestTarget[]
All targets identified for deep penetration testing
string
Absolute path to the attack-surface-results.json file
string
Absolute path to the session’s assets directory

Usage Examples


Blackbox Pentest

Full penetration testing workflow

Targeted Pentest

Test specific targets and objectives

Authentication

Authenticate against a target