# draventis Every documentation page, concatenated. Canonical site: https://docs.magmamoose.com/draventis/ --- # Architecture Source: docs/architecture.md URL: https://docs.magmamoose.com/draventis/architecture/ draventis is a small Python CLI plus a Helm chart. The CLI is the **orchestrator + uploader**; the scanning is done by external binaries (ZAP, Nuclei) that live in the container image. ## Data flow ```text targets.yaml ──► config.load_config ──► Config (model.py) │ for each selected target │ ▼ zap.run_scan ──► zap.sh -autorun ──► /zap/wrk/zap-*.xml ─┐ nuclei.run_scan ──► nuclei ... ──► /zap/wrk/nuclei-*.jsonl ─┤ ▼ defectdojo.reimport ──► POST /api/v2/reimport-scan/ ``` Per-target failures are isolated: one target failing (or one upload failing) does not stop the rest. ## Modules (`src/draventis/`) | Module | Responsibility | Runtime deps | |---|---|---| | [`model.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/model.py) | Typed config dataclasses: `Target`, `AuthProfile`, `DefectDojoConfig`, `Config`, and the `ScanPolicy` / `Schedule` enums. | stdlib only | | [`config.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/config.py) | Load & validate `targets.yaml` (or JSON) into a `Config`; apply defaults; reject dupes/missing fields. | PyYAML (lazy) | | [`zap.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/zap.py) | Pick the AF plan for a policy, export `${DRAVENTIS_*}` env, build & run `zap.sh`, return the report path. | stdlib only | | [`nuclei.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/nuclei.py) | Build & run the `nuclei` command (JSONL output; `-dast` for non-baseline). | stdlib only | | [`defectdojo.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/defectdojo.py) | `reimport-scan` client: build multipart, POST via `urllib`, **failure-isolated**. | stdlib only | | [`__main__.py`](https://github.com/MagmaMoose/draventis/blob/main/src/draventis/__main__.py) | The `draventis run` CLI: parse args, select targets, orchestrate scan + upload. | None | ### Design properties - **The DefectDojo client is stdlib `urllib` and never raises.** `reimport` returns a `ReimportResult(ok=…)`; the orchestrator logs and continues. A flaky DefectDojo never fails a scan. - **Subprocess calls are injectable.** `zap.run_scan` / `nuclei.run_scan` take a `runner` callable (default `subprocess.run`), so command/env construction is unit-tested without invoking the real binaries. `--dry-run` builds everything and executes nothing. - **Secrets never touch config or code paths that log.** Credentials are read from the environment by name (`auth.user_env` etc.); draventis passes the env through to ZAP but does not read or print the values. - **Policy → plan → report** is a single mapping in `zap.py` (`_PLAN_BY_POLICY`), so adding a policy is one table entry + one plan file. ## The CLI ```text draventis run [--all | --target NAME] [--schedule nightly|weekly] [--config PATH] [--plans-dir DIR] [--workdir DIR] [--no-nuclei] [--dry-run] ``` Exit codes: `0` all selected targets attempted OK, `1` at least one scan failed to produce a report, `2` bad arguments, config error, or no targets matched the selection. The CronJobs run `draventis run --schedule `, so each schedule scans only its own targets. ## Automation plans (`automation/`) One ZAP Automation Framework plan per policy. Each ends in a `report` job that writes the traditional XML DefectDojo's `ZAP Scan` parser ingests. The target URL (and, for authenticated plans, the login URL and credentials) is substituted from the environment at plan-load time. The variables exported per scan are: | Variable | Always set? | Value | |---|---|---| | `DRAVENTIS_TARGET_URL` | yes | `target.url` | | `DRAVENTIS_TARGET_SCOPE_REGEX` | yes | `re.escape(url) + ".*"`, used in `includePaths` to avoid wildcard scope-widening | | `DRAVENTIS_OPENAPI_URL` | only when `openapi` is set | `target.openapi` | | `DRAVENTIS_LOGIN_URL` | only when `auth.login_url` is set | `target.auth.login_url` | | `ZAP_USER` / `ZAP_PASS` | passed through from the container env | mounted from the Secret | ## The chart (`charts/draventis/`) Renders `targets.yaml` into a ConfigMap, provisions the secret backend (plain Secret or ExternalSecret), and creates a CronJob per enabled schedule. See [Deployment](deployment.md). The chart-rendered `targets.yaml` is the exact shape `config.load_config` parses. The two are kept in sync. ## Testing `tests/` mirrors the modules: config parsing & validation, the DefectDojo multipart builder + failure isolation, ZAP/Nuclei command construction, and the end-to-end CLI in `--dry-run`. Run `uv run pytest -q`. --- # Configuration Source: docs/configuration.md URL: https://docs.magmamoose.com/draventis/configuration/ There are two layers: 1. **`targets.yaml`**: what draventis itself reads (the scan config). In a cluster the Helm chart renders it into a ConfigMap and mounts it at `/config/targets.yaml`. 2. **Chart `values.yaml`**: how you configure the Helm release; the chart translates the relevant values into `targets.yaml`. ## `targets.yaml` ```yaml defaults: # applied to every target that omits the field policy: baseline schedule: nightly tags: [dast] defectdojo: # the reimport sink (enabled by presence of `url`) url: https://defectdojo.example.com product_type: MyOrg # optional grouping in DefectDojo engagement_prefix: "DAST - " token_env: DEFECTDOJO_TOKEN # env var holding the API token (optional; default shown) auto_create_context: true # DefectDojo creates product/engagement/test close_old_findings: true # fixed alerts auto-mitigate per engagement tags: [dast] nuclei: enabled: true targets: - name: my-site # required; also the default product name url: https://my-site.example.com # required policy: baseline # baseline | full | api schedule: nightly # nightly | weekly product: myorg/site # optional DefectDojo product name openapi: https://…/openapi.json # optional; enables api/openapi scanning tags: [prod] # optional extra DefectDojo tags auth: # optional type: browser-oidc # none | browser-oidc login_url: https://my-site.example.com/login user_env: ZAP_USER # env var holding the username pass_env: ZAP_PASS # env var holding the password ``` ### Fields | Field | Default | Notes | |---|---|---| | `name` | - | **Required.** Unique per config. | | `url` | - | **Required.** The target base URL. | | `policy` | `baseline` | `baseline` (passive), `full` (active), `api` (OpenAPI). | | `schedule` | `nightly` | Which CronJob runs it. | | `product` | `name` | DefectDojo product name. | | `openapi` | - | Spec URL; seeds the `api` (ZAP) scan. | | `tags` | `defaults.tags` | Extra DefectDojo tags. | | `auth.type` | `none` | `browser-oidc` is accepted, but the shipped AF plans don't yet drive it. See the note below. | | `auth.login_url` | - | URL of the login page; exported as `DRAVENTIS_LOGIN_URL` for the ZAP plan. Required when `type` is `browser-oidc`. | | `auth.user_env` / `auth.pass_env` | `ZAP_USER` / `ZAP_PASS` | Env vars the creds are read from. | | `auth.verify_url` | - | Optional URL ZAP polls to confirm the session is still authenticated. | !!! note "Authenticated scanning is not fully wired yet" draventis parses `auth` and exports `DRAVENTIS_LOGIN_URL` / the credential env vars into the scan environment, but the shipped AF plans in `automation/` do not yet contain an `authentication` block, so they scan unauthenticated. To scan behind an OIDC login today, add an `authentication` (browser method) + `verification` block to the plan yourself. See [Design](design.md). ### Secrets are not in this file The DefectDojo token and scan credentials come from the **environment**, never from `targets.yaml` and never from a scanned response: | Env var | Purpose | |---|---| | `DEFECTDOJO_TOKEN` | DefectDojo API token (upload auth). | | `DEFECTDOJO_URL` | Optional; overrides / provides `defectdojo.url`. | | `ZAP_USER` / `ZAP_PASS` | Per the target's `auth.*_env`. | If `defectdojo.url` is set but `DEFECTDOJO_TOKEN` is empty, uploads are skipped (with a warning). Scans still run. ## Chart values → `targets.yaml` The chart builds the `defaults`, `defectdojo`, `nuclei`, and `targets` blocks from these values: | Chart value | `targets.yaml` | |---|---| | `defaults` | `defaults:` | | `defectDojo.url` / `.productType` / `.engagementPrefix` / `.tokenEnv` / `.autoCreateContext` / `.closeOldFindings` / `.tags` | `defectdojo:` | | `nuclei.enabled` | `nuclei.enabled` | | `targets` | `targets:` | Secrets are supplied separately (`secret.*` or `externalSecret.*`) and reach the container as env vars. See [Deployment](deployment.md). The full annotated values file is [`charts/draventis/values.yaml`](https://github.com/MagmaMoose/draventis/blob/main/charts/draventis/values.yaml). ## Scan policies | Policy | ZAP plan | Destructive? | Point it at | |---|---|---|---| | `baseline` | `automation/zap-baseline.yaml` | No (passive) | production or staging | | `full` | `automation/full-active.yaml` | **Yes** (active) | **staging only** | | `api` | `automation/api-scan.yaml` | Yes (active) | staging services with a spec | For `full`/`api` targets, Nuclei (when enabled) also runs with `-dast` fuzzing. Never point an active policy at production. --- # Deployment Source: docs/deployment.md URL: https://docs.magmamoose.com/draventis/deployment/ draventis installs on any Kubernetes cluster with Helm. It has no hard dependency on any particular secret store, ingress, or GitOps tool. ## Quick start ```bash helm install draventis ./charts/draventis \ --namespace security --create-namespace \ --set defectDojo.url=https://defectdojo.example.com \ --set secret.defectDojoToken=$DEFECTDOJO_TOKEN \ --set targets[0].name=my-site \ --set targets[0].url=https://my-site.example.com \ --set targets[0].policy=baseline \ --set targets[0].schedule=nightly ``` For anything beyond one target, use a values file instead of `--set`: ```yaml # my-values.yaml defectDojo: url: https://defectdojo.example.com productType: MyOrg nuclei: enabled: true targets: - name: my-site url: https://my-site.example.com policy: baseline schedule: nightly - name: app-staging url: https://app.staging.example.com product: myorg/app policy: full # active, staging only schedule: weekly schedules: weekly: enabled: true ``` ```bash helm install draventis ./charts/draventis -n security --create-namespace \ -f my-values.yaml \ --set secret.defectDojoToken=$DEFECTDOJO_TOKEN ``` !!! warning "Keep secrets out of your values file" Pass `secret.defectDojoToken` (and any scan credentials) via `--set`, `--set-file`, `helm secrets`, or an ExternalSecret. Never commit them. ## What gets created | Object | Purpose | |---|---| | `CronJob` (one per enabled schedule) | Runs `draventis run --schedule ` | | `ConfigMap` | The rendered `targets.yaml`, mounted at `/config` | | `Secret` *or* `ExternalSecret` | DefectDojo token + scan credentials (`envFrom`) | | `ServiceAccount` | No RBAC, token not mounted; draventis needs no cluster API | ## The image The chart defaults to the published upstream image (`ghcr.io/magmamoose/draventis`, tag = chart `appVersion`). To run your own build, push it and override: ```bash --set image.repository=registry.example.com/draventis --set image.tag=1.2.3 ``` ## Secrets: plain Secret (default) vs External Secrets Operator **Plain Secret (default)**: works on any cluster, no extra operators. The chart creates a `Secret` from `secret.defectDojoToken` and `secret.env`. **External Secrets Operator**: if you run [ESO](https://external-secrets.io/), have it materialise the Secret from your store (Vault, AWS/GCP/Azure/OCI, …): ```yaml externalSecret: enabled: true secretStoreRef: name: cluster-secret-store kind: ClusterSecretStore data: - secretKey: DOJO_TOKEN # maps to DEFECTDOJO_TOKEN env var remoteRef: key: vault/dojo/token - secretKey: SCAN_USER # maps to ZAP_USER env var remoteRef: key: vault/scan/user - secretKey: SCAN_PASS # maps to ZAP_PASS env var remoteRef: key: vault/scan/pass ``` When `externalSecret.enabled=true` the chart emits an `ExternalSecret` (named the same as the plain Secret would be) and does not template the `secret` values, so the CronJob is unchanged. ## Trigger a scan on demand CronJobs only fire on schedule. To run one immediately: ```bash kubectl -n security create job --from=cronjob/draventis-nightly draventis-manual kubectl -n security logs -f job/draventis-manual ``` ## Verify the rendered config ```bash helm template draventis ./charts/draventis -f my-values.yaml \ --show-only templates/configmap.yaml ``` ## GitOps The chart is a plain Helm chart. Reference it from Argo CD, Flux `HelmRelease`, or `helm install` in CI. Nothing in the chart assumes a specific GitOps controller. ## Operational notes - `concurrencyPolicy: Forbid` + `activeDeadlineSeconds` stop a hung scan from piling up or running forever. `startingDeadlineSeconds: 300` (the default) prevents the Kubernetes CronJob controller from locking up when a controller outage causes more than 100 missed starts. - Heavy active scans can be pinned to specific nodes via `nodeSelector` / `tolerations` / `affinity`. - An upload failure never fails the scan. Check CronJob logs for `[draventis] upload failed (non-fatal)`. --- # Design Source: docs/design.md URL: https://docs.magmamoose.com/draventis/design/ Why draventis is shaped the way it is. This is the reasoning behind the code, not a how-to (see [Deployment](deployment.md) and [Configuration](configuration.md) for that). ## Headline decisions - **ZAP is the primary engine, Nuclei the complement.** ZAP (via the Automation Framework) is the deep, stateful, authenticated crawler + active scanner. Nuclei is the fast, low-false-positive templated layer (known CVEs, exposures, misconfig) with optional `-dast` fuzzing. Both are FOSS and, critically, **both have first-class DefectDojo parsers** (`ZAP Scan` XML, `Nuclei Scan` JSON). - **DAST runs as a scheduled CronJob**, not in CI on a PR, because DAST needs a **running target**. Your cluster already runs your apps; scan those. - **Baseline into DefectDojo, not diff-gated.** DAST is non-deterministic and has no merge-base to diff against, so draventis does not try to be a PR gate. It reimports on a schedule and lets DefectDojo compute drift (see below). - **Non-destructive by default.** `baseline` (passive) is safe against production; `full`/`api` (active) must target staging only. ## What DAST adds over static analysis Static analysis reasons about source and artifacts at rest. It never sends an HTTP request to a running instance. | Class | Why static analysis misses it | DAST catches it | |---|---|---| | AuthN/session | Emergent from config + runtime state (cookie flags, fixation, IDOR) | Exercises real auth flows, replays/swaps sessions | | Injection reachable at runtime | SAST flags *potential* sinks; can't prove exploitability through the deployed stack | Actively fuzzes params → confirmed SQLi/XSS with a payload | | Response headers / TLS / cookies | Set by ingress + app *at runtime*, not in the repo | Observes the actual `CSP`, `HSTS`, cookie flags, TLS config | | CORS misconfig | Depends on deployed origin-reflection logic | Sends cross-origin preflights, detects `ACAO: *` + credentials | | SSRF / OOB | Needs an actual outbound request from the running app | OOB interaction (callback server) proves it | | Business-logic / API surface | No spec-awareness | Imports OpenAPI, drives operations, finds undocumented endpoints | | Config drift | Repo ≠ what's actually deployed | Tests the *live* endpoint as an attacker sees it | ## Tool evaluation | Tool | License | Best at | DefectDojo parser | Verdict | |---|---|---|---|---| | **OWASP ZAP** | Apache-2.0 / $0 | Full active scan, auth, OpenAPI/GraphQL/SOAP import, Automation Framework | **`ZAP Scan` (XML)** | **PRIMARY** | | **Nuclei** | MIT / $0 | Fast known-CVE + exposure + misconfig; templated OOB fuzzing (`-dast`) | **`Nuclei Scan` (JSON)** | **COMPLEMENT** | | Wapiti | FOSS / $0 | Lightweight black-box param fuzzing | `Wapiti Scan` | Optional third opinion | | Nikto | FOSS / $0 | Server/CGI misconfig | Generic/CSV only | Low value when a modern ingress fronts everything | | Schemathesis | FOSS / $0 | Property-based API testing from OpenAPI/GraphQL | Generic / JUnit XML | Adopt as a CI test for spec'd services | | StackHawk | Commercial | Developer-DX API DAST in CI (ZAP-derived) | `StackHawk HawkScan` | Redundant when ZAP+Nuclei cover it | | Burp Suite | Commercial | Manual pentest + enterprise DAST | `Burp XML` | Keep as a manual bench tool, not the automation engine | **Why ZAP + Nuclei (not one, not a commercial tool):** breadth (Nuclei) + depth (ZAP), two native DefectDojo parsers, zero license spend. Commercial DAST buys DX you can reproduce with the Automation Framework + your own DefectDojo hub. ### ZAP scan modes The Automation Framework (a single declarative YAML plan) is the standard for every draventis job; it replaced the old `zap-baseline`/`zap-full-scan` shell entry points. draventis ships one plan per policy in [`automation/`](https://github.com/MagmaMoose/draventis/tree/main/automation): | Plan | Jobs | draventis policy | |---|---|---| | `zap-baseline.yaml` | spider + passive | `baseline`: nightly, prod-safe | | `full-active.yaml` | + ajax-spider + active | `full`: weekly, staging only | | `api-scan.yaml` | OpenAPI import → spider → active | `api`: services with a spec | ## DefectDojo ingestion draventis POSTs each report to **`POST /api/v2/reimport-scan/`** (multipart form) with: - `scan_type` = `"ZAP Scan"` / `"Nuclei Scan"` - `product_name` + `engagement_name` + `auto_create_context=true` → DefectDojo auto-creates the product/engagement/test on first run (no pre-provisioning). - `test_title`: a stable dedupe key across runs. - `close_old_findings=true` → fixed alerts auto-mitigate per engagement. - `tags`, optional `product_type_name`. ### Why reimport, not import Reimport compares the incoming report to the existing test and **won't create duplicates**; it reactivates regressions and, with `close_old_findings`, mitigates alerts that disappeared. That yields "what's new / fixed since last scan" *for free* (the drift signal DAST needs), without a merge-base diff. ### Engagement/test modeling ```yaml Product: example/app Engagement: "DAST - app-staging" (auto-created) Test: "ZAP Scan" ← reimport nightly/weekly Test: "Nuclei Scan" ← reimport nightly ``` DefectDojo stays the durable triage system of record: mark false positives / risk-accept there once, and reimport dedupe preserves that state across runs. ## Where DAST runs DAST needs a running target. The default placement is a **scheduled CronJob against already-deployed environments**: the cluster already runs everything, it fits a secrets-from-a-store idiom, and it decouples slow/destructive active scans from PR latency. - **Nightly**: ZAP baseline (passive) on prod-facing + staging hosts, plus Nuclei templated/known-CVE (non-destructive). - **Weekly**: ZAP full active + Nuclei `-dast` fuzzing against **staging only**. An **optional per-PR ephemeral-env scan** (spin the app up in CI, scan, gate) is worth it only when a service ships an OpenAPI spec and you want API-contract DAST on every change, or you already build preview environments. For most repos the scheduled staging scan catches the same classes a day later at a fraction of the cost. ## Authenticated scanning Most apps behind an OIDC proxy need draventis to authenticate. Do both: 1. **Scan behind the proxy** (app-layer bugs): ZAP Browser-Based Authentication drives the real OIDC login in a headless browser and uses a poll-based verification strategy to re-authenticate when the session drops. Give your identity provider a dedicated low-privilege scan user. 2. **Scan the origin directly** (the app's own attack surface): in-cluster, hit the Service directly, bypassing the proxy. This tests the app as if the proxy were removed. That's valuable, since a misconfigured route would strip your only authn layer. **Status:** the config model and credential plumbing exist, but the shipped AF plans don't yet include an `authentication` block. Adding it to a plan is currently a per-target step. **Safety:** targets and credentials come **only** from config you control, never from a scanned response. Active scans hit staging, never production. ## Net-new philosophy: baseline, not diff-gated DAST is baseline-only, deliberately **not** a merge-base diff gate: - **No merge-base to diff against**: DAST runs against a deployed environment, not a PR's changed lines. There is no `git diff` for "this response header regressed." - **DAST is non-deterministic**: crawler coverage, timing, and active-scan payload success vary run to run; a naive "new since last run" gate would flap. - **DefectDojo already gives the safe version of net-new**: reimport dedupe + `close_old_findings` yields reactivated (regressed) and new finding states without a merge-base. Pair that with SLA tracking so new Highs get a clock. The one place a gate belongs is the optional per-PR ephemeral packaging, and even there gate on **ZAP's own new-alert delta** vs a committed baseline, not a SARIF merge-base diff. ## Container & hardening The image builds on the official ZAP image (ZAP + JRE + headless browsers for browser-based auth) plus the Nuclei binary and the `draventis` package. It runs **non-root** with `seccompProfile: RuntimeDefault` and all capabilities dropped; only `/zap/wrk` (an `emptyDir`) is writable. draventis needs **no Kubernetes API access** (it only makes HTTP requests to targets and DefectDojo), so its ServiceAccount has no RBAC and does not mount a token: a deliberately minimal blast radius. ## Rollout (crawl / walk / run) A safe way to adopt draventis incrementally: - **Crawl**: one nightly `baseline` target against a safe host; prove the ZAP reimport pipe lands in DefectDojo with `auto_create_context`. - **Walk**: enable Nuclei; wire browser-based OIDC auth for one staging app; add the weekly full-active CronJob against staging only. - **Run**: expand `targets.yaml` to all apps (passive prod / active staging); add `openapi` + Nuclei `-dast` API scanning and Schemathesis for spec'd services. --- # draventis Source: docs/index.md URL: https://docs.magmamoose.com/draventis/ Scheduled **DAST** (Dynamic Application Security Testing) for Kubernetes: [OWASP ZAP](https://www.zaproxy.org/) (via the ZAP Automation Framework) + [Nuclei](https://github.com/projectdiscovery/nuclei) run on a schedule against your already-deployed targets, with results reimported into [DefectDojo](https://www.defectdojo.org/). Deploy it to any cluster with Helm, point it at your URLs, and it does the rest. ## What it does draventis is an **orchestrator + uploader**. It runs as one or more Kubernetes CronJobs; on each run it reads `targets.yaml`, scans each target with ZAP (and optionally Nuclei), and reimports the reports into DefectDojo. ```text CronJob (nightly / weekly) └─ draventis run --schedule ├─ for each target: ZAP plan (by policy) → report.xml │ Nuclei (optional) → report.jsonl └─ reimport each report → DefectDojo /api/v2/reimport-scan/ ``` ## Why DAST Static analysis reasons about source and artifacts *at rest*. DAST exercises the **running** app: authN/session bugs, injection reachable only at runtime, response-header/TLS/cookie posture, CORS, SSRF, live API surface, and drift between the repo and what's actually deployed. See [Design](design.md). ## Get started | I want to… | Go to | |---|---| | Deploy it to a cluster with Helm | [Deployment](deployment.md) | | Understand `targets.yaml` and chart values | [Configuration](configuration.md) | | Run/develop it locally | [Setup](setup.md) | | Understand the code | [Architecture](architecture.md) | | Understand *why* it's built this way | [Design](design.md) | ## Status The orchestration, config model, DefectDojo uploader, ZAP/Nuclei command building, Helm chart, and container image are implemented and unit-tested. Validate the end-to-end scan path against your own environment before relying on it. Start with a single `baseline` target against a safe host. ## License Apache-2.0. --- # Setup (local development) Source: docs/setup.md URL: https://docs.magmamoose.com/draventis/setup/ ## Prerequisites - Python ≥ 3.11 - [uv](https://docs.astral.sh/uv/) (package + venv manager) - Docker (to build the scanner image) - Helm ≥ 3 (to lint/template the chart) ## Install & test ```bash uv sync # create the venv and install deps + dev tools uv run ruff check . # lint uv run pytest -q # unit tests ``` ## Run the CLI locally The CLI orchestrates scans and uploads. Locally you will not have `zap.sh` / `nuclei` on your `PATH`, so use `--dry-run` to exercise config parsing, plan selection, and the upload plan without running anything. Start from the shipped example (`targets.local.yaml` is gitignored): ```bash cp targets.example.yaml targets.local.yaml # then edit it uv run draventis run --all --config targets.local.yaml --dry-run ``` A minimal config looks like: ```yaml defectdojo: url: https://defectdojo.example.com targets: - name: my-site url: https://my-site.example.com policy: baseline schedule: nightly ``` Selection flags: - `--all`: every target - `--target `: one target - `--schedule `: only targets on that schedule (this is what the CronJobs use) Other useful flags: `--config`, `--plans-dir`, `--workdir`, `--no-nuclei`, `--dry-run`. Run `uv run draventis run --help` for the full list. ## Build the scanner image The real scanning happens inside the container, which bundles ZAP + headless browsers + Nuclei + the CLI: ```bash docker build -t draventis:local . docker run --rm \ -e DEFECTDOJO_TOKEN=$DEFECTDOJO_TOKEN \ -v "$PWD/targets.yaml:/config/targets.yaml:ro" \ draventis:local run --all --config /config/targets.yaml --dry-run ``` Pin the Nuclei release at build time with `--build-arg NUCLEI_VERSION=x.y.z`. ## Documentation site ```bash pip install mkdocs-material # one-time mkdocs serve # live preview at http://127.0.0.1:8000 mkdocs build # render static site to ./site (gitignored) ``` ## Layout ```text src/draventis/ # the CLI + modules (see Architecture) tests/ # unit tests, one file per concern automation/ # ZAP Automation Framework plans (one per policy) charts/draventis/ # the Helm chart docs/ # this documentation Dockerfile # the scanner image ```