You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] Harden baked nix.conf: drop accept-flake-config=true for explicit substituters + trusted-public-keys #773
area:imageContainer image, Dockerfile, buildeffort:smallLess than 1 hourpriority:highShould be done in the current milestonesecurityVulnerability fixes or security improvements
Source: PR #670 forward-looking roadmap, thread A — roadmap comment. Part of the #625 Nix migration; small + security-critical, so landing on the migration branch before the dev merge rather than deferring.
Problem
accept-flake-config = true is baked into the image's /etc/nix/nix.conf (flake.nix ~591). Any in-container nix run github:attacker/flake then silently accepts that flake's substituters/trusted-public-keys — the textbook Nix cache-redirection supply-chain attack.
Fix
Drop accept-flake-config = true from the baked nix.conf.
Bake explicitsubstituters + trusted-public-keys (cache.nixos.org + the vig-os cachix key) so normal use still hits the caches.
Require --accept-flake-config per-invocation for anything that genuinely needs a foreign flake's config.
area:imageContainer image, Dockerfile, buildeffort:smallLess than 1 hourpriority:highShould be done in the current milestonesecurityVulnerability fixes or security improvements
Activity
c-vigo commentedon Jun 30, 2026
Landed on the migration branch via #782.
fix(image): bake explicit substituters/keys instead of accept-flake-c…
test(image): assert nix.conf tokens by exact membership (clear CodeQL…
chore: release 0.4.0 (#195)
chore: release 0.4.0 (#813)
fix(workflows): trust the consumer flake's nixConfig in devkit-upgrade
fix(workflows): trust the consumer flake's nixConfig in devkit-upgrade (
chore: release 1.14.0 (#1612)