π¦ Marketplace status:
.hpiavailable via Releases. Jenkins Update Center hosting pending.
Darkmoon is open-source β a star really helps us grow.
π Website: dark-moon.org Β· π Docs: docs.dark-moon.org Β· β Star the core: github.com/ASCIT31/Dark-Moon
Install the integrations, right where you work:
| Platform | Get it |
|---|---|
| VS Code | VS Code Marketplace |
| JetBrains | JetBrains Marketplace |
| GitHub Actions | GitHub Marketplace |
| GitLab CI/CD | CI/CD Catalog |
| Jenkins | Download the .hpi |
| Client & CLI | npm: @darkmoon_ai/client |
Captured from a real Jenkins LTS container (e2e/run-e2e.sh) running a
declarative pipeline against the synthetic Demo Shop campaign
(demo-shop.local). Live web UI, not mockups.
Build result β the darkmoonScan step ran, archived the report + SARIF, and
the severity gate (failOn: 'high') failed the build:
Warnings Next Generation issues view β findings published as SARIF, with the severity donut, trend and per-issue details:
- Jenkins 2.479+ (parent POM 5.x, JDK 17+ runtime).
- The
darkmoon-ciCLI on the build agent'sPATH, plus Node.js 18+. Pin a compatible release (npm i -g @darkmoon_ai/client@^0.2) so the plugin talks to a1.x-contract CLI. - Warnings Next Generation (installed as a dependency) to visualize/trend findings.
- Credentials plugin + Plain Credentials plugin (installed as dependencies) for secrets.
node {
darkmoonScan(
target: 'http://juice-shop:3000', // required β URL or host
mode: 'oss', // auto | oss | pro (default auto)
failOn: 'high', // critical|high|medium|low|info|none (build FAILURE)
unstableOn: 'none', // same set (build UNSTABLE) β only if FAILURE gate is not tripped
credentialsId: 'darkmoon-token', // Secret Text credential -> DARKMOON_PRO_TOKEN (Pro)
// Pro:
// apiUrl: 'https://darkmoon.example.com',
// OSS backend (advanced):
// ossDataDir: '/var/darkmoon/data', ossReportsDir: '/var/darkmoon/reports',
recordIssues: true, // write SARIF for warnings-ng (default true)
archiveReport: true, // archive report + SARIF + CLI log (default true)
includeFullReport: false, // also archive the UN-redacted report (default false)
timeout: 1800 // seconds; 0 = CLI default
)
// Publish the SARIF the step produced. enabledForFailure:true is REQUIRED because
// darkmoonScan may already have marked the build FAILURE via its fail policy.
recordIssues(
enabledForFailure: true,
tools: [sarif(pattern: 'darkmoon-reports/darkmoon.sarif')]
)
}darkmoon-ci run --target β¦ --mode β¦ --fail-on <csv> --jsonβ launch + wait for the campaign, read the fail-policy verdict, obtain the campaign id.darkmoon-ci findings <id> --jsonβ the normalized, redaction-safe findings, which the plugin maps to SARIF 2.1.0 (darkmoon-reports/darkmoon.sarif).darkmoon-ci summary <id> --jsonβ authoritative severity counts.darkmoon-ci report <id> --out β¦β the redacted report (and, ifincludeFullReport, the un-redacted one).- Prints a redaction-safe summary to the console, archives the report/SARIF/CLI-log as build artifacts, and applies the fail policy from the severity summary.
Configure a Secret text credential and pass its id as credentialsId (Pro token) and
optionally licenseCredentialsId. The plugin resolves it via the Jenkins Credentials API
and passes it to darkmoon-ci through the environment only
(DARKMOON_PRO_TOKEN / DARKMOON_LICENSE) β never on the command line, never in the
console, never in an archived artifact.
node {
darkmoonScan(
target: 'https://staging.example.com',
mode: 'pro',
apiUrl: 'https://darkmoon.example.com', // Pro REST base URL (https)
credentialsId: 'darkmoon-token', // Secret Text -> DARKMOON_PRO_TOKEN
failOn: 'critical,high'
)
recordIssues(enabledForFailure: true, tools: [sarif(pattern: 'darkmoon-reports/darkmoon.sarif')])
}Pro auth is token-only in the plugin: obtain a JWT out of band and store it as a
Secret Text credential. The interactive username/password + insecure-default
handshake exposed by @darkmoon_ai/client is intentionally not surfaced here (a CI
job should carry a pre-issued token, not a password).
- Redaction-safe by default. Only the redacted surface (titles, categories, CVSS, MITRE, endpoint, description, remediation) reaches the console, the SARIF and the warnings-ng UI. Evidence, raw requests/responses and extracted data are never emitted.
- Full report is opt-in and internal.
includeFullReport: truearchives the un-redacted report; it may contain rehydrated sensitive values, so restrict artifact access. Off by default. - Fail from findings, not exit code. The gate is computed from the normalized severity summary, so it is identical for OSS and Pro.
- One data dir per job (OSS). OSS runs share a data dir; run one container / compose-project per CI job to avoid campaign mis-attribution.
# JDK 17+ (built/tested with JDK 21) and Maven 3.9.6+
mvn -B clean verify # unit + JenkinsRule tests
mvn -B -DskipTests package # produces target/darkmoon-scan.hpiInstall target/darkmoon-scan.hpi via Manage Jenkins β Plugins β Advanced β Deploy
Plugin, or drop it into $JENKINS_HOME/plugins/.
See docs/CLI-CONTRACT.md for the exact darkmoon-ci interface
the plugin depends on, and docs/THREAT-MODEL.md for the security
model. An end-to-end example lives in examples/Jenkinsfile.
MIT β see LICENSE.
βΆ Watch the full Darkmoon + Jenkins tutorial on YouTube β real setup, end to end.
Darkmoon is an open-source, AI-powered penetration testing platform. It runs a full autonomous assessment and this integration brings the results into your Jenkins workflow.
- β Flagship (star it): https://github.com/ASCIT31/Dark-Moon
- π Docs: https://docs.dark-moon.org
- π Website: https://dark-moon.org
- π Related integrations: GitHub Actions Β· GitLab CI/CD


