[CRITICAL] Secrets stored as plaintext in world-readable Nix store #10
Labels
No labels
area:documentation
area:infrastructure
area:network
area:security
priority:critical
priority:high
priority:low
priority:medium
status:blocked
type:bug
type:deployment
type:enhancement
type:investigation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
reinitialized.net/infrastructure#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Labels:
area:security,priority:critical,type:bugDescription
The custom secrets management system (
modules/profiles/secrets.nix) stores all secret values as Nix string literals. These values end up in/nix/storewhich is world-readable by default.Examples:
builtins.toFileImpact
CRITICAL — Any user or process on ANY host can read ALL secrets from the Nix store:
Compromising a single host exposes credentials for every service across the entire fleet. This is a systemic architectural flaw.
Recommended Fix
Migrate to one of:
/run/secretswith proper permissionsMigration steps:
.sops.yamlwith age keys for each hostmodules/secrets/with sopsbuiltins.toFileand direct string assignments withsops.secretsreferencesconfig.sops.secrets.<name>.pathinstead ofconfig.secrets.<name>.keysReferences