Group CRUD decides what the scanner sweeps, yet any client that reached the API could change it. Writes now need XEXEU_ADMIN_TOKEN (or a token generated at startup and printed as a ?token= link, like sabia ui), compared in constant time, and a browser Origin must match Host. The dashboard keeps the token for the tab and asks for it on 401. Reads are unchanged. Also track .env.example: '.env*' in .gitignore had kept it out of the repository, although the README tells operators to copy it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
# Xexéu: o scanner varre os alvos autorizados e grava lotes imutáveis;
|
|
# o xexeu ingere os lotes, calcula diffs e serve a API e o dashboard.
|
|
#
|
|
# cp .env.example .env && cp examples/xexeu.toml config/xexeu.toml
|
|
# docker compose pull && docker compose up -d # operadores: imagem publicada
|
|
# docker compose up -d --build # desenvolvedores: build local
|
|
name: xexeu
|
|
|
|
services:
|
|
scanner:
|
|
image: ${XEXEU_IMAGE:-git.lucasrguerra.dev.br/ciberfauna/xexeu}:${XEXEU_VERSION:-latest}
|
|
command: ["scanner", "--config", "/config/xexeu.toml", "--out", "/data/sweeps"]
|
|
network_mode: host
|
|
user: "0:0" # root sem nenhuma capability além de NET_RAW
|
|
cap_drop: [ALL]
|
|
cap_add: [NET_RAW]
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- ./config:/config:ro
|
|
- xexeu-sweeps:/data/sweeps
|
|
restart: unless-stopped
|
|
|
|
xexeu:
|
|
image: ${XEXEU_IMAGE:-git.lucasrguerra.dev.br/ciberfauna/xexeu}:${XEXEU_VERSION:-latest}
|
|
build: .
|
|
command: ["serve", "--bind", "0.0.0.0:8788", "--config", "/config/xexeu.toml",
|
|
"--sweeps", "/data/sweeps", "--data-dir", "/data/xexeu"]
|
|
environment:
|
|
# Empty: a token is generated at each start and printed in `docker compose logs xexeu`.
|
|
XEXEU_ADMIN_TOKEN: ${XEXEU_ADMIN_TOKEN:-}
|
|
ports:
|
|
- "${XEXEU_PUBLISH:-127.0.0.1:8788}:8788"
|
|
volumes:
|
|
- ./config:/config:ro
|
|
- xexeu-sweeps:/data/sweeps:ro
|
|
- xexeu-data:/data/xexeu
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp
|
|
cap_drop: [ALL]
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
xexeu-sweeps:
|
|
xexeu-data:
|