mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-28 16:58:31 +01:00
## Summary
On Proxmox VE 9+, Pulse's setup flows were automatically adding
`VM.GuestAgent.FileRead` to the `PulseMonitor` role on `/` with no
prompt or warning. Because Proxmox cannot path-restrict
`VM.GuestAgent.FileRead`, holding it on `/` gives any Pulse PVE token
arbitrary file-read access via `qemu-guest-agent` (typically running as
`root` or `SYSTEM`) across every QGA-enabled VM.
Pulse only uses `agent/file-read` as a fallback to read `/proc/meminfo`
when neither balloon `meminfo` nor an in-guest Pulse agent is available,
whereas `VM.GuestAgent.Audit` alone covers VM disk/filesystem and guest
auditing.
### Changes
1. **Remove `VM.GuestAgent.FileRead` from all four PVE 9+ setup
surfaces** (`PulseMonitor` now defaults to `Sys.Audit` +
`VM.GuestAgent.Audit`, plus `Datastore.Audit` where included; PVE 8
retains the `VM.Monitor` fallback):
- Agent Proxmox registration (`internal/hostagent/proxmox_setup.go`)
- Server installer (`install.sh`)
- Generated `/api/setup-script` and Setup Doctor
(`internal/api/configapi/setup_script_render.go`), so Setup Doctor also
strips `VM.GuestAgent.FileRead` when re-applying `PulseMonitor`
- Settings manual token setup commands and explanatory note
(`frontend-modern/src/components/Settings/nodeModalModel.ts`,
`NodeModalSetupGuideSection.tsx`)
2. **Harden runtime HTTP 403 backoff for `/proc/meminfo` reads**:
- Extend `permissionDenied` backoff to 30 minutes
(`vmAgentMemPermissionDeniedTTL`, matching optional APT 403 backoff) in
`internal/monitoring/guest_memory_agent.go`
- Prevent the 10-minute cache cleaner (`cleanupRRDCache` in
`internal/monitoring/monitor_agents.go`) from evicting active 403
backoff entries early while preserving per-VM isolation and bounded
recovery
3. **Update docs, v6 subsystem contracts, and tests**:
- Document the arbitrary file-read blast radius, safer alternatives
(QEMU ballooning or a guest-local Pulse agent), and how existing
v5.1.23–v6.8.0 PVE 9+ installs can strip `VM.GuestAgent.FileRead`
without rotating tokens (`docs/AGENT_SECURITY.md`,
`docs/TROUBLESHOOTING.md`, `docs/MSP.md`, `docs/VM_DISK_MONITORING.md`,
and synced `frontend-modern/public/docs/` copies)
- Update affected v6 subsystem contracts and Go, Python, and Vitest test
suites
## Verification
- Python doc tests (`test_pve_backup_troubleshooting_docs.py`,
`test_msp_connection_docs.py`): 30/30 passed
- Frontend `tsc --noEmit`, `npm run lint`, `npm run build`, and targeted
Vitest suites (`nodeModalModel.test.ts`,
`NodeModalSetupGuideSection.test.tsx`, `settingsArchitecture.test.ts`,
`docsLinks.test.ts`, `pveHelperGuidance.test.ts`,
`proxmoxPermissionsGuide.test.ts`): all passed
- Go targeted tests (`internal/hostagent`, `internal/api/configapi`,
`internal/api`, `scripts/installtests`, `internal/monitoring`): all
passed
- Full Husky pre-commit governance/lint/guardrail suite and
`browser_verification_guard.py --base
c58fd5f209 --commit HEAD` passed (receipt
`frontend-modern/browser-verification/66cf1bc9386fcd02.json`)
- Playwright browser verification against a private Pulse build at
desktop `1280x800` and mobile `390x844` (`/settings/infrastructure` Add
Proxmox VE -> Manual Token Setup, `/docs/AGENT_SECURITY`,
`/docs/TROUBLESHOOTING#optional-proxmox-checks-return-403-repeatedly`)