security: record residual root-trust gap in the backup timer
This commit is contained in:
1 parent
5d1c2a5158
commit
3d4fac124d
1 file changed
+11
@@ -19,6 +19,17 @@ Everything else — package installs, user management, file writes under `/etc`,
|
||||
- The nightly backup runs as root from **`/usr/local/sbin/agent-backup`** via an `agent-backup.service` drop-in. The script is root-owned; the agent's `~/.hermes/scripts/backup.sh` is no longer executed by the unit and must not be treated as root code.
|
||||
- Backup credentials live in root-only `/etc/agent-backup.env`.
|
||||
|
||||
## Residual root-trust gap (operator root required)
|
||||
|
||||
The root-owned backup script still resolves `restic` from `/usr/local/bin/restic`, which is owned by `ubuntu`, and it still sources `/home/ubuntu/.hermes/.env`. An agent-writable binary or `PATH` line there is therefore a root code-execution path through the nightly backup timer. Until root fixes it:
|
||||
|
||||
- `chown root:root /usr/local/bin/restic` (or install a root-owned copy and call it absolutely)
|
||||
- remove `/home/ubuntu/.local/bin` from the root script’s `PATH`
|
||||
- stop sourcing `/home/ubuntu/.hermes/.env` from the root script
|
||||
- remove the Hermes-python `pip list` diagnostic
|
||||
|
||||
This requires root outside the agent; the restricted sudo policy does not grant it. Treat the backup timer as privileged until fixed.
|
||||
|
||||
## Recovery (operator only)
|
||||
|
||||
The pre-change cloud-init sudoers file is preserved at `/root/sudoers-cloud-init.bak` (0600). Restoring it requires root access outside the agent, e.g. the provider console. Do not expose it to the agent.
|
||||
Reference in new issue
Block a user