adscan ci
Run a full ADscan assessment unattended — no prompts, safe defaults, one exit code.
adscan ci runs the complete scan pipeline with no prompts. Every question that the interactive shell would ask resolves to a documented default, so the run either finishes or fails — it never sits waiting on stdin.
PRO only
adscan ci requires an ADscan PRO license. The free LITE tier gives you the full interactive adscan start shell on every platform; automation and unattended runs are a PRO capability. See LITE vs PRO.
This is the entry point automation uses. The Enterprise appliance's worker and the ADscan platform both drive scans by shelling out to adscan ci; it is the same engine adscan start runs, with the operator decisions pre-resolved.
Usage
adscan ci {auth|unauth} --policy NAME [--interface IFACE] [options]The launcher forwards everything after ci to the runtime inside the container, so adscan ci --help shows the full argument list from the runtime itself.
Required arguments
| Argument | Values | Notes |
|---|---|---|
mode (positional) | auth, unauth | Authenticated or unauthenticated scan. |
--policy NAME | lab_ctf, audit, production_sensitive or a saved policy | The scan policy the run follows. It decides which checks run, how the scan behaves and, unless you pass a pace, the scan pace. A checks section in --scan-config names the policy instead. See Choosing the policy. |
Then, depending on mode:
authneeds--domain,--dc-ip,--usernameand--password.unauthneeds--hosts(a CIDR or range), or--dc-ipto target a known DC and skip host discovery.
# Unauthenticated, against a known DC
adscan ci unauth --policy audit --interface eth0 --dc-ip 10.0.0.1
# Authenticated
adscan ci auth --policy audit --interface eth0 \
--domain corp.local --dc-ip 10.0.0.1 \
-u alice -p 'S3cr3t!'--password accepts an NT hash as well as a cleartext password.
Optional: the network interface
--interface, -i (for example eth0 or tun0) is optional. Only broadcast poisoning needs a specific interface. Everything else works out the address a target should connect back to for each target (see Callback address).
If you pass no interface and poisoning would run for that scan, ADscan skips poisoning with a warning and the scan continues. It does not fail. The warning tells you to pass --interface <name>, or to run set iface <name> and then poisoning in an interactive session, and that setting poisoning.enabled=false in the scan config or ADSCAN_NO_POISONING=1 silences it.
Whether poisoning runs is decided in this order:
ADSCAN_NO_POISONING=1turns it off, whatever else is set.- An explicit
poisoning.enabledin the scan config. - The scan policy's
poisoningsetting, which defaults to on under a policy for a real environment and off under a lab policy.
So a run under Audit without --interface shows the warning unless you turn poisoning off, and a run under Lab / CTF does not unless you enable it.
Segmented networks: a separate DNS server
On a segmented network the AD-zone DNS server is sometimes a different host from the domain controller. --dns-server IP covers that case: the DNS server resolves the domain zone, hostnames, and SRV records, while --dc-ip stays the authentication and enumeration target.
adscan ci unauth --policy audit --interface eth0 \
--dc-ip 10.0.0.1 --dns-server 10.0.9.53The flag feeds only name resolution, including the Kerberos SPN lookup that keeps a scan on Kerberos instead of degrading to NTLM when a target only has an IP. When you omit it, ADscan resolves against --dc-ip exactly as before.
When a scan starts from a host range instead of a known DC and the controller does not answer DNS on port 53, ADscan detects a separate DNS server on the range on its own, and an unattended run adopts it only when it is the single such host and it actually resolves the domain zone. You do not need to pass --dns-server in that case unless you want to name the resolver explicitly.
Engagement scope
From 15.0.0 a run can be held to an allow list, a deny list or both. Entries are addresses, networks, ranges, host names, SIDs, distinguished names and accounts, on the command line or in a file with one entry per line. Deny always wins.
| Flag | Effect |
|---|---|
--scope-allow VALUE[,VALUE...] | Only these hosts and accounts may be touched. Repeatable. |
--scope-deny VALUE[,VALUE...] | Never touch these. Repeatable. |
--scope-allow-file PATH, --scope-deny-file PATH | Read the entries from a file. Repeatable. |
--scope-dc-access directory or full | Under an allow list, whether domain controllers it does not name serve directory reads only (directory, the default) or are assessed as hosts too (full). |
adscan ci auth --policy audit --domain corp.local --dc-ip 10.0.0.1 -u alice -p 'S3cr3t!' \
--scope-allow 10.0.0.0/24 --scope-deny fs01.corp.local,10.0.0.40 \
--scope-deny-file ./do-not-touch.txtA mistake in a value or a file stops the run with exit code 2 before the container starts, with one line that names the file, the line and the reason. The scope is recorded in the workspace, so a later run on the same workspace applies it without the flags, and new flags replace it as a new revision. A scan configuration can carry the same scope as an asset_scope section.
Excluded hosts receive no traffic and excluded accounts are never acted on. Both stay in the report as not assessed. Engagement scope for hosts and accounts has the entry formats, the domain controller rules and what the report shows.
Scan policy and scan speed
From the next release, a checks section in the scan configuration limits which checks the run may perform, and a pacing section, --pacing and --pacing-set set how hard it works the network.
| Flag | Values | Effect |
|---|---|---|
--pacing | fragile, polite, normal, fast | Scan speed level. Without it, the run uses its policy's own pace (Lab / CTF Fast, Audit Normal, Production-sensitive Polite). |
--pacing-set KNOB=VALUE | one setting per flag, repeatable | Change one pace setting, for example max_parallel_hosts=4. |
--pace-profile NAME | a saved pace profile | Start the pace from a saved pace profile. --pacing and --pacing-set adjust it, and the scan policy still caps it. Not together with a pacing section in the scan configuration. |
The two pace flags beat the pace in the scan configuration, and a scan policy still caps them. If the policy names a check this version does not know, the run stops with exit code 2 before anything runs. See Scan policies and scan speed for the policies, the levels and every setting.
Choosing the policy
Every run names its scan policy. A run without one, or with a name that matches no built-in or saved policy, stops before it touches the network with exit code 2 and lists the policies it could use. List them with adscan policy list and create one with adscan policy create.
| Policy | Behaviour |
|---|---|
audit | The full pass. Every check the policy enables runs, the finding set stays complete, and the exposure report is written automatically at the end of the scan. |
production_sensitive | The same full pass without anything that changes the directory, locks an account or makes another system authenticate to the scanner, at the Polite pace. |
lab_ctf | Stops once the domain is compromised, and adds the lab-oriented steps (flag collection). No report is written unless you ask for one. |
Use audit or production_sensitive for anything you will report on. A lab_ctf run exits early by design, so its finding set is sparse.
--type ctf|audit, which this command used to require, no longer chooses anything. On its own it stops the run and prints the --policy to use instead. Next to --policy it is ignored with a warning. It stops being accepted at the next major release.
The report
An audit run writes the exposure report on its own, HTML and PDF, into the workspace, with no flag. See The exposure report.
--generate-report is the PRO flag. It renders the deliverable through the same pipeline as adscan deliver, with the same options, at the end of the run. One command scans the domain and hands you the branded kit. By default it renders the Security Assessment Report alone; --only widens it to the rest of the kit.
adscan ci auth --policy audit --domain corp.local --dc-ip 10.0.0.1 -u alice -p 'S3cr3t!' \
--generate-report --only report,playbook --frameworks nis2 \
--client "Corp" --branding whitelabel --output ./deliverables| Flag | Default | Effect |
|---|---|---|
--generate-report | off | Render the deliverable after a successful scan. Requires PRO. |
--only LIST | report | Which deliverables to render: report, playbook, coverage-matrix, password-hygiene. deliver renders all of them by default, ci only the report. |
--frameworks LIST | none | ens, nis2, iso27001, dora, pci_dss, cis, comma-separated, or none when the organisation follows none of them. Nothing is selected unless you ask. The scan also maps its findings onto them at scan end, with or without a report. |
--theme NAME | corporate_light | editorial or corporate_light. --report-theme is still accepted as the earlier name. |
--branding POSTURE | cobrand | adscan, cobrand or whitelabel. White-label needs the white-label entitlement; without it the run says so before the scan starts and renders a cobranded kit. |
--client NAME | workspace name | Client name on the cover and in the kit metadata. |
--engagement CODE | none | Engagement code in the kit metadata. |
--client-logo PATH | none | Client logo (PNG, SVG or JPG) on the cover. Saved to config and reused on later runs. |
--client-cover PATH / --client-back PATH | none | HTML fragment, or a folder of per-document fragments, for your own cover and back page. Needs the composition seams entitlement. |
--emit LIST | pdf,html | Add data for report_model.json. Needs the data export entitlement. |
--no-navigator | off | Leave the MITRE ATT&CK Navigator extras out of the kit ZIP. |
`--frameworks` selects nothing by default
An unattended run has no prompt to fall back on. A run for a real environment that renders a report stops before the scan when --frameworks is missing, so name the regimes the client actually needs, or pass --frameworks none when no framework applies to the organisation. With none the report carries no compliance mapping and states that no framework applies, by your decision.
A typo in --only or --emit stops the run before the scan, with exit code 2, so it never surfaces hours later.
--report-format, --report-engine, --report-renderer, --report-template and --display-name from earlier releases are still accepted so existing scripts keep working. Each prints one deprecation line. --display-name sets the same client name as --client; the other four have no effect, because the kit always renders a PDF with Chromium and the premium template.
--client-logo co-brands the cover with the client's logo beside the ADscan mark. It works on the exposure report an audit run writes on its own, as well as on the PRO kit. It takes a PNG, SVG or JPG and is saved for later runs. Keeping the ADscan mark is the free behaviour; removing it for a fully white-labelled report is a paid capability.
Workspace
| Flag | Effect |
|---|---|
--workspace NAME, -w | Name the workspace. Without it the name is ci-<domain>-<YYYYMMDD-HHMM>, for example ci-corp.local-20261105-1430. |
--ephemeral | Delete the workspace this run created when it ends. A failed run keeps only its logs/ folder so you can see why. |
--output DIR | Copy the generated report (PDF and its HTML twin) into this folder on your machine. When --only asks for more than the report, the kit ZIP and every other document are copied too. |
ci keeps its workspace when the run ends, because the workspace and the report in it are what the run produced. The last line of the run prints where both are. The workspace holds the credentials the scan collected, so delete it once the engagement is closed, from the ADscan shell with workspace delete <name>.
With --ephemeral, a report run must say where the report goes, so --ephemeral --generate-report without --output stops before the scan starts. A workspace that existed before the run is never deleted by it.
A kept workspace is what adscan deliver re-renders from, and what adscan execute re-runs a single path against, since both read data a scan already collected.
Running ci again on the same workspace
From 15.0.0 an authenticated ci run resumes a scan that did not finish. If the workspace you name holds an interrupted scan of the same domain, run with the same account and under the same engagement scope, ci picks it up where it stopped and says so before it does anything.
Resuming the interrupted scan of corp.local in this workspace. It stopped during Domain Collection. What it collected is kept, and the hosts and phases it finished are not run again. To start over instead, run ci with a new --workspace.An interrupted scan is one that was stopped with Ctrl+C, stopped from the Enterprise platform, or cut off when its container was killed. What it collected is kept. The hosts already collected are not contacted again and the phases already finished are not run again.
Resume needs the same workspace, so pass --workspace NAME on both runs. Without the flag every run gets a new workspace named after the date and time, and there is nothing to resume.
Everything else starts clean, as ci always did, and each case says what happens to the earlier results.
| Situation | What ci does |
|---|---|
| The workspace holds an interrupted scan of this domain, run with this account under the same engagement scope | Resumes it. |
| The earlier scan in the workspace finished | Starts a fresh scan and says that the earlier results are cleared. |
| The interrupted scan ran with a different account | Starts a fresh scan and says so. |
| The engagement scope changed since the interrupted scan | Starts a fresh scan and says so. The scope record and its history are kept. |
ADSCAN_COLLECTOR_FRESH=1 is set | Starts a fresh scan over the interrupted one and says so. |
An unauthenticated run (ci unauth) | Always starts fresh. |
To force a clean start, use a new --workspace name, or set ADSCAN_COLLECTOR_FRESH=1 to reuse the name.
Stopping a run
Ctrl+C stops ci cleanly. The first press asks the scan to stop, and ADscan prints what happens next.
Stopping the scan cleanly: results so far are kept and the report declares what was not assessed. Press Ctrl+C again to stop immediately.The run finishes the work already in flight, writes its artifacts, records in coverage.json where it stopped and what was not assessed, and exits with code 3. It never exits 0, because a stopped scan is not a completed assessment. No client report is rendered. The data collected so far stays in the workspace, technical_report.json included, marked as incomplete. The same clean stop is what the Enterprise platform's stop button asks for.
A second Ctrl+C, more than a second after the first, ends the process at once, without that record. A press that lands within the same second is treated as the same keystroke, since a terminal often delivers it twice.
A stopped run can be picked up again with the same command and the same --workspace, as described above.
Output and diagnostics
| Flag | Effect |
|---|---|
--show-structural | Show the structural band in the Tactical Findings panel (hidden by default). |
-v, --verbose | Verbose output. |
-d, --debug | Debug output. Floods the console; the workspace debug log is written at DEBUG regardless. |
Artifacts land in the workspace, not the working directory:
~/.adscan/workspaces/<workspace>/
├── technical_report.json
├── adscan_exposure_report_<timestamp>.html
├── adscan_exposure_report_<timestamp>.pdf
├── domains/<domain>/attack_graph.json
└── logs/adscan.debug.logUnder GitHub Actions (GITHUB_ACTIONS=true) the generated report is additionally copied into ./artifacts/ in the working directory, so a workflow can upload it without knowing the workspace path. Nothing is copied there on a normal run.
Exit codes
| Code | Meaning |
|---|---|
0 | The scan completed. |
1 | The scan failed. |
2 | The scan completed but CTF flag validation did not pass, or the run was refused before the scan started. A refused flag value, an unknown policy and an engagement scope that cannot be applied (a mistake in an entry, a scope that excludes the scan's own account or every domain controller) all end here, with nothing sent. |
3 | The assessment is incomplete. Directory collection or attack-path discovery did not complete for the target domain, a stage stopped because the machine ran short of memory, or the scan was stopped with Ctrl+C or from the platform. What was collected is in the workspace and coverage.json declares what was not assessed. No client report is rendered. |
4 | The scan completed and its results are in the workspace, but the deliverable --generate-report asked for did not render. Render it again with adscan deliver --workspace <name> and the same report options, without rescanning. |
42 | Nothing ran: this install is the free LITE tier and ci is PRO. The PRO notice is shown first. The code is deliberately not 0, so a pipeline never reads a scan that did not happen as a success. |
78 | Nothing ran, because the licence refused a new assessment. On PRO from 15.0.0 that usually means this machine has not been activated yet, and the message names the fix (adscan license activate). An expired, revoked or unreadable licence exits the same way. |
Behaviour that differs from an interactive run
- Prompts resolve to defaults. Every confirmation and selector answers itself with the conservative option and logs what it chose.
- Spray selection is deterministic. ADscan walks the priority order (user-as-password, then owned-credential reuse, then blank), skips anything already covered or with no eligible accounts, and stops. It cannot loop.
- Live dashboards collapse to plain lines.
cimarks itself non-interactive, so the Rich live surfaces fall back to inline logging instead of writing alt-screen escapes into a captured log. - The two optional telemetry questions never appear.
Integrating into your own platform
A platform that runs ADscan for its clients drives it exactly this way, with a runner that calls adscan ci and reads the exit code, then ingests the JSON files the run leaves in the workspace. Those files are versioned and each has a published schema. Integrate ADscan into your platform covers the files, the schemas, the versioning promise and real samples to download.
Launcher flags
These are consumed by the launcher on the host rather than forwarded to the scan, and appear in adscan --help:
adscan ci unauth --policy audit --interface eth0 --dc-ip 10.0.0.1 --offline --no-telemetry--no-telemetryturns telemetry off for this run. Telemetry is otherwise on by default,adscan ciincluded.--offlineturns telemetry off too, along with the other optional lookups (online hash lookups, wordlist downloads, AI providers).--offline,--no-telemetry,ADSCAN_TELEMETRY=0andset telemetry off(with or withoutglobal) all turn off telemetry. None of them turns off the PRO licence check or domain registration, which are part of the licence. What PRO sends lists every host and field.
adscan ci never runs the launcher's version check, so it makes no call to PyPI or the image registry. --no-update-check (alias --no-update) is for adscan start and adscan check. --pull-timeout, --scan-config and --allow-low-memory are also launcher-side.
Related
- Scanning commands — what each phase does.
- execute & doctor — run one verb, or check the environment before committing to a scan.
- adscan deliver — render the deliverable kit from a workspace
cikept.