Livraison progressive d'artifacts (deb/image/www) par rings draft→internal→
published sur apt.secubox.in (reprepro distributions). Promotion + assignation
de ring par-box pilotées par un centre via grant capability=release (Centres &
Grants), honorées souverainement (issued_by==self_did). Ring published = profil
base auto. Actuateur repo reprepro-copy op-gated + actuateur box 4R fail-safe
(drop-in sources, apt échoué ne brique pas). apt GPG signé bout-en-bout.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
PAC qui dévie les .onion vers le SOCKS Tor local (SOCKS5 = remote DNS, Tor
résout le .onion), tout le reste en DIRECT (le transparent wg-toolbox inspecte
déjà). SOCKS confiné sur 192.168.1.200:9050 (SocksPolicy accept LAN+wg reject *,
jamais open-relay). Servi par nginx en application/x-ns-proxy-autoconfig,
LAN-only. Prérequis signalé : tor est inactive/failed sur le board, le plan doit
le réparer avant de livrer une pièce morte.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
C2: fix IP collision — picobrew's 10.100.0.140 is already used by
secubox-frigate on br-lxc (verified /data/lxc/frigate/config); reassign to
10.100.0.150 everywhere (ctl, unbound drop-in, tests, specs/plans docs).
C3: postinst no longer aborts under set -e when the unit is masked
(unmask before enable, tolerate failure like the start line already does).
C4: drop ReadWritePaths=/sys/bus/w1 from the unit — the path doesn't exist
on the board and phase 1 ships no sensor controller (preserved untouched in
lib/stillwatch/); no other sensor paths were present to remove.
C5: run the API as User=secubox/Group=secubox instead of root, matching the
sudoers grant (secubox -> picobrewctl) and the repo's single-privileged-
surface rule; drop the now-pointless ExecStartPost socket chown/chmod;
NoNewPrivileges=no kept and documented (required for sudo to work). No
shared parent (/run/secubox, /etc/secubox, /var/log/secubox) is touched.
I1: prerm no longer removes the nginx conffile on upgrade (only
remove/purge), so an upgrade keeps the API/panel route alive.
I2: /status, /start, /stop become plain `def` handlers — they call the
synchronous, blocking `_ctl` (subprocess.run, 20s timeout) and must not run
on the async event loop.
I3: add python3-fastapi | python3-pip to Depends (api/main.py imports
fastapi directly).
I4: drop ConditionArchitecture=arm64 and the stale 1-Wire/I2C sensor
comment — phase 1 is a sensor-less LXC appliance, nothing arch-specific.
I5/I6: rewrite debian/control's Description and README.md to describe what
phase 1 actually ships (LXC-hosted picobrew_pico server + DNS rewrite +
panel), moving fermentation/sensor tracking to "later phase, not shipped".
I7: panel now links to the real PicoBrew interface (https://<lxc-ip>/),
shown only while the container is running.
I8: document in the plan's manual verification recipe that LAN -> br-lxc
forwarding (default-DROP nftables) must be checked before the first real
device test, since that test is also the first test of that network path.
Mineurs: panel act()/load() gain try/catch and response.ok checks with
visible error feedback (previously implemented alongside C1, already
committed: argv fix + guard test, _wait_running polling loop replacing the
fixed `sleep 3` in cmd_install, cmd_status validating the pinned SHA before
emitting it, and a comment documenting PICOBREW_SESSION_FILE as test-only).
Revue pré-vol : la config nginx faisait écouter nginx sur :80 tout en
proxifiant vers 127.0.0.1:80, où Flask écoute déjà. nginx se serait parlé à
lui-même. nginx ne prend que le 443 ; les appareils non-Z joignent Flask
directement en :80.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
Plan d'implémentation de la phase 1 de la spec : 9 tâches TDD, 46 étapes.
Le provisionnement réel (debootstrap, root, réseau) n'étant pas testable en
unitaire, les parties décidables sont isolées derrière des entrypoints cachés
testables : __guard (validateur de SHA), __emit-config (config LXC) et
__emit-nginx (terminaison TLS). Le reste est couvert par une recette de
vérification manuelle explicite plutôt que par de faux tests.
Auto-revue : écart trouvé et corrigé — la spec place le TLS série Z en phase 1
alors que le plan le renvoyait hors périmètre ; or la série Z n'accepte que
HTTPS, un appareil Z aurait donc été inutilisable. Tâche 8 ajoutée.
Le contrôleur de capteurs (992 lignes) est déplacé intact dans lib/stillwatch/
plutôt que supprimé : la phase 2 le reprendra sans archéologie git.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
Réaligne le paquet Debian (squelette hôte : 992 lignes de contrôleur de
fermentation à capteurs, aucun LXC) sur l'intention du portage OpenWrt, SANS
jeter l'existant : le contrôleur déménage dans le LXC et devient sbx-stillwatch,
étendu à la distillation.
Décisions : LXC Debian natif (pas Alpine, pas Docker) ; upstream picobrew_pico
(Pico S/C/Pro + Z + Zymatic) plutôt que le fork CyberMind limité au Zymatic ;
clone GitHub latest puis SHA figé, update explicite refusé pendant une session
(un changement upstream en plein brassage est inacceptable) ; drop-in DNS
picobrew.com actif par défaut, le cloud constructeur étant éteint depuis 2020 ;
héberger l'éprouvé (CraftBeerPi 4) et n'écrire que le manquant.
Limite de conception posée : stillwatch surveille et guide la distillation mais
n'actionne pas d'alambic — les coupes têtes/coeur/queues sont matérialisées et
tracées, la décision reste humaine. cuts.py est une fonction pure, testable sans
matériel.
Livraison en 3 phases utilisables seules, avec porte de réévaluation YAGNI sur
CraftBeerPi en phase 3. LXC alloué en 10.100.0.140 (motif appliances 1x0).
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
Neutralisation des pixels traceurs dans les emails entrants, en deux couches :
réécriture à la réception (data: URI 1x1 inline, zéro requête émise) avec
archivage du brut DKIM-intact, plus le filet MITM existant à l'ouverture.
Décisions actées : heuristique conservatrice (invisible OU domaine/chemin
connu), aucune réconciliation des compteurs entre couches, intégrité du
courrier non négociable (toute exception => remise de l'original intact).
Deux trous comblés en auto-revue : emplacement/déploiement du code (LXC mail,
pas l'hôte) et synchronisation hôte->LXC de learned-trackers.txt, sans laquelle
le partage de la liste entre couches était illusoire.
Signale au passage une anomalie hors périmètre : rspamd tourne mais n'est
câblé dans aucun milter Postfix (smtpd_milters vide) => ne filtre rien.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
Reconcile the three pieces the webui→ctl delegation needs to actually work:
NoNewPrivileges=yes on the daemon unit neutralized sudo, and sudoers.d
granted to the wrong user (secubox instead of secubox-meshtastic, the
daemon's actual User=). Verified _ctl_cb's systemd-run argv matches the
sudoers command lines for set-mode/set-grid token-for-token.
Also demote mosquitto from Depends to Recommends (module never installs/
runs it; README already documents opt-in setup) and add sudo to Depends
for the ctl delegation. Minor cleanups: unused `field` import in model.py,
dead gridpolicy re-export in daemon.py, and a malformed broker port
(e.g. host:abc) no longer crashes Bridge.start() at daemon startup.
Deferred: append a note to the multigrid design spec about the
gridpolicy/bridge default broker-port mismatch (8883 vs 1883) and the
nft hostname-resolved-once caveat for future on-grid containment work.
On a 184-module fleet, DEFAULT_LIFECYCLE="eager" made every module with
no manifest opinion idle-sleep-eligible, including core services (admin,
gitea, nextcloud) that never opted into scale-to-zero. Flip the default
to always-on: sleep is now a strict opt-in via lifecycle="eager" or
"on-demand" declared explicitly in the manifest. scan()-derived
manifests already relied on this same default (no code change needed
there), so they inherit the safer behavior too.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
The lite mass-apply test spuriously aborted because the actuator judged a
STOP/START by the command return code, not the observed state (metrics'
90s TimeoutStopSec > _run's 15s timeout -> rc=None -> spurious rollback).
Design: non-blocking commands + wait_state as sole arbiter (LXC via
lxc-info as root), wait_timeout derived per-module from systemd, _run
distinguishes TimeoutExpired from OSError, /apply reverts active on
rolled_back.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
The webui/API runs unprivileged (secubox); operations touching root-owned config
or driving systemd/LXC/apps MUST delegate to the root helper secubox-<module>ctl
via scoped exact-command sudoers (shipped by the package), which acts as root and
audits each change. Documented in MODULE-COMPLIANCE (authoritative), MODULE-GUIDELINES
§7 (CTL), WEBUI-PANEL-GUIDELINES, and wiki/Architecture. Ref: secubox-cvectl fix.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
Fiche les scanners sondant des exploits de produits que la box ne fait PAS
tourner (F5/PAN-OS/Ivanti): 0 faux positif car le produit est absent. Principe:
honeypot=DPI, rendre le bruit pertinent. Vit dans cve-triage (a déjà l'inventaire
dpkg + KEV). Source = sous-ensemble Nuclei vendored (MIT, pas de git-pull
runtime). Sortie = catégorie product_absent_probes en mode DETECT, additive/
idempotente, jamais les 17 catégories existantes, jamais armée (promotion
escalate = humain).
Oracle de présence = DEUX barrières: (1) allowlist de familles d'appliances
qu'une box Debian n'est jamais; (2) absent de dpkg ∪ vhosts routés ∪ modules —
crucial car nextcloud/gitea sont en LXC, absents du dpkg hôte mais routés
(vérifié gk2). Règle de sûreté: dans le doute, PRÉSENT (rater une sonde est
sans conséquence; bannir un vrai user ne l'est pas). S'appuie sur detect
(PR#872) + escalate (PR#873) livrés.
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>