Skip to content

Lucius v1.1.0 — REST API, Zepp OS Companion & Security Hardening

Latest

Choose a tag to compare

@ar3ac ar3ac released this 28 Nov 07:07
· 2 commits to main since this release

✨ What's New

🔌 Lightweight REST API

  • Added GET /api/commands and POST /api/run/{command} for external integrations (Home Assistant, webhooks, scripts, and the smartwatch companion).
  • Supports Authorization: Bearer <token> and X-Lucius-Token: <token> using an optional dedicated LUCIUS_API_TOKEN in .env (falls back to LUCIUS_PIN).

⌚ Zepp OS 4.x Smartwatch Companion (zepp-app/)

  • Added an optional, fully isolated Zepp OS 4.x companion mini-app for Square (e.g. Amazfit Bip 6, Active) and Round (e.g. Amazfit Balance, T-Rex 3, Active 2) smartwatches.
  • Dynamic command list sync + local cache, native confirmation modal for dangerous commands, compact output view with haptic feedback, LAN HTTP/HTTPS support, and English/Italian (en-US / it-IT) localization.

🔒 Security Hardening

  • Session & CSRF/WebSocket protection: Per-device random HttpOnly, SameSite=Lax cookies (automatic Secure flag over HTTPS), server-side session revocation via POST /logout, Origin validation on state-changing requests and WebSocket handshakes, and constant-time comparisons (hmac.compare_digest).
  • Command execution safety: Blocked disabled commands on /run and /ws/run/{command} (matching /api/run/{command}), added shlex syntax validation on /add and /edit, and logged /run executions to history.json (chmod 600).
  • Frontend & PWA hardening: Fixed HTML-attribute JS injection in manage.html, scoped Service Worker (lucius-cache-v3) to static assets only, disabled /docs//redoc//openapi.json by default, and added HTTP security headers (X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer).
  • Installer & updater: Enforced non-empty PIN and chmod 600 .env via python-dotenv in install.sh, fixed ownership ordering in update.sh, pinned compatible ranges in requirements.txt, and cleaned up legacy files.

🔄 Upgrading

sudo /opt/lucius/update.sh

Full Changelog: v1.0.0...v1.1.0