After a root compromise you can't trust anything on the box, so you don't clean it. You keep the evidence, burn every secret it held, wipe it, rebuild from a script, and bring back data only. This page walks that order step by step, enforces the gates between steps, and generates the cloud-init file for the new non-root agent accounts.
Only inert data returns. Anything that can run or grant access (binaries, unit files, crontabs, shell dotfiles, authorized_keys) stays in quarantine, because that's where a persistent backdoor would hide. Change a decision to see why the filter disagrees.
| Path on old volume (example) | Kind | Your call | Filter says |
|---|
One service account per agent, no shared root. Each gets only the commands it needs through sudo, and SSH happens over Tailscale only. Edit the allowed commands and the file below updates.
/etc/systemd/system/xmrig.service or .bashrc as Restore and read the filter's reason.agent-alvin a broad command like ALL and watch the generator flag it.