Overview

The PhantomYerra SDK lets you build three types of extensions:

Extension TypeWhat It DoesGuide
Custom Scanner Add new vulnerability detection capabilities. Your scanner runs alongside PhantomYerra's built-in engines, receives targets from the orchestrator, and produces findings with evidence. Custom Scanner Guide
Custom Report Template Design custom report layouts, branding, and compliance sections. Use Jinja2 templates with full access to scan data, findings, evidence, and metadata. Custom Report Template Guide
Custom Payloads Add new payload sets for specific vulnerability classes, technologies, or targets. Custom payloads are available in the Intruder and to automated scanners. Custom Payloads Guide

SDK Architecture

Extensions integrate with PhantomYerra through a plugin interface. Every extension is a self-contained Python module that follows a standard contract:

Extension Directory Structure

PhantomYerra/ extensions/ my-custom-scanner/ __init__.py # Plugin entry point scanner.py # Scanner implementation (BaseToolAdapter subclass) payloads/ # Optional: custom payload files templates/ # Optional: custom report templates README.md # Plugin documentation another-plugin/ __init__.py ...

Getting Started

  1. 1

    Create the Extension Directory

    Create a new folder inside extensions/ with a descriptive name (e.g., my-custom-scanner). Add an __init__.py file.

  2. 2

    Implement the Interface

    Subclass BaseToolAdapter for scanners, create a Jinja2 template for reports, or write a payload file for custom payloads. See the individual guides for details.

  3. 3

    Register with PhantomYerra

    Call the appropriate registration function in your __init__.py. PhantomYerra discovers and loads your extension on next startup.

  4. 4

    Test

    Run your extension against a test target. Verify findings appear in the UI, evidence is captured, and reports include your data.

Core SDK Classes

Class / FunctionPurposeModule
BaseToolAdapterBase class for all custom scanners. Subclass this and implement scan().phantomyerra.sdk.base
FindingStandardized vulnerability finding object with severity, evidence, PoC, remediation.phantomyerra.sdk.finding
EvidenceEvidence attachment (request/response, screenshot, file). Automatically SHA-256 hashed.phantomyerra.sdk.evidence
surface_registry.register()Register your scanner for specific attack surfaces.phantomyerra.sdk.registry
emit_activity()Send real-time status updates to the UI during scanning.phantomyerra.sdk.events
PayloadSetContainer for custom payload lists with metadata and processing rules.phantomyerra.sdk.payloads

Best Practices

Need help? Open a support ticket or contact support@phantomyerra.com for SDK assistance. Include your extension code and the error output.