A nightly cron job runs a compliance-check script as root because it must read protected files. The script sits in a directory writable by the whole operations group. What should the architect do to remove the risk while keeping the job's schedule and function?
Show the answer
Correct answerB. Make the script and its directory writable only by root, and keep the nightly root schedule
AWhy not this: More frequent runs do not stop tampering; a modified script would still run as root in between.
BWhy this is right: Removes the escalation path by letting only root change what root executes, and keeps the schedule and access needs.
CWhy not this: The job needs protected files, so it would fail; a writable script is still a problem for whoever runs it.
DWhy not this: A login event changes when the job runs, but the script stays writable by the group, so the risk remains.
Any group member could edit a script that root runs on a schedule, which gives privilege escalation. Restricting write access to root closes that path and keeps the job intact. An unprivileged account would break the job's need to read protected files and would not address the writable script.