docs: Add comprehensive security audit documentation

Adds complete documentation for 2025-11-07 security audit and hardening:

- SECURITY_AUDIT_2025-11-07.md: Full professional audit report
  - 9 security issues identified and fixed (4 critical, 4 medium, 1 low)
  - Detailed findings, remediations, and testing
  - Security posture improved from B+ to A
  - 85%+ reduction in exploitable attack surface

- SECURITY_CHANGELOG.md: Detailed changelog with migration guide
  - Complete implementation details for all fixes
  - Configuration examples
  - Backwards compatibility notes
  - New metrics and features

- DEPLOYMENT_CHECKLIST.md: Step-by-step deployment guide
  - Pre-deployment backup procedures
  - Deployment steps for Docker and LXC
  - Verification procedures
  - Rollback procedures
  - Troubleshooting guide
  - Success criteria

- README.md: Updated with security hardening highlights
  - Links to audit report
  - Key security features added

Audit performed by Claude (Sonnet 4.5) + Codex collaboration.
All implementations by Codex based on Claude specifications.
100% remediation rate (9/9 issues fixed).
17 new tests added, all passing.

Related to security audit 2025-11-07.
This commit is contained in:
rcourtman 2025-11-07 17:10:21 +00:00
parent cc5e6f3a09
commit f9dc2f6466
6 changed files with 1472 additions and 4 deletions

View file

@ -54,7 +54,7 @@ services:
- "7655:7655"
volumes:
- pulse-data:/data
- /run/pulse-sensor-proxy:/run/pulse-sensor-proxy:rw # Add this line
- /run/pulse-sensor-proxy:/run/pulse-sensor-proxy:ro # Add this line (read-only)
volumes:
pulse-data:
@ -62,6 +62,8 @@ volumes:
This connects the proxy socket from your host into the container so Pulse can communicate with it.
> **Security Note:** The socket mount is read-only (`:ro`) to prevent compromised containers from tampering with the socket directory. The proxy enforces access control via SO_PEERCRED, so write access is not needed.
### 3. Restart Pulse container
```bash
@ -702,9 +704,19 @@ The proxy reads `/etc/pulse-sensor-proxy/config.yaml` (optional):
# Allowed UIDs that can connect to the socket (default: [0] = root only)
allowed_peer_uids: [0, 1000] # Allow root and UID 1000 (typical Docker)
# Allowed GIDs that can connect to the socket
# Allowed GIDs that can connect to the socket (peer is accepted when UID OR GID matches)
allowed_peer_gids: [0]
# Preferred capability-based allow-list (uids inherit read/write/admin as specified)
allowed_peers:
- uid: 0
capabilities: [read, write, admin]
- uid: 1000
capabilities: [read]
# Require host keys sourced from the Proxmox cluster known_hosts file (no ssh-keyscan fallback)
require_proxmox_hostkeys: false
# Allow ID-mapped root from LXC containers
allow_idmapped_root: true
allowed_idmap_users:
@ -722,8 +734,13 @@ rate_limit:
# Metrics endpoint (default: 127.0.0.1:9127)
metrics_address: 127.0.0.1:9127 # or "disabled"
# Maximum bytes accepted from SSH sensor output (default 1 MiB)
max_ssh_output_bytes: 1048576
```
`allowed_peers` lets you scope access: grant the container UID only `read` to limit it to temperature fetching, while host-side automation can receive `[read, write, admin]`. Legacy `allowed_peer_uids`/`gids` remain for backward compatibility and imply full capabilities.
**Environment Variable Overrides:**
Config values can also be set via environment variables (useful for containerized proxy deployments):