Skip to content

NixOS must prohibit user installation of system software without explicit privileged status.

An XCCDF Rule

Description

Allowing regular users to install software, without explicit privileges, creates the risk that untested or potentially malicious software will be installed on the system. Explicit privileges (escalated or administrative privileges) provide the regular user with explicit capabilities and control that exceeds the rights of a regular user. Operating system functionality will vary, and while users are not permitted to install unapproved software, there may be instances where the organization allows the user to install approved software packages, such as from an approved software repository. The operating system or software configuration management utility must enforce control of software installation by users based upon what types of software installations are permitted (e.g., updates and security patches to existing software) and what types of installations are prohibited (e.g., software whose pedigree with regard to being potentially malicious is unknown or suspect) by the organization.

ID
SV-268152r1039344_rule
Version
ANIX-00-001450
Severity
Medium
References
Updated

Remediation Templates

A Manual Procedure

Configure /etc/nixos/configuration.nix to prevent unauthorized users from using nix by adding the following configuration settings:

 nix.settings.allowed-users = [ "root" "@wheel" ];

Note: extra usergroups may be permitted by adding them with the format "@group" (e.g.: "@users").