!kjdutkOsheZdjqYmqp:nixos.org

Nixpkgs / NixOS contributions

1865 Members
NixOS 24.05 Uakari | #review-requests:nixos.org | https://nixos.org/blog/announcements.html#nixos-23.11 | https://hydra.nixos.org/jobset/nixos/trunk-combined | https://reproducible.nixos.org/ | 24.05 RMs: wegank & Mic92410 Servers

Load older messages


SenderMessageTime
23 Oct 2024
@emilazy:matrix.orgemilyI'm probably just going to do the workaround for now since enumerating the possibilities explicitly would be a pain and I think something like this should be morally allowed…18:11:43
@aloisw:kde.orgaloisw But the check is not really supposed to be adversarial anyway I guess, builtins.readFile (builtins.readFile ./foo)) is a giant smell that will most likely be caught in the review. 18:11:53
@emilazy:matrix.orgemily like really we just want an import in Nix that applies chroot-style restrictions. 18:11:54
@emilazy:matrix.orgemily because, I mean, you can also do someOtherPackage.somePassthruFunctionThatWillReadAFileForMe. 18:12:17
@emilazy:matrix.orgemilyyou would have to globally statically analyse Nixpkgs to truly enforce this.18:12:28
@aloisw:kde.orgaloiswI'm not sure we want yet another buggy userspace "chroot"…18:12:29
@infinisil:matrix.orginfinisil
In reply to @emilazy:matrix.org
I'm not sure why ./${foo}/x is banned when as far as I can tell ./. + "/../x" is allowed (though I haven't actually tried it yet, just skimmed the code).
Yeah nixpkgs-vet only does a simple syntactic check, while catching ./. + "/.." would need to be done with evaluation
18:30:09
@emilazy:matrix.orgemily aloisw's proposal to avoid eval seems plausible, but it doesn't solve all the ways that random packages can expose things you could use to acheive the same. 18:30:59
@emilazy:matrix.orgemilyit's like the return-oriented programming of Nixpkgs.18:31:05
@aktaboot:tchncs.deaktaboot changed their profile picture.19:54:05
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
because, I mean, you can also do someOtherPackage.somePassthruFunctionThatWillReadAFileForMe.
That seems like it should be fine. You’re not directly access the implementation details of the package. It can get moved around or changed (implementation-wise) without affecting users of it.
20:03:53
@emilazy:matrix.orgemily
In reply to @reckenrode:matrix.org
That seems like it should be fine. You’re not directly access the implementation details of the package. It can get moved around or changed (implementation-wise) without affecting users of it.
what I mean is, it can give you a way to access files outside your directory
20:04:12
@emilazy:matrix.orgemilyit's almost certainly the case that you can construct a gadget like that out of existing Nixpkgs stuff in a way that isn't practically statically lintable20:04:36
@emilazy:matrix.orgemily even if you heavily restrict directly file-reading functions as aloisw proposed 20:04:53
@emilazy:matrix.orgemilyI don't mean that accessing another package itself constitutes a violation20:05:18
@reckenrode:matrix.orgRandy Eckenrode Does this hypothetical function allow the caller to control which file is read? 20:05:44
@emilazy:matrix.orgemilyI mean that all you need is something somewhere that can read a path you input20:05:46
@emilazy:matrix.orgemilythere's lots of things that read files. e.g. you can construct a bad path and treat it as a Cargo lock file or whatever20:06:22
@emilazy:matrix.orgemily I'm just saying that I don't think restricting the arguments you can pass to a set of known functions like readFile, importJSON, etc. is enough to truly statically lint the relevant property 20:06:54
@drewrypope:matrix.orgDrewry Pope joined the room.20:58:55
@o-santi:matrix.orgLeonardo Santiago set a profile picture.21:07:47
@reecertv:matrix.orgReecerTVI have a question, I have an open pr in which there is also a commit which adds me as maintainer. Now I want to open another pr, in which I am also listed as package maintainer, is this possible without problems?21:08:58
@reecertv:matrix.orgReecerTVI mean, should I just remove the old commit and move it to the new pr, because the open commit will not be mergeable at first?21:14:27
@emilazy:matrix.orgemilyI believe that if you have a duplicate commit in both PRs they can merge successfulyl21:19:00
@emilazy:matrix.orgemilyso it would be okay to do it like that21:19:03
@frontear:matrix.orgfrontearand if by some chance it doesnt, you can rebase after the other has been merged and it should be fine22:21:45
@frontear:matrix.orgfrontearcurrently thats what ive done, holding a commit until a sibling pr is merged, then rebase should take care of it22:22:04
24 Oct 2024
@aleksana:mozilla.orgaleksana (force me to bed after 18:00 UTC)https://github.com/NixOS/nixpkgs/pull/35071501:34:43
@aleksana:mozilla.orgaleksana (force me to bed after 18:00 UTC) This PR points out a problem: services with DynamicUser enabled can almost only store files in standard paths (/var/lib, /var/run, etc), which makes customizing storage paths (thus selectively specifying storage devices) more difficult. 01:37:20
@aleksana:mozilla.orgaleksana (force me to bed after 18:00 UTC)Should we reduce the use cases of DynamicUser for this? (Because we actually don’t know how the user wants to choose the storage path)01:38:30

Show newer messages


Back to Room ListRoom Version: 6