Skip to content

om health should not recommend insecure trusted-users #409

Closed
@brainrake

Description

@brainrake

Adding a user to trusted-user amounts to local privilege escalation, granting root access without password. The documentation also notes this.

https://nix.dev/manual/nix/2.24/command-ref/conf-file.html#conf-trusted-users

The exploit is trivial and easily hidden eg. in a maliciously crafted flake. accept-flake-config is another dangerous option that should be warned against, and the two insecure options amplify each other.

NixOS/nix#9649

While avoiding trusted-users, binary caches can be used by adding them to the system nix.conf in trusted-binary-keys and substituters (or trusted-substituters and enabled via CLI or user nix.conf if not used all the time).

om health should do the opposite of what it currently does: check if any users or groups other than root are present, report an error and recommend removing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions