NixOS must generate an audit record for successful/unsuccessful modifications to the cron configuration.

Severity
Group ID
Group Title
Version
Rule ID
Date
STIG Version
mediumV-268097SRG-OS-000042-GPOS-00020ANIX-00-000300SV-268097r1039179_rule2024-10-251
Description
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. Audit records can be generated from various components within the information system (e.g., module or policy filter). Cron is a program that is similar to the task scheduler used in other operating systems. When a user logs on, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way.
ℹ️ Check
Verify NixOS generates an audit record when successful/unsuccessful attempts to modify the cron configuration. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep -w cron -w /var/cron/tabs/ -p wa -k services -w /var/cron/cron.allow -p wa -k services -w /var/cron/cron.deny -p wa -k services If the command does not return the example output, this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
✔️ Fix
Configure NixOS to generate audit records when successful/unsuccessful attempts to modify the cron configuration occur. Add or update the "security.audit.rules" configuration in /etc/nixos/configuration.nix to include the following rule: security.audit.rules = [ "-w /var/cron/tabs/ -p wa -k services" "-w /var/cron/cron.allow -p wa -k services" "-w /var/cron/cron.deny -p wa -k services" ]; Rebuild the NixOS configuration with the following command: $ sudo nixos-rebuild switch