Commit Graph

334 Commits

Author SHA1 Message Date
CyberMind
c6f2742d96
Merge #919: secubox-torrent v2.0 WebTorrent streaming (Closes #917)
Some checks are pending
License Headers / check (push) Waiting to run
secubox-torrent v2.0 — WebTorrent streaming pivot (Closes #917)
2026-07-28 16:46:44 +02:00
98a03aa7eb docs(torrent): implementation plan v2.0 WebTorrent (8 tasks, ref #917)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-28 14:23:46 +02:00
ded619a55f docs(torrent): WebTorrent streaming pivot design spec (ref #917)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-28 13:51:41 +02:00
c8e8c11009 docs(antirootkit): implementation plan — 11 TDD tasks, anti-escape MVP first (ref #915)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-28 08:08:26 +02:00
fad959c31d docs(antirootkit): add Process Network Sentinel — auto-block egress of non-dpkg procs (anti-escape, priority v1) (ref #915)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-28 08:03:30 +02:00
e420b67fe1 docs(antirootkit): design spec — host-IDS process-scanner (auditd) + integrity wrap + alert-only (ref #915)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-28 07:56:58 +02:00
7807772e94 docs(fleet-metrics): implementation plan (5 tasks) (ref fleet-metrics)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 07:59:14 +02:00
526da7bea4 docs(fleet-metrics): transport=dedicated last-wins store + :8799 mesh pull (journal is immutable-chained, can't hold periodic snapshots)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 07:55:49 +02:00
f82078806b docs(fleet-metrics): design — centralized+meshed node snapshots (trilogy 3/3)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 07:50:30 +02:00
517e5f67fc docs(p2p-ephemeral): implementation plan (4 tasks) (ref p2p-ephemeral)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 06:22:30 +02:00
4041b65b62 docs(p2p-ephemeral): design — ephemeral-peer CLI + escalation foundation
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 06:11:38 +02:00
f8359f15f2 Merge branch 'feat/assist-dual'
# Conflicts:
#	packages/secubox-annuaire/annuaire/model.py
#	packages/secubox-annuaire/annuaire/verbs.py
#	packages/secubox-annuaire/debian/changelog
2026-07-26 10:23:21 +02:00
756ec56862 docs(release-rings): implementation plan (9 tasks) (ref release-rings)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-26 08:51:22 +02:00
56e592def2 Merge remote-tracking branch 'origin/master' into feat/release-rings 2026-07-26 07:07:12 +02:00
cc2b32191c docs(assist): implementation plan — OFFER/REQUEST dual + multi-layer join link (11 tâches TDD)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 16:26:39 +02:00
ad798a8f70 Merge remote-tracking branch 'origin/master' into feat/assist-dual 2026-07-25 16:21:24 +02:00
CyberMind
6b8d652a09
Merge pull request #906 from CyberMind-FR/feat/assist-request
Some checks are pending
License Headers / check (push) Waiting to run
feat(assist): support/assistance request — live consent-gated help sessions (sous-projet 2/3)
2026-07-25 16:18:47 +02:00
851a18fa8b docs(release): design spec — center-driven progressive release rings
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>
2026-07-25 16:16:56 +02:00
750bfde37d docs(assist): design spec — OFFER/REQUEST dual rendezvous + multi-layer join link
Marketplace d'assistance: OFFER/REQUEST avec tags libres+scope, matcher
décentralisé (pur, par-nœud depuis le journal mesh-syncé), rendezvous mutuel
double-accept → SESSION_OPEN existant. Portée totale via join-link multi-couches
auto-escaladant (URL/IP public → identité mesh éphémère → WireGuard éphémère
10.11.0.0/24 → session WS). Data-plane WG-only préservé (URL = bootstrap seul).
Réutilise le socle assist (consentement, catalogue borné, console, audit, token).

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 16:09:39 +02:00
CyberMind
f789e2e010 docs: add public SecuBox landing page (ref #904) 2026-07-25 12:51:24 +02:00
1dfeeb052b docs(assist): implementation plan — support/assistance request 14 tâches TDD (ref sous-projet 2)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 12:22:44 +02:00
7fbc0cdaeb docs(assist): design spec — support/assistance request (sous-projet 2/3)
Session assistée temps réel via control-plane (journal annuaire, ops ASSIST_*
signées + mesh_sync) + data-plane (daemon secubox-assist, WebSocket par-session
bind wg-mesh only). Catalogue borné → ctl scopés + audit ; escalade console sur
double-consentement (pty non-root). Initiation bi-mode (per-incident pull /
standing grant). Invariants CSPN : consentement explicite, mesh-only, token
hashé, audit append-only, expiry fail-closed, session unique. Roadmap à prévoir :
transfert fichiers, partage écran, multi-centres, replay.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 12:12:11 +02:00
98b1c2e3f7 docs(annuaire): plan d'implémentation Centres & Grants + Remote Config (10 tâches, grounded)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 09:13:58 +02:00
513bcff12c docs(annuaire): design Centres & Grants + Remote Config (socle auto-centre/multi-centres)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-25 09:10:00 +02:00
50712b9e29 Merge remote-tracking branch 'origin/master' into feat/rlevel-per-peer
# Conflicts:
#	.superpowers/sdd/task-7-report.md
#	.superpowers/sdd/task-8-report.md
2026-07-25 07:41:57 +02:00
f38d388d1c docs(toolbox): plan d'implémentation R-level par peer (8 tâches, grounded sbxmitm)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-24 14:58:56 +02:00
328e102307 docs(toolbox): design R-level MITM par peer wg-toolbox (4 modes, self-service borné + override admin)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-24 14:52:25 +02:00
2eb3890d53 docs(proxypac): plan d'implémentation WPAD/DHCP autodetect + transparent .onion (8 tâches)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-24 09:40:56 +02:00
8204490dea docs(proxypac): design WPAD/DHCP autodetect + transparent .onion (wg-toolbox+LAN)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-24 09:33:30 +02:00
750a7b7c69 docs(plan): PAC .onion -> Tor (secubox-tor) — 4 tâches TDD + recette manuelle
Some checks are pending
License Headers / check (push) Waiting to run
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-24 08:42:08 +02:00
4e1d3b5d6d docs(spec): PAC auto-routing .onion → Tor (secubox-tor)
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>
2026-07-24 08:38:12 +02:00
29989e16d5 fix(picobrew): final branch-review fixes (C2-C5, I1-I8, mineurs)
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).
2026-07-23 19:23:50 +02:00
a70ca89fa0 fix(plan): tâche 8 — nginx ne doit pas écouter sur :80 (boucle sur lui-même)
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>
2026-07-23 18:06:14 +02:00
89025c9313 docs(plan): secubox-picobrew phase 1 — LXC + picobrew_pico + DNS + TLS + panel
Some checks are pending
License Headers / check (push) Waiting to run
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>
2026-07-23 18:03:47 +02:00
58166f02d0 docs(spec): secubox-picobrew — suite brassage/fermentation/distillation en LXC
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>
2026-07-23 16:55:11 +02:00
fc8e0f9dc2 docs(spec): détection des pixels de suivi (web + email) — design validé
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>
2026-07-23 13:14:11 +02:00
dc145db9c3 fix(meshtastic): final review — panel webui→ctl wiring (NNP+sudoers user) + mosquitto Recommends + minors (ref #897)
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.
2026-07-22 09:02:55 +02:00
4cf0178887 docs(meshtastic): implementation plan — 13 tasks, mock-driven (ref #897)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-22 06:19:00 +02:00
4b986f5c23 docs(meshtastic): spec — multi-grid LoRa node + passive listener (ref #897)
secubox-meshtastic: USB Meshtastic node, native-host daemon, three composable
grids (off-grid RF / private shared-grid over MirrorNet / opt-in public MQTT,
host-side bridged) + optional passive CLIENT_MUTE listener feeding the SOC.
Hardware procurement in #897.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-22 05:19:48 +02:00
356f8293a8 fix(profiles): default lifecycle is always-on, not eager (ref #896)
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>
2026-07-20 18:11:24 +02:00
9d4da5bf67 docs(scale-to-zero): pivot to sbxwaf-side wake trigger (supersede nginx @waker); +waf-sync +sbxwaf Go tasks (ref #896)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-20 13:05:45 +02:00
afc549ba14 docs(profiles): implementation plan — scale-to-zero public services (12 tasks, ref #896)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-20 11:43:27 +02:00
a2998c1a23 docs(profiles): spec — scale-to-zero for public services (sleep/wake + lifecycle policy)
Design brainstormed 2026-07-20: sleep=STOP(free RAM)+splash-on-wake; per-module
lifecycle (always-on|eager|on-demand|manual) + wake_class; secubox-waker
activator (nginx->waker->wakectl+splash+lock); secubox-sleeper hybrid idle
(front last-request+conns + optional module /idle hint); reuses the 0.7.0
observed-state actuator. Single spec covering wake-on-access + auto-sleep.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-20 11:43:27 +02:00
649a544669 docs(profiles): implementation plan — actuation robustness, 7 tasks (ref #893)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-20 03:59:49 +02:00
be901fa7b3 docs(profiles): spec — actuation robustness, observed-state arbiter (ref #893)
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>
2026-07-20 03:47:58 +02:00
26e3d9ab7f docs(plan): profiles API/panel apply+rollback (webui→ctl) — 4 tasks
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:25:56 +02:00
95eaf2e4a5 docs(profiles): spec — API/panel apply+rollback via webui→ctl (NNP=false + sudoers)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:24:13 +02:00
968c3325b9 docs: Phase 2 (Wants=secubox-core) — WIP + HISTORY + module guideline rationale
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 09:10:08 +02:00
201f879159 docs(plan): profiles Phase 3a apply actuator — 4 tasks TDD
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 07:24:36 +02:00
48649fa413 docs(profiles): spec Phase 3a — apply actuator (validated on lyrion)
Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-19 07:16:17 +02:00