Files
harpia/docs/pt-BR/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

5.2 KiB

◂ Voltar ao README

Terminal (CLI)

O xexeu é um único binário cobrindo os dois papéis do Docker Compose (serve e scanner) mais todo comando de operador. Todo subcomando aceita -h/--help.

xexeu serve

Roda o servidor de API, a ingestão de lotes, o motor de diff e o dashboard/relatório executivo embutidos.

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]

Esse é o entrypoint do serviço xexeu do Compose.

xexeu scanner

Roda o agendador e o motor de varredura contínuos, gravando lotes — nunca sai sozinho, mesmo ciclo de vida de um daemon.

Usage: xexeu scanner [OPTIONS]

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

Escolhe o motor nativo (SYN cru) sempre que um perfil pede e o CAP_NET_RAW está realmente utilizável, recorrendo automaticamente ao nativo-sem-raw caso contrário — veja arquitetura.md. Esse é o entrypoint do serviço scanner do Compose.

xexeu scan --group <nome> --once

Roda uma única varredura de um grupo, pra diagnóstico — grava um lote exatamente como o scanner faria, e sai.

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

Valida o xexeu.toml e imprime, por grupo, a contagem de endereços, o cron efetivo e qualquer sobreposição de cadência. Rode isso depois de toda edição manual.

Usage: xexeu config check [OPTIONS]

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

Sai com código não-zero numa configuração inválida — seguro de usar num hook de pre-push ou passo de CI, que é exatamente o que scripts/verificar.sh faz.

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
# Sync ao vivo, único (também acontece automaticamente dentro do `serve`
# se padrao.feeds.sincronizar_automaticamente = true — veja configuracao.md)
xexeu feeds sync --config config/xexeu.toml --data-dir data/xexeu

# Offline, pra redes isoladas
xexeu feeds import ./dump-nvd --data-dir data/xexeu

xexeu changes --since <duração>

Imprime eventos de diff (host novo/sumido, porta nova/fechada, vulnerabilidade nova/corrigida) do estado local — os mesmos dados que /api/changes serve.

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

xexeu export --format json|csv

Exporta o estado atual deduplicado (hosts, portas, achados) — compartilha a lógica de formatação com os endpoints /api/export/*.csv e /api/hosts, então uma exportação no terminal e um download pelo dashboard nunca desalinham.

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   # imprime no stdout

xexeu doctor [--json]

Diagnostica o ambiente de execução — rode isso primeiro quando algo parecer errado, e sempre antes de reportar uma issue (veja suporte.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

Sai com 1 se algum item crítico (config, um banco ausente que ele precisa escrever) falhou; uma base de vulnerabilidades ausente/velha ou CAP_NET_RAW ausente são reportados mas não falham o código de saída — os dois têm um caminho degradado documentado (veja arquitetura.md). O --json é pensado pra checagens de saúde automatizadas e monitoramento, não pra humano no terminal.