Commit Graph

25 Commits

Author SHA1 Message Date
0ebce730d6 fix(openclaw): certSpotter fallback for CT lookup + whois registrable domain
crt.sh is frequently down (502/404 HTML) and its raw error leaked into scan
results. Now queries certSpotter first (reliable JSON), falls back to crt.sh,
then a clean message. whois now resolves the registrable domain for sub-domains.

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-16 10:12:32 +02:00
238637e09a release(webui): bump 127 arch:all packages for hybrid-dark reskin bake-in 2026-07-10 09:07:42 +02:00
3197f866e4 feat(webui): fleet reskin — apply hybrid-dark cyan overlay to all 116 crt-light panels
Add /shared/hybrid-dark.css: a shared overlay that remaps the design tokens
(consumed by crt-light.css, sidebar-light.css and every module's inline styles)
to the cyan hybrid-dark palette from /certs/ + /wireguard/. body.hybrid-dark
(specificity 0,1,1) beats :root and inline :root, so one token remap flips the
whole tree — no per-panel rewrite. Each panel gains the overlay <link> + the
hybrid-dark body class (2-line additive swap; crt-light.css kept as base).
See .claude/WEBUI-PANEL-GUIDELINES.md.

Panels with fully bespoke styles (certs/wireguard/users/nac already hybrid;
~14 non-crt-light custom panels) are untouched.
2026-07-10 08:40:10 +02:00
bf22964ee1 feat(openclaw): wire + XSS-harden the scanner dashboard 2026-07-09 06:56:56 +02:00
2fe92754ea fix(openclaw): dh_installsystemd --no-enable --no-start (aggregator serves in-process) 2026-07-09 06:41:43 +02:00
cc61eb9c42 feat(openclaw): packaging — sudoers+visudo, install openclawctl+toml, deps debootstrap/lxc/jq 2026-07-09 06:35:11 +02:00
f4468484f1 fix(openclaw): gate+audit ports quick-lookup; per-request scan-id (no shared-file race) 2026-07-09 06:30:47 +02:00
ad5fc2c638 feat(openclaw): async-job scan endpoints + target policy/audit + sync lookups; drop async machinery 2026-07-09 06:23:39 +02:00
3dee901d92 fix(openclaw): remove disconnected legacy POST /config + unused imports 2026-07-09 06:21:10 +02:00
5e81a25e12 feat(openclaw): API core — ctl routing, def+cached status, target classification 2026-07-09 06:13:53 +02:00
6b0151f788 fix(openclaw): close email-arm flag-injection (re-validate post-@ domain) 2026-07-09 06:03:36 +02:00
87a345a530 fix(openclaw): reject leading-dash targets (flag-injection) + failure-record schema 2026-07-09 05:56:57 +02:00
d57b5decf8 feat(openclaw): openclawctl scan — run tools in-container, write host-side result JSON 2026-07-09 05:47:52 +02:00
1220e59147 feat(openclaw): openclawctl install (debootstrap sandbox + nmap/dig/whois/curl toolchain) 2026-07-09 05:42:46 +02:00
81bc034895 feat(openclaw): openclawctl control-plane core (guards, status --json, start/stop, selftest) 2026-07-09 05:20:44 +02:00
CyberMind
82b0522c5b
Aggregator résilience: sweep async (243 handlers) + threadpool 80 (#738) (#739)
* perf(aggregator): async-sweep — 243 blocking route handlers async def→def (#738)

Mounted in the aggregator's single event loop, an 'async def' route handler
that runs blocking code (subprocess/journalctl/openssl/argon2) freezes the
WHOLE loop -> aggregator.sock Connection refused -> 502 board-wide.

Deterministic AST codemod (scripts/async-sweep.py) converts route handlers
that (a) are decorated with an HTTP verb, (b) contain a known blocking call,
(c) have NO await/async-with/async-for/yield, (d) are never used as a
coroutine elsewhere -> plain 'def'. Starlette then runs them in the AnyIO
threadpool, so the blocking call no longer stalls the gateway. await/stream/
websocket handlers are left untouched. Every file py_compile-checked.

243 handlers across 56 modules (system 17, qos 13, netdiag/hexo 12, hub 11...).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* perf(aggregator): raise AnyIO threadpool to 80 tokens (#738)

The async-sweep moves ~243 blocking handlers to the threadpool. With ~110
modules in one process, the default 40-token pool can queue head-of-line under
concurrent blocking load. Raise to 80 on startup (best-effort, never breaks
boot).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* perf(hub): double-buffer status cache + emojized health page (#738)

Navbar status (menu + health-batch) is now a strict double-buffer cache:
- request handlers NEVER compute on the request path — they return the current
  snapshot instantly (or a 'warming' placeholder), so the sidebar's polling can
  no longer serialize behind a ~3s systemctl walk and starve the loop;
- the background refresher is kicked from the request path (_ensure_bg) because
  mounted sub-apps receive neither startup nor @app.middleware events under the
  aggregator — the previous lazy-start middleware never fired there;
- snapshots are built complete then swapped atomically, so the dashboard never
  shows partial/bad counts.

Served by the dedicated secubox-hub process (:8001, isolated loop) the navbar
stays <50ms and holds 200 under 25+ concurrent polls where the aggregator-
mounted copy wedged (000). health.js: 🟢🟡🔴 emoji status indicators.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* style(hub): render health status emoji cleanly (neutralize .led dot) (#738)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* perf(sidebar): kill per-module health storm, use batch endpoint (#738)

The navbar refreshed LEDs by firing ONE /api/v1/<module>/health request per
module — ~119 requests every 30s, in batches of 8 — straight at the aggregator's
single shared event loop. Combined with the in-process module mount this is a
prime driver of the recurring board-wide 502 wedge (user-identified).

checkAllHealth + refreshStaleHealth now call /api/v1/hub/public/health-batch
ONCE (served by the dedicated, double-buffered hub process) and populate every
module's LED from that single response. 119 reqs/cycle -> 1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 08:06:15 +02:00
c01f10c474 docs(wiki): refonte 126 modules — snapshots WebUI déterministes + READMEs 4 langues (ref #742)
Capture des 126 dashboards authentifiés (JWT minté serveur, injection localStorage)
avec attente de COMPLÉTION d'affichage déterministe (sentinelles de chargement
purgées + réseau calmé, plafond --delay) au lieu d'un sleep fixe. 126/126 OK.

- capture-screenshots.py: _wait_content_ready déterministe, mode --token (bypass
  login), goto domcontentloaded (plus de stall networkidle sur dashboards live)
- generate-docs.py: 23 modules jusqu'ici non documentés ajoutés (descriptions
  réelles depuis debian/control, EN/FR/DE/ZH), licence MIT→LicenseRef-CMSD-1.0,
  images wiki en URL raw.githubusercontent absolue (relatif = 404 sur GitHub wiki)
- 126 snapshots + thumbnails régénérés
- 126 READMEs paquet succincts + pages wiki MODULES/CATEGORIES ×4 langues

Gap modules documentés vs découverts: 23 → 0.
2026-06-26 10:14:14 +02:00
3433df5eb8 chore: Phase 7.E reboot follow-up — version bumps + WIP + HISTORY (ref #498)
5 packages bumped :
  secubox-toolbox 2.1.0 → 2.2.0  (WG boot survival + R3 detection + NM keyfile + admin rate-limit)
  secubox-aggregator 0.1.0 → 0.2.0  (loader v2 + migration helper v2)
  secubox-waf 1.1.3 → 1.2.0  (/bans/history + Tracked Attackers tile)
  secubox-magicmirror 1.1.0 → 1.1.1  (api/routers/ shipping fix)
  secubox-openclaw 1.0.0 → 1.0.1  (postinst chown for aggregator user)

Plus WIP/HISTORY entries documenting the full reboot-follow-up sprint
(8b0d4840, 22748b29, 613de765, 9ac35005, 7e5c510c, 6812dfb0). Wiki
Phase-7-Roadmap updated in the secubox-deb.wiki repo with a new
Phase 7.E section.
2026-06-07 09:47:01 +02:00
0cc99d5187 fix: Phase 7 follow-up bugs — magicmirror, openclaw, ghost dirs (ref #498)
Three small bugs surfaced when auditing the aggregator load after
mass migration on gk2 :

magicmirror : debian/rules installed only api/main.py + an empty
  __init__.py, so the running module's `from .routers import mmpm` had
  no routers/ package to find. Was already broken under its own
  per-module systemd unit. Now ships api/__init__.py from source +
  api/routers/{__init__.py,mmpm.py}.

openclaw : postinst chown'd /var/lib/secubox/openclaw to root:root with
  0750. The Phase 7.D aggregator runs as `secubox`, which couldn't
  traverse the parent dir during the module's import-time mkdir of
  scans/. Now chown to secubox:secubox (when the user exists), 0755 on
  parent, 0750 on scans/ — same containment, traversable by the
  aggregator.

secubox-aggregator-migrate : older packaging shipped some modules under
  /usr/lib/secubox/secubox-<name>/ in addition to the canonical
  /usr/lib/secubox/<name>/. On upgraded systems both coexist and the
  discovery walk picked up duplicates that mounted as empty (no paths)
  sub-apps under /api/v1/secubox-<name>/. Now skipped when an unprefixed
  twin exists.

Live on gk2 : 117 mounted, 0 failed, 4.4 GiB free RAM. magicmirror and
openclaw both return HTTP 200 via nginx.
2026-06-06 16:48:38 +02:00
CyberMind
5e93c73600
feat(navbar): consolidate to 6 charter categories + fix dropped menu entries (closes #306) (#307)
The hub's `_compute_menu_sync()` drops menu entries lacking an `id`
field. 6+ packages (lyrion, yacy, zigbee, rustdesk, grafana, authelia)
shipped a different schema (`title/url/section/module`) so they NEVER
appeared in the navbar. Plus the existing CATEGORY_META declared 12
sections (dashboard/security/network/system/core/users/services/
privacy/monitoring/publishing/apps/admin), not the 6 SecuBox charter
modules.

Changes:
* All 121 packages/secubox-*/menu.d/*.json normalised to the canonical
  schema (id, name, path, category, icon, order, description). Legacy
  schema aliases (title/url/module/section) preserved as fallbacks then
  dropped from the file.
* Each menu entry's category remapped to one of the 6 charter modules:
  AUTH (auth/users/identity/zkp/nac/openclaw),
  WALL (crowdsec/waf/mitmproxy/hardening/threat-* /cve-triage/...),
  BOOT (kernel-build/eye-remote/master-link/droplet/cloner/backup/...),
  MIND (ai-gateway/mcp-server/grafana/ndpid/netifyd/glances/...),
  ROOT (system/hub/portal/console/admin/vault/vm/rtty/...),
  MESH (wireguard/dns/tor/matrix/gitea/nextcloud/mail/lyrion/yacy/
        zigbee/dns-provider/rustdesk/... — all network + comms apps).
* secubox-hub v1.4.0 — CATEGORY_META rewritten with the 6 charter
  modules carrying their official color from DESIGN-CHARTER.md and
  the complementary-pair order. DEFAULT_MENU fallback remapped too.
* secubox-zigbee v2.5.3 — www/zigbee/index.html rewritten with the
  canonical SecuBox scaffold (body display:flex, sidebar 220px fixed,
  .main reserving 48px for the global-menu-bar). MESH palette.

Browser side: operators need to clear localStorage sbx_menu_cache (or
hard-refresh after the 1h TTL) to see the new sections after deploy.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-21 10:03:05 +02:00
CyberMind
99fc829b45
fix(web): rewrite stale /portal/login.html -> /login.html (closes #222) (#223)
PR #169 moved login.html out of secubox-hub to /usr/share/secubox/www/
under secubox-portal's ownership, but 67 source files across the
package set still redirected to /portal/login.html which no longer
exists on disk. nginx fell back to /index.html (hub root) on every
hit, whose checkAuth() bounced back to /portal/login.html, producing
an infinite "Redirecting to login..." loop with no way for any user
to authenticate.

sed -i 's|/portal/login\.html|/login.html|g' across all packages/*/www
sources (82 occurrences). The two prior partial fixes that triggered
this investigation (bcc6a781, 464e3379) only covered a subset and
missed the kiosk root checkAuth in secubox-hub/www/index.html plus
65 module index.html files.

Verified: grep -rl '/portal/login\.html' packages/ | grep -v /debian/
returns empty.

Discovered while testing the firstboot v2-schema+argon2 chain end-to-end
in a VBox amd64 boot of CI run 26082003883 (the #218 image build fix)
— firstboot now works, users.json gets a valid argon2 hash for
admin/secubox, the portal API runs, but the login UI is unreachable
because of this dangling URL.

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
2026-05-19 11:44:43 +02:00
bd7dda0c6f feat(secubox): complete meta-script generator Tasks 14-17
Task 14: Arch Profiles
- Add profiles/arch/arm64.yaml and profiles/arch/amd64.yaml
- Add ResolveWithArch() to merger for base → arch → tier chain
- Add tests for arch profile resolution

Task 15: Package secubox.yaml for All Packages
- Add scripts/generate-secubox-yaml.py generator script
- Generate 131 debian/secubox.yaml files with:
  - Category detection (security, network, system, etc.)
  - Tier assignment (all, lite, standard, pro)
  - API socket and UI path detection

Task 16: APT Repository Setup
- Add apt/conf/ reprepro configuration (multi-arch arm64/amd64)
- Add apt/hooks/lintian-check pre-publish validation
- Add scripts/apt-publish.sh and scripts/apt-sync.sh
- Add apt/README.md documentation

Task 17: CI Integration
- Add .github/workflows/build-secubox-cli.yml
- Build for linux-amd64 and linux-arm64
- Version injection via ldflags
- GitHub releases on tag push

Code Quality Fixes (Tasks 10-13):
- Add atomic writes for OTA boot control files (0600 perms)
- Fix NVME device extraction (nvme0n1p2 → nvme0n1)
- Add scanner.Err() checks in hardware detection
- Fix URL injection validation in fetch command
- Add proper cleanup on checksum failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-11 05:32:29 +02:00
68e7763fc3 docs: Add Eye Remote Multigadget skill and wiki
- Add /multigadget skill covering autorun, storage, round UI, tooling
- Add Eye-Remote-Multigadget.md unified wiki hub
- Add Build-System.md to wiki with build documentation
- Add AI-BUILD-PROMPT.md for GPT/Gemini assistance
- Update sidebar and home page with new links
- Update WIP.md with #70 and #71 done

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-10 09:12:42 +02:00
407db8f2a9 fix(menu): Replace non-emoji icons with proper emojis
- cyberfeed: shield-check → 📡
- mac-guard: shield-check → 🖥️
- threats: ! → ⚠️
- openclaw: ::: → 🕵️
- netdiag: &#128268; → 🩺
- rezapp: box → 📦
- avatar: * → 👤

All navbar items now have proper emoji icons.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-30 13:09:50 +02:00
4acd982bac feat(phase10): Complete all 10 Security Extensions modules
New modules created (8):
- secubox-ai-insights: ML threat detection and anomaly analysis
- secubox-ipblock: IP blocklist manager with nftables integration
- secubox-interceptor: Traffic interception and SSL inspection
- secubox-cookies: Cookie tracking and GDPR compliance
- secubox-mac-guard: MAC address whitelist/blacklist control
- secubox-dns-provider: Multi-provider DNS API (OVH, Gandi, Cloudflare)
- secubox-threats: Unified threat dashboard with IOC management
- secubox-openclaw: OSINT reconnaissance tool

Previously built:
- secubox-wazuh: SIEM integration
- secubox-ossec: Host IDS

All modules include:
- FastAPI backend with JWT authentication
- P31 Phosphor light theme frontend
- Debian packaging with systemd integration
- nginx reverse proxy config
- Menu integration

Total packages: 93 (was 85)
All migration phases complete (8, 9, 10)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-04 10:26:16 +02:00