Blog··7 min read

DarkMoon in n8n: an autonomous pentest node for your SOAR workflows

A community n8n node and trigger for DarkMoon: launch campaigns, read findings and evidence metadata, get retest verdicts and posture timeseries, register signed webhooks, and open a remediation PR through an opaque credential reference that never carries a secret and never auto-merges.

Watch the tutorial · Darkmoon + n8n: Automate AI Pentesting in Your Workflows

SOAR is glue, and n8n is one of the most popular ways to write it. The DarkMoon community node lets a workflow launch an autonomous pentest, react to what it finds, and route the result wherever your team already lives: a ticket, a Slack channel, a DefectDojo import, a scheduled digest.

Two nodes

  • DarkMoon, an action node for the operations you call on demand.
  • DarkMoon Trigger, a source node that starts a workflow when something happens.

Both authenticate through a single DarkmoonApi credential.

What the action node does

The action node is organised as resources and operations:

  • Campaign: launch, get, list, get severity summary.
  • Finding: get, list, get evidence metadata (counts only, never evidence bodies).
  • Retest: launch, get verdicts (fixed, still present, regressed, new).
  • Metric: get timeseries for severity, status, category and campaign posture.
  • Webhook: register, list and delete signed webhooks.

Launch options include multiple targets, exclusions and focus, a severity cap, and a remediation opt-in that opens a fix pull request for human review. The remediation option uses an opaque credentialRef, a vault reference, so no repository secret ever passes through the workflow, and it never auto-merges.

DarkMoon Pro findings list for a demo campaign against DVGA, an intentionally vulnerable GraphQL app, on synthetic demo data: 68 vulnerabilities with severity and proof filters (exploited, confirmed, unconfirmed), and rows such as remote code execution and SQL injection, each with a CVSS bar, an Exploited status, its treatment-plan action and a link to the attack path it sits on.
The findings the node's Finding operations read, as the DarkMoon Pro web app lists them with severity and proof status. Synthetic demo data (demo.dark-moon.org) on the DVGA demo lab.Captured 22 November 2026 from demo.dark-moon.org.

What the trigger does

The trigger runs in Poll mode (recommended, no inbound exposure) or Webhook mode. It emits campaign.started, campaign.completed, campaign.stopped, campaign.aborted, finding.discovered, finding.confirmed, finding.exploited, finding.remediated, pr.opened and pr.updated. In poll mode it diffs campaigns, findings and pull requests between runs, so you get exactly the new events.

Templates to start from

The node ships four ready-made workflows:

  • Export findings to DefectDojo.
  • Alert Slack on an exploited finding.
  • Auto-retest when a remediation PR is merged.
  • A scheduled posture digest.

Redaction-safe

The node surfaces safe metadata only. Evidence is exposed as counts, never as bodies, and secrets never touch the workflow. It is published on npm as n8n-nodes-darkmoon, MIT licensed.
DarkMoon Pro finding detail on synthetic demo data: an exploited, critical SQL injection in the pastes(filter) parameter of the DVGA demo lab (CVSS 9.8), with the asset tree on the left, the description and the evidence the testing agent recorded in the centre, and a details rail with identifier, CVSS vector, endpoint, agent and first and last seen times.
Evidence bodies stay in DarkMoon: the finding detail in the Pro web app, with the evidence the testing agent recorded, while the node exposes only counts. Synthetic demo data (demo.dark-moon.org) on the DVGA demo lab.Captured 22 November 2026 from demo.dark-moon.org.

See the integrations catalog for how the n8n node pairs with the CI actions and the SecOps dashboards.

Next
Run it against your own lab

Darkmoon is open source (AGPL-3.0) and self hosted. Clone it, point it at a target you own, and read every line.