I don't know why you're implying the list is unbounded but this isn't very difficult. You don't have to have perfect foresight and one shot the list. You'll add things as you discover you missed them or as you adopt new tools/scripts.
Don't let the perfect be the enemy of the good, there is a lot of space between running agents directly on your system and an environment too locked down or sophisticated to realistically maintain.
Of course there are many ways but LLM don't use them. They use standard commands and you will get a confirmation prompt in the terminal where you can deny and you are thrown back into prompting.
python3 -c "import os; os.unlink('~/.bashrc')"