RetroFed Forum
Your home away from modern life.
nixpkgs > aur
Post Reply
AuthorMessage
danhab99 programming.dev danhab99@programming.dev
Joined: 2023-07-03
Quote

cross-posted from: https://programming.dev/post/52191489

239   Original
Scipitie lemmy.dbzer0.com Scipitie@lemmy.dbzer0.com
Joined: 2023-12-25
#2 · Quote Reply

Running both ... Nixpkgs will rightfully laugh about this - in about a month once they caught up on recent events.

Loving both arch and nixos though!

23
sudoMakeUser sh.itjust.works sudoMakeUser@sh.itjust.works
Joined: 2026-01-30
#3 · Quote Reply

I remember when, I think it was either a log4j or CUPS malware attack, Debian remained unaffected because the packages in its repos was too old.

62
RustyNova lemmy.world RustyNova@lemmy.world
Joined: 2023-11-24
#4 · Quote Reply

As a nix user, I wouldn't laugh. We are vulnerable to this type of attack as well.

Heck, it's surprising we aren't full of malware considering how many packages there are, and an easy supply chain attack vector with auto RyanTM PRs.

160
phar lemmy.world phar@lemmy.world
Joined: 2023-06-10
#5 · Quote Reply

We're any chaotic-aur packages affected?

2
Kronusdark lemmy.world Kronusdark@lemmy.world
Joined: 2023-06-09
#6 · Quote Reply

As a nix user, I wouldn't laugh. We are vulnerable to this type of attack as well. Heck, it's surprising we aren't full of malware considering how many packages there are, and an easy supply chain attack vector with auto RyanTM PRs.

Yea. especially if you use flakes heavily. It’s so decentralized it could take longer to catch.

36
eestileib lemmy.blahaj.zone eestileib@lemmy.blahaj.zone
Joined: 2023-07-02
#7 · Quote Reply

Y'all just haven't noticed yet.

8
[object Object] lemmy.ca panda_abyss@lemmy.ca
Joined: 2025-07-20
#8 · (edited) Quote Reply

AUR: it happened to me, and one day it will happen to you!

This is still the shai hulud worm.

There’s no reason nixpkgs hasn’t been hacked yet. It jest depends on a few devs credentials being stolen, either by vscode, an npm package, a pypi dep, etc.

50
danhab99 programming.dev danhab99@programming.dev
Joined: 2023-07-03
#9 · Quote Reply

As a nix user, I wouldn't laugh. We are vulnerable to this type of attack as well. Heck, it's surprising we aren't full of malware considering how many packages there are, and an easy supply chain attack vector with auto RyanTM PRs.

I don't see how it would happen. Nix is immune bc hashes are constantly checked, you can't swap in malicious code without a person noticing bc it might throw a mismatched hash error. Also nixpkgs has been really good about vetting packages, I don't expect them to look too closely into the source codes of everything but if something malicious were to happen like what is happening to AUR someone would see it way faster

-14
juipeltje lemmy.world juipeltje@lemmy.world
Joined: 2023-07-02
#10 · Quote Reply

As a nix user, I wouldn't laugh. We are vulnerable to this type of attack as well. Heck, it's surprising we aren't full of malware considering how many packages there are, and an easy supply chain attack vector with auto RyanTM PRs.

It's possible, but at the very least someone glances over the derivation since it's part of the actual nixpkgs repo right? AUR on the other hand is a wild west.

16
adarza piefed.ca adarza@piefed.ca
Joined: 2025-06-07
#11 · Quote Reply

I remember when, I think it was either a log4j or CUPS malware attack, Debian remained unaffected because the packages in its repos was too old.

debian stable misses a lot of the 'fun'.

35
UnfortunateShort lemmy.world UnfortunateShort@lemmy.world
Joined: 2023-06-19
#12 · Quote Reply

I mean, no one is stopping you from using Nix on Arch

14
Skullgrid lemmy.world Skullgrid@lemmy.world
Joined: 2023-06-29
#13 · Quote Reply

I remember when, I think it was either a log4j or CUPS malware attack, Debian remained unaffected because the packages in its repos was too old.

Slow and steady wins the race

14
KindaABigDyl programming.dev KindaABigDyl@programming.dev
Joined: 2023-06-14
#14 · Quote Reply

I mean, no one is stopping you from using Nix on Arch

I believe I even got the reverse, pacman working on Nix (I've also gotten it and archiso working on Fedora)

12
RustyNova lemmy.world RustyNova@lemmy.world
Joined: 2023-11-24
#15 · Quote Reply

I don't see how it would happen. Nix is immune bc hashes are constantly checked, you can't swap in malicious code without a person noticing bc it might throw a mismatched hash error. Also nixpkgs has been really good about vetting packages, I don't expect them to look too closely into the source codes of everything but if something malicious were to happen like what is happening to AUR someone ...

The AUR attack attacked the build files. On nix, you could easily set a new download url for the package, set the new hash, and claim the project has moved to a new repo/site.

That would require a second person to vet on it, but it could be seen as normal for a maintainer not in the know about the project.

New packages are harder to pass, but it could also work.

26
RustyNova lemmy.world RustyNova@lemmy.world
Joined: 2023-11-24
#16 · Quote Reply

It's possible, but at the very least someone glances over the derivation since it's part of the actual nixpkgs repo right? AUR on the other hand is a wild west.

Yeah if the url is https://i_hack.you/ yeah that will be easy to spot. But imagine an attacker just to a "patch update", updating the url and hash to the malicious repository, and use a typo squatted domain/repository, that will make it harder to spot.

16
RustyNova lemmy.world RustyNova@lemmy.world
Joined: 2023-11-24
#17 · Quote Reply

I believe I even got the reverse, pacman working on Nix (I've also gotten it and archiso working on Fedora)

You... Monster.

11
moonpiedumplings programming.dev moonpiedumplings@programming.dev
Joined: 2023-08-10
#18 · Quote Reply

Yeah if the url is https://i_hack.you/ yeah that will be easy to spot. But imagine an attacker just to a "patch update", updating the url and hash to the malicious repository, and use a typo squatted domain/repository, that will make it harder to spot.

No, it would actually be quite easy to spot.

Nixpkgs templates the source code url fro the url, and then it injects a variable

Here is an example from bash:

pname = "bash${lib.optionalString interactive "-interactive"}";
    version = "5.3${fa.patch_suffix}";
    patch_suffix = "p${toString (builtins.length upstreamPatches)}";

    src = fetchurl {
      url = "mirror://gnu/bash/bash-$%7Blib.removeSuffix fa.patch_suffix fa.version}.tar.gz";
      hash = "sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=";
    };

If the url were to be changed, it would show up as a change in git when someone is reviewing before merging.

14
mlg lemmy.world mlg@lemmy.world
Joined: 2023-07-29
#19 · (edited) Quote Reply

COPR: "You guys are actually sharing your packages with other people?"

13
Midnight Wolf lemmy.world wreckedcarzz@lemmy.world
Joined: 2023-08-23
#20 · Quote Reply

I don't see how it would happen. Nix is immune bc hashes are constantly checked, you can't swap in malicious code without a person noticing bc it might throw a mismatched hash error. Also nixpkgs has been really good about vetting packages, I don't expect them to look too closely into the source codes of everything but if something malicious were to happen like what is happening to AUR someone ...

It's 2005 and "you can't get viruses on Mac Nix" advertising is playing all over again

15
ZombieCyborgFromOuterSpace piefed.ca ZombieCyborgFromOuterSpace@piefed.ca
Joined: 2025-12-21
#21 · Quote Reply

debian stable misses a lot of the 'fun'.

That's why it's the best.

8
UntimedDiffusion piefed.zip UntimedDiffusion@piefed.zip
Joined: 2025-12-25
#22 · Quote Reply

We're any chaotic-aur packages affected?

If they compiled updated versions of affected packages then yes

1
Ooops feddit.org Ooops@feddit.org
Joined: 2024-07-06
#23 · Quote Reply

The term "hacked" seem to have lost all meaning...

34
MilkToast breakfast.haus MilkToast@breakfast.haus
Joined: 2026-04-03
#24 · Quote Reply

The term "hacked" seem to have lost all meaning...

This happened long ago. Before even this

8
Jesus_666 lemmy.world Jesus_666@lemmy.world
Joined: 2024-04-03
#25 · Quote Reply

We're any chaotic-aur packages affected?

Not to my knowledge. They did block a few of these because they got auto-flagged for manual review.

2
Something Burger 🍔 jlai.lu SomethingBurger@jlai.lu
Joined: 2023-08-11
#26 · Quote Reply

Running both ... Nixpkgs will rightfully laugh about this - in about a month once they caught up on recent events. Loving both arch and nixos though!

They're already laughing in master, it will be merged to stable right after the current stable branch is fixed because half of packages fail to build (again).

3
phar lemmy.world phar@lemmy.world
Joined: 2023-06-10
#27 · Quote Reply

Not to my knowledge. They did block a few of these because they got auto-flagged for manual review.

Thanks

1
kevincox lemmy.ml kevincox@lemmy.ml
Joined: 2021-01-21
#28 · Quote Reply

It's possible, but at the very least someone glances over the derivation since it's part of the actual nixpkgs repo right? AUR on the other hand is a wild west.

Yes, on one hand every commit to nixpkgs needs review (to some degree) on the other hand there are far too many committers to nixpkgs.

There are also gaps such as the bots to auto-merge packages with maintainer approval, so a simple attack looks like this:

  1. Submit a package with you as a maintainer.
  2. Create a new GitHub account and send a malicious update to that package.
  3. Use a bot to merge with maintainer approval.

So nixpkgs is better than the AUR, but it isn't great and unlike Arch has no separate official repos.

7
Kairos lemmy.today LodeMike@lemmy.today
Joined: 2023-12-26
#29 · Quote Reply

This happened long ago. Before even this

Oh right THAT fucking thing

3
j4yc33 piefed.social j4yc33@piefed.social
Joined: 2025-11-10
#30 · Quote Reply

I remember when, I think it was either a log4j or CUPS malware attack, Debian remained unaffected because the packages in its repos was too old.

Laughs in Debian

3
bryndos fedia.io bryndos@fedia.io
Joined: 2025-07-28
#31 · Quote Reply

I believe I even got the reverse, pacman working on Nix (I've also gotten it and archiso working on Fedora)

Can you add aur to pacman?

I didn't think you could, but TBH I only use arch on the side ( or by the way , if you will) mostly debian.
I dunno i'd want to put aur into pacman even if i knew how.

1
pbsds lemmy.ml pbsds@lemmy.ml
Joined: 2023-02-28
#32 · (edited) Quote Reply

Comparing the AUR to nixpkgs is like comparing the NUR and random flakes to the main Arch repositories.

Had the AUR been prefixing the package names with the maintainer name like the NUR does, then it would not be possible to do the orphan adoption attack at the same scale. (Instead a bunch of duplicates with higher version numbers would pop up, prompting users to switch)

10
Ooops feddit.org Ooops@feddit.org
Joined: 2024-07-06
#33 · (edited) Quote Reply

This happened long ago. Before even this

Well... People finding and disclosing security flaws are often much closer to hackers than what happened with the AUR.

Calling people adopting outdated and orphanded packages hackers is like calling the guy that finds a banknote on the ground a bankrobber.

5
Baŝto discuss.tchncs.de basxto@discuss.tchncs.de
Joined: 2023-07-22
#34 · Quote Reply

It's possible, but at the very least someone glances over the derivation since it's part of the actual nixpkgs repo right? AUR on the other hand is a wild west.

is a wild west.

I prefer to call it anarchy

4
KindaABigDyl programming.dev KindaABigDyl@programming.dev
Joined: 2023-06-14
#35 · Quote Reply

Can you add aur to pacman? I didn't think you could, but TBH I only use arch on the side ( or by the way , if you will) mostly debian. I dunno i'd want to put aur into pacman even if i knew how.

I never tried

1
thegerald lemmy.zip thegerald@lemmy.zip
Joined: 2026-08-30
#36 · Quote Reply

As a nix user, I wouldn't laugh. We are vulnerable to this type of attack as well. Heck, it's surprising we aren't full of malware considering how many packages there are, and an easy supply chain attack vector with auto RyanTM PRs.

I'm in the same boat. I think its a legit reason for someone to avoid nix unfortunately. Do you know of any efforts to mitigate this? Besides having reviews ...

1
Post Reply
Back to top