
Fleet-scale CVE-2026-31431 audit and remediation orchestrator for Linux hosts via SSH, with strict host-key verification and multi-format reporting.
Este projeto é um orquestrador em escala de frota para auditar e remediar CVE-2026-31431 em hosts Linux em redes corporativas/internas.
algif_aead)>=3.13uvuv sync
O espelho Tsinghua está configurado em pyproject.toml:
[tool.uv]
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple"
cp fleet.env.example fleet.env
Em seguida, atualize fleet.env com seus hosts e credenciais reais.
uv run python main.py fleet.env
.
├── main.py
├── pyproject.toml
├── uv.lock
├── fleet.env.example
├── reports/
└── src/
├── main.py
├── models.py
├── config.py
├── executor.py
├── collector.py
├── analyzer.py
├── adapters.py
├── remediator.py
├── orchestrator.py
└── reporter.py
fleet.envO formato é CHAVE=VALOR. Linhas vazias e comentários com # são ignorados.
MODE
audit: apenas detecção, sem remediação.fix: detecção e execução do fluxo de remediação.auditAUTO_REBOOT
0 ou 10MODE=fix.SSH_TIMEOUT
12MAX_WORKERS
8REPORT_DIR
./reportsPROGRESS_HEARTBEAT_SECONDS
5DEVICE_MAX_DURATION_SECONDS
1800PROGRESS_LOG_TO_FILE
REPORT_DIR.0 ou 11FLEET_COUNT
1..FLEET_COUNT.DEVICE_n_HOST estiver vazio, esse slot é ignorado.Cada host usa o prefixo DEVICE_{n}_, como DEVICE_1_*, DEVICE_2_*.
DEVICE_n_NAME
device_n.DEVICE_n_HOST
DEVICE_n_PORT
22DEVICE_n_USER
rootDEVICE_n_PASSWORD
DEVICE_n_KEY.fleet.env.DEVICE_n_KEY
./keys/node-1_ed25519DEVICE_n_PASSWORD quanto DEVICE_n_KEY estiverem vazios, a conexão falha rapidamente.DEVICE_n_SUDO_PASSWORD
# =========================
# Global
# =========================
MODE=audit
AUTO_REBOOT=0
SSH_TIMEOUT=12
MAX_WORKERS=8
REPORT_DIR=./reports
PROGRESS_HEARTBEAT_SECONDS=5
DEVICE_MAX_DURATION_SECONDS=1800
PROGRESS_LOG_TO_FILE=1
FLEET_COUNT=3
# =========================
# Dispositivo 1
# =========================
DEVICE_1_NAME=pve-node-1
DEVICE_1_HOST=192.168.1.10
DEVICE_1_PORT=22
DEVICE_1_USER=root
DEVICE_1_PASSWORD=
DEVICE_1_KEY=./keys/pve-node-1_ed25519
DEVICE_1_SUDO_PASSWORD=
# =========================
# Dispositivo 2
# =========================
DEVICE_2_NAME=web-1
DEVICE_2_HOST=192.168.1.20
DEVICE_2_PORT=22
DEVICE_2_USER=admin
DEVICE_2_PASSWORD=sua_senha_ssh
DEVICE_2_KEY=
DEVICE_2_SUDO_PASSWORD=sua_senha_sudo
# =========================
# Dispositivo 3
# =========================
DEVICE_3_NAME=
DEVICE_3_HOST=192.168.1.30
DEVICE_3_PORT=22
DEVICE_3_USER=ops
DEVICE_3_PASSWORD=
DEVICE_3_KEY=./keys/db-1_ed25519
DEVICE_3_SUDO_PASSWORD=
MODE=audit
uv run python main.py fleet.env
Comportamento:
MODE=fix
AUTO_REBOOT=0
uv run python main.py fleet.env
Comportamento:
/etc/modprobe.d/disable-cve-2026-31431-algif-aead.confalgif_aeadAUTO_REBOOTSAFE
algif_aead não está carregado.MITIGATED
NEEDS_PATCH
algif_aead está disponível/carregado e as dicas de patch estão ausentes.UNKNOWN
FAILED
Cada execução gera 3 arquivos em REPORT_DIR:
cve_2026_31431_<timestamp>.jsoncve_2026_31431_<timestamp>.csvcve_2026_31431_<timestamp>.mdprogress_<timestamp>.log (logs de progresso e heartbeat em tempo real)Campos principais:
name, hoststatuskernel, osalgif_loaded, algif_availablepatch_hintfixed, rebootederrorfleet.env ou chaves privadas.audit -> fix -> re-auditoria.ModuleNotFoundError: No module named 'paramiko'
uv sync.Muitos hosts estão FAILED
BadHostKeyException
known_hosts.fleet.env.ssh-keygen -R <host>ssh-keyscan -H <host> >> $env:USERPROFILE\.ssh\known_hostsServer ... not found in known_hosts
known_hosts e execute novamente.Kernel atualizado, mas o status ainda é arriscado