Security Fixes
This release addresses critical security vulnerabilities reported in #27:
Command Injection Hardening
- All container IDs validated with
^[0-9]+$regex before any subprocess/pctcall - Validation added in
scaling_manager.py,config.pytier loading, andscale_out() - Hostnames sanitized per RFC-1123 in
generate_cloned_hostname()
Secrets Management
- 4 environment variable overrides for secrets:
LXC_AUTOSCALE_SSH_PASSWORDLXC_AUTOSCALE_SMTP_PASSWORDLXC_AUTOSCALE_GOTIFY_TOKENLXC_AUTOSCALE_UPTIME_KUMA_WEBHOOK
- Startup warning if config file is group/other readable (recommend
chmod 0600)
Per-Container Locking
- Replaced single global
Lock()with per-container locks - Dedicated
_log_lockfor the JSON event log - Concurrent threads for different containers no longer block each other
Additional Hardening
run_local_command()now always usesshell=False(string cmds split viashlex.split())- Web UI binds to
127.0.0.1by default (was0.0.0.0),debug=False - Web UI host/port/debug configurable via env vars
Testing
- 12 unit tests added covering all security fixes
Full Changelog: v1.0.0...v1.1.0