Commit Graph

4 Commits

Author SHA1 Message Date
rcourtman
cc5e6f3a09 fix(security): Change socket mount to read-only
BREAKING CHANGE: Socket directory now mounted read-only into containers
for security. Prevents compromised containers from:
- Unlinking socket and creating man-in-the-middle proxies
- Filling /run/pulse-sensor-proxy/ to exhaust tmpfs
- Racing proxy service on restart to hijack socket path

Migration: Change socket mounts from :rw to :ro in docker-compose.yml

Access control enforced via SO_PEERCRED, so write access not needed.

Related to security audit 2025-11-07.
2025-11-07 17:10:02 +00:00
rcourtman
521d3a7c6e Fix docker-compose.yml temperature proxy bind mount configuration
This corrects several issues with the temperature proxy configuration
in the example docker-compose.yml:

Issues fixed:
1. **Wrong mount path**: Was using /mnt/pulse-proxy (LXC path) instead of
   /run/pulse-sensor-proxy (Docker path). While the client auto-detects both
   paths, this was inconsistent with documentation.

2. **Wrong permissions**: Was mounted as :ro (read-only) but needs :rw
   (read-write) for the Unix socket to work properly.

3. **Enabled by default**: Would cause container startup issues if the
   proxy wasn't installed on the host.

Changes:
- Commented out the bind mount by default (requires manual setup)
- Changed path from /mnt/pulse-proxy to /run/pulse-sensor-proxy
- Changed permissions from :ro to :rw
- Added clear comment explaining it requires setup with --standalone flag
- Points users to documentation

Now matches the documented Docker setup process and won't break
fresh installations where the proxy isn't installed yet.
2025-11-05 18:18:04 +00:00
rcourtman
524f42cc28 security: complete Phase 1 sensor proxy hardening
Implements comprehensive security hardening for pulse-sensor-proxy:
- Privilege drop from root to unprivileged user (UID 995)
- Hash-chained tamper-evident audit logging with remote forwarding
- Per-UID rate limiting (0.2 QPS, burst 2) with concurrency caps
- Enhanced command validation with 10+ attack pattern tests
- Fuzz testing (7M+ executions, 0 crashes)
- SSH hardening, AppArmor/seccomp profiles, operational runbooks

All 27 Phase 1 tasks complete. Ready for production deployment.
2025-10-20 15:13:37 +00:00
rcourtman
f46ff1792b Fix settings security tab navigation 2025-10-11 23:29:47 +00:00