Files
harpia/docs/cli.md
T
Lucas Guerra 2298117c47
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and clippy (push) Failing after 9s
CI / Dependency audit (push) Failing after 11s
CI / Tests (Linux) (push) Successful in 9m25s
Release / ci (push) Failing after 9m26s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
feat(scan): implement raw-socket SYN engine; fix Docker build and cross-container permissions; full v1.0 docs
- scan::syn_scan: raw TCP SYN half-open scanning (CAP_NET_RAW), validated
  end-to-end against a real target through the actual hardened Docker
  Compose stack (scanner uid 0 restricted to NET_RAW, xexeu uid 10001 zero
  capabilities). Automatic fallback to nativo-sem-raw, engine actually used
  recorded in every sweep manifest.
- caps::has_net_raw: CAP_NET_RAW detection via /proc/self/status, shared by
  the scan engine selection and `xexeu doctor`.
- Fix: Dockerfile never copied apps/ or logo.png, so the image never
  actually built until this was caught by a real `docker build`.
- Fix: sweep batches were written 0600 by scanner (uid 0); xexeu (uid 10001)
  couldn't read them through the read-only xexeu-sweeps mount. Now written
  0644/0755 explicitly.
- Fix: group names from the config CRUD API weren't validated as safe path
  components until a sweep tried to write a batch for them; now rejected
  immediately.
- Fix: CSV exports had no CSV/formula-injection guard; cells starting with
  =, +, -, @ or a tab are now prefixed to force plain-text interpretation.
- docs/: full EN/PT-BR set (architecture rewritten to match the real
  implementation — SQLite not DuckDB, include_str!/include_bytes! not
  rust-embed; new cli.md, configuration.md, docker.md, interface.md,
  support.md) with real dashboard/report screenshots.
- README, ROADMAP, CHANGELOG, SECURITY, CONTRIBUTING (EN/PT-BR): updated to
  reflect actual v1.0-candidate state instead of the initial-scaffolding
  status they still described.
2026-11-02 11:08:51 -03:00

4.9 KiB

◂ Back to README

Terminal (CLI)

xexeu is one binary covering both Docker Compose roles (serve and scanner) plus every operator command. Every subcommand accepts -h/ --help.

xexeu serve

Runs the API server, batch ingestion, diff engine and the embedded dashboard/executive report.

Usage: xexeu serve [OPTIONS]

Options:
      --bind <BIND>          [default: 0.0.0.0:8788]
      --config <CONFIG>      [default: config/xexeu.toml]
      --sweeps <SWEEPS>      [default: data/sweeps]
      --data-dir <DATA_DIR>  [default: data/xexeu]

This is the xexeu Compose service's entrypoint.

xexeu scanner

Runs the continuous scheduler and scan engine, writing sweep batches — never exits on its own, same lifecycle as a daemon.

Usage: xexeu scanner [OPTIONS]

Options:
      --config <CONFIG>      [default: config/xexeu.toml]
      --out <OUT>             [default: data/sweeps]
      --data-dir <DATA_DIR>  [default: data/xexeu]

Picks the nativo (raw SYN) engine whenever a profile asks for it and CAP_NET_RAW is actually usable, falling back to nativo-sem-raw automatically otherwise — see architecture.md. This is the scanner Compose service's entrypoint.

xexeu scan --group <name> --once

Runs a single sweep for one group, for diagnostics — writes a batch exactly like scanner would, then exits.

Usage: xexeu scan [OPTIONS]

Options:
      --group <GROUP>
      --once
      --config <CONFIG>      [default: config/xexeu.toml]
      --out <OUT>             [default: data/sweeps]
      --data-dir <DATA_DIR>  [default: data/xexeu]
xexeu scan --group dmz --once --config config/xexeu.toml --out data/sweeps --data-dir data/xexeu

xexeu config check

Validates xexeu.toml and prints, per group, the address count, effective cron and any cadence overlap. Run this after every manual edit.

Usage: xexeu config check [OPTIONS]

Options:
      --config <CONFIG>  [default: config/xexeu.toml]

Exits non-zero on an invalid configuration — safe to use in a pre-push hook or CI step, which is exactly what scripts/verificar.sh does.

xexeu feeds sync / xexeu feeds import

Usage: xexeu feeds <COMMAND>

Commands:
  sync    Download NVD and CISA KEV feeds incrementally
  import  Import feed files copied manually for isolated networks
# Live, one-shot sync (also happens automatically inside `serve` if
# padrao.feeds.sincronizar_automaticamente = true — see configuration.md)
xexeu feeds sync --config config/xexeu.toml --data-dir data/xexeu

# Offline, for air-gapped networks
xexeu feeds import ./nvd-dump --data-dir data/xexeu

xexeu changes --since <duration>

Prints diff events (new/gone host, new/closed port, new/fixed vulnerability) from the local state — the same data /api/changes serves.

xexeu changes --since 24h --data-dir data/xexeu

xexeu export --format json|csv

Exports the current deduplicated state (hosts, ports, findings) — shares its formatting logic with the /api/export/*.csv and /api/hosts endpoints, so a terminal export and a dashboard download never drift apart.

Usage: xexeu export [OPTIONS]

Options:
      --format <FORMAT>      [default: json]
      --data-dir <DATA_DIR>  [default: data/xexeu]
      --out <OUT>
xexeu export --format csv --data-dir data/xexeu --out hosts.csv
xexeu export --format json --data-dir data/xexeu   # prints to stdout

xexeu doctor [--json]

Diagnoses the runtime environment — run this first when something looks wrong, and always before reporting an issue (see support.md).

Usage: xexeu doctor [OPTIONS]

Options:
      --json
      --config <CONFIG>      [default: config/xexeu.toml]
      --data-dir <DATA_DIR>  [default: data/xexeu]
$ xexeu doctor
Xexéu v0.1.0 - Diagnóstico do Ambiente
================================================================================
Item            Status          Detalhe
--------------------------------------------------------------------------------
versao          ok              xexeu v0.1.0
config          ok              configuração válida (4 grupo(s))
net_raw         ok              CAP_NET_RAW disponível (motor nativo ativo)
sqlite          ok              banco SQLite acessível em data/xexeu/xexeu.db
vuln_db         ok              135 CVE(s) carregados (12h atrás)
feeds_sync      ok              sincronizado há 12h (dentro do intervalo configurado)
--------------------------------------------------------------------------------
Resultado: OK

Exits 1 if any critical item (config, a missing database it needs to write to) failed; a missing/stale vulnerability database or absent CAP_NET_RAW are reported but don't fail the exit code — both have a documented degraded path (see architecture.md). --json is meant for scripted health checks and monitoring, not for humans at a terminal.