mirror of
https://github.com/hanzoai/cloud.git
synced 2026-11-23 21:00:04 +00:00
Addresses review feedback on #7: - Default cmd/host HTTP listener to loopback (127.0.0.1:3690) when -addr/-listen/CLOUD_LISTEN/CLOUD_ADDR/PORT are unset, and only auto-enable staged functions on loopback listeners. - Validate existing ZAP socket paths with os.Lstat before os.Remove in Serve() so regular files, directories, and symlinks are never deleted. - Use O_CREATE|O_EXCL (mode 0600) for <stateDir>/master.key, log minted/loaded status without leaking key material, and fail closed on write errors instead of keeping a process-only key. - Add unit tests covering key mode 0600, existing key reuse, concurrent exclusive create, failed write cleanup, non-socket preservation, and loopback default.