SV-268155r1131113_rule
V-268155
SRG-OS-000480-GPOS-00227
ANIX-00-001500
CAT II
10
Configure NixOS to enforce reauthentication with sudo.
Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:
security.sudo.extraConfig = ''
Defaults timestamp_timeout=0
'';
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify NixOS enforces reauthentication with sudo with the following command:
$ sudo grep timestamp_timeout /etc/sudoers
Defaults timestamp_timeout=0
If "timestamp_timeout" is greater than 0, is commented out, or is missing, this is a finding.
V-268155
False
ANIX-00-001500
Verify NixOS enforces reauthentication with sudo with the following command:
$ sudo grep timestamp_timeout /etc/sudoers
Defaults timestamp_timeout=0
If "timestamp_timeout" is greater than 0, is commented out, or is missing, this is a finding.
M
5658