Vendor replays
Coding agent risks with the file system: replays and fixes
2 replays involve the file system: 0 reported incidents and 2 command classes. Each one shows the call, a fix that needs no extra tool, and what KYA did in the replay.
rm -rf of everything in the project folder
Fix: Commit often and push, so git can bring back the committed state of tracked files. rm -rf ./* skips names that start with a dot, so .git and .env survive, but untracked and ignored files without a leading dot, such as a local database, are lost, so keep a backup of those.
Replay result: Held.
rm -rf of a path that starts with an unset variable
Fix: In shell scripts, write ${VAR:?} before a deletion, as in rm -rf "${BUILD_DIR:?}/", so the script stops when the variable is empty or unset. Also start scripts with set -u.
Replay result: Stopped.