!9IQChSjwSHXPPWTa:lix.systems

Lix

1122 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms303 Servers

Load older messages


SenderMessageTime
2 Feb 2026
@raitobezarius:matrix.orgraitobezariusintroducing the concept of secrets into nix that way makes me nervous but not sure i have clear arguments on why22:16:43
@raitobezarius:matrix.orgraitobezariusalso i still have this feeling that it shouldn't be the invocation's role to tell what is allowed to access a secret or not, because if you are the attacker and you can control that invocation you can simply authorize your own hacked derivation to access the secrets22:17:47
@embr:fairydust.spaceembr
In reply to @raitobezarius:matrix.org
introducing the concept of secrets into nix that way makes me nervous but not sure i have clear arguments on why
(my gut reaction to this is "don't put secrets in the nix store" is nice and straightforward, making it more complicated feels like it could easily become a footgun that one day leads to disaster)
22:18:11
@raitobezarius:matrix.orgraitobezariusyeah but here it's not a trivial "putting secrets in the nix store"22:18:30
@raitobezarius:matrix.orgraitobezariusif you have a socket in the sandbox and you use it to sign a binary and put a signed binary in the store22:18:39
@raitobezarius:matrix.orgraitobezariusyou are not putting secrets in the nix store22:18:44
@raitobezarius:matrix.orgraitobezariusthis property is held22:18:48
@raitobezarius:matrix.orgraitobezarius(the socket sandbox can be backed by a PKCS#11 over UDS signer for example)22:19:08
@raitobezarius:matrix.orgraitobezariusobviously if people starts pulling key material in the sandbox that way and accidentally write them in $out22:19:27
@raitobezarius:matrix.orgraitobezariusmama mia22:19:28
@raitobezarius:matrix.orgraitobezariusis this how we make UEFI test keys go in production builds?22:19:41
@weethet:catgirl.cloudWeetHetOh, I see, thanks22:54:36
@jlamur:matrix.orgJules Lamuroh that's right, I did not think of that 👍️22:54:47
@jlamur:matrix.orgJules Lamur Not addressing your point directly, but even if the invocation passes secrets' "references" (ie. files in my previous examples), that does not prevent the actual secrets store from having authorization. For files it's the kernel doing its things, but you could imagine having secrets references with other "fetchers" for example nix-build --secret sec1 bao:foo/bar/baz or something like that, and openbao does it's job checking that the user running the command has access to the secret. 23:00:27
@jlamur:matrix.orgJules LamurIf the user is compromised and can run arbitrary commands it's already game over, even if they can't map secrets to derivations?23:01:59
@jlamur:matrix.orgJules LamurAlso, would it be a problem that, by design, these derivations cannot be reproducible? A lot of the nixpkgs ones are not so I guess that would be only a "philosophical problem"?23:10:27
@jlamur:matrix.orgJules Lamur(Reproducible / determinist in the sense that even with the same signature key, the signed binary differs)23:14:23
@raitobezarius:matrix.orgraitobezariusthe reproducible problem can be fixed by extending the Nix model23:14:31
@raitobezarius:matrix.orgraitobezariusfor example, there could be some sort of special input-addressed derivations which are deterministic modulo verification of the artifacts with a certain public key that needs to be declared23:15:04
@raitobezarius:matrix.orgraitobezarius* for example, there could be some sort of special input-addressed derivations which are deterministic modulo verification of the artifacts with a certain public key that needs to be declared in the drv23:15:07
@raitobezarius:matrix.orgraitobezariusso the outputs is IA + mod public key verification23:15:17
@jlamur:matrix.orgJules Lamurthat would be nice23:15:34
@raitobezarius:matrix.orgraitobezariusthe problem is that we are having the discussion over an vague/abstract infrastructure that does this signing thing23:17:29
@raitobezarius:matrix.orgraitobezariussure, there might not be arb exec primitive in the real world, but if you have arb foobar injection and arb drv eval and arb […], maybe you have something equivalent23:18:01
@raitobezarius:matrix.orgraitobezariusadditionally, Lix is pretty explicit23:18:11
@raitobezarius:matrix.orgraitobezariusits sandbox is not a security boundary23:18:16
@raitobezarius:matrix.orgraitobezarius https://docs.lix.systems/manual/lix/stable/installation/nix-security.html 23:19:03
@raitobezarius:matrix.orgraitobezarius

Nevertheless, the Lix team does not consider multi-user mode a strong security boundary, and does not recommend running untrusted user-supplied Nix language code on privileged machines, even if it is secure to the best of our knowledge at any moment in time.

23:19:06
@raitobezarius:matrix.orgraitobezarius

i think zooming out, some things are important:

  • being able to verify inputs provenance via signatures (addresses the source code / .drv recipes trust)
  • being able to identify a derivation cryptographically as a function of its inputs which are themselves trusted, etc.
  • being able to trust that the code that should be executed is executed (i know some people are playing around with Nitro Enclave derivation builders with attestations)

if you can relate these pieces and the final output (i.e. something proof shaped), that's pretty strong evidence that you are not going to sign any random bytes that someone manipulated through all the pipeline layers?

23:26:03
@raitobezarius:matrix.orgraitobezariuswhere you do tradeoffs is usecase dependent23:26:08

Show newer messages


Back to Room ListRoom Version: 10