Skip to content

Plugin manifest ​

Every plugin has a phantom-plugin.json at the top of its package. Phantom reads it before anything else and refuses the package if any field is wrong, with the reason.

json
{
  "sdk": 1,
  "id": "findings-csv",
  "name": "Findings CSV",
  "version": "1.0.0",
  "description": "Exports the findings of a report as a CSV table.",
  "author": "Your name",
  "license": "MIT",
  "homepage": "https://example.com/findings-csv",
  "entry": "plugin.py",
  "permissions": ["reports.read"],
  "contributes": {
    "report_formats": [
      {"id": "csv", "label": "Findings (CSV)", "handler": "export_csv", "extension": "csv", "media_type": "text/csv"}
    ]
  }
}

Fields ​

FieldRequiredRule
sdkyes1, the SDK this Phantom runs
idyeslowercase letters, digits and single hyphens; identifies the plugin across versions
nameyesup to 80 characters
versionyesMAJOR.MINOR.PATCH
description, author, licensenoshown in Settings › Plugins
homepagenoan https:// address
entrynothe Python file with the handlers, at the top of the package; plugin.py by default
permissionsyeswhat the contributions need (below)
contributesyesat least one contribution

Unknown fields are refused, so a misspelt field never silently does nothing.

Permissions ​

PermissionNeeded byMeans
reports.readreport_formatsreads reports you export with it, masked by your export policy
flows.importimportersturns files you import with it into HTTP history
bodies.readrenderersreads message bodies you open with it, masked unless you reveal them
findings.sendservice_adaptersprepares tickets you send with it to a service you configure; Phantom adds your credential and sends them

A contribution without its permission is refused, and so is a permission no contribution uses. The user grants all of a plugin's permissions at once, or the plugin does not run.

Contributions ​

Every contribution has an id (unique within its kind), a label shown in the interface, and a handler: the name of a public function in the entry file.

report_formats also have extension (without the dot) and media_type. HTML and SVG are not allowed, because a downloaded file must never run script in the browser.

importers have extensions: the file extensions the file picker offers, such as ["xml"].

renderers have media_types: exact types such as application/json, or families such as text/*.

service_adapters have a second handler, parse, and auth: how Phantom adds the user's credential to the request (bearer, token, basic with the tracker's account, or header with the header named in auth_header, such as X-Api-Key).

Package rules ​

  • A zip of at most 5 MiB that unpacks to at most 20 MiB and 200 files.
  • Python, text and data files only (.py, .json, .md, .txt, .csv, .xml, .yaml, .toml, .cfg, and LICENSE, NOTICE, README).
  • No paths that leave the package, no links, no hidden files.
  • Compiled Python (__pycache__, .pyc) is skipped, so only the source runs.