Every dependency you add is a supply chain attack waiting to happen (benhoyt.com)
from codeinabox@programming.dev to programming@programming.dev on 02 Apr 12:46
https://programming.dev/post/48171483

#programming

threaded - newest

transporter_ii@programming.dev on 02 Apr 13:31 next collapse

No build with AlpineJs is now the future. I’ve been saying for many years that creating a “hello world” page that generates tens or even hundreds of thousands of files is kind of nuts. Every one of those files could be a security issue.

Kissaki@programming.dev on 02 Apr 17:37 collapse

What’s the advantage of AlpineJs vs baseline web technologies?

Scrolling through the simple intro examples, I would have implemented those with standard JS and DOM APIs just fine.

shnizmuffin@lemmy.inbutts.lol on 02 Apr 22:59 collapse

Implementing reactivity is a non-trivial task. With Alpine, you get Vue’s without the rest of Vue.

eager_eagle@lemmy.world on 02 Apr 13:33 next collapse

You should probably turn off Dependabot

Nonsense, most of these supply chain attacks are detected and have their problematic versions pulled within a few hours. Just set a cooldown period for dependabot.

GiorgioPerlasca@lemmy.ml on 02 Apr 19:49 next collapse

Favour programming languages with a good and stable standard library.

moonpiedumplings@programming.dev on 02 Apr 23:18 collapse

a grand scale with the XZ backdoor

The XZ backdoor, affected a lot less machines than you think. It did not affect:

  • Debian Stable, or Red Hat Enterprise Linux (and rebuilds) — RHEL/rebuilds
  • Linux distros that did not integrate ssh into ssytemd
  • Linux distros that do not use systemd

The malicious code never made it into RHEL or Debian. Both of those distros have a model of freezing packages at a specific version. They then only push manually reviewed security updates, ignoring feature updates or bugfixes to the programs they are packaging. This ensures maximum stability for enterprise usecases, but the way that the changes are small and reviawable also causes them to dodge supply chain attacks like xz (it also enables these distros to have stable auto update features, which I will mention later). But those distros make up a HUGE family of enterprise Linux machines, that were simply untouched by this supply chain attack.

As for linux distros that don’t integrate ssh with systemd or non systemd distros being affected, that was because the malware was inactive in those scenarios. Malicious code did make it there, but it didn’t activate. I wonder if that was sloppiness on the part of the maker of the malware, or intentional, having it activate less frequently as a way of avoiding detection?

Regardless, comparing the XZ backdoor to the recent NPM and other programming language specific package manager supply chain attacks is a huge false analogy. They aren’t comparable at all. Enterprise Linux distros have excellent supply chain security, whereas programming language package managers have basically none. To copy from another comment of mine about them:

Debian Linux, and many other Linux distros, have extensive measures to protect their supply chain. Packages are signed and verified, by multiple developers, before being built reproducibly (I can build and verify and identical binary/package). The build system has layers, such that if only a single layer is compromised, nothing happens and nobody flinches.

Programming langauge specific package repos, have no such protections. A single developer has their key/token/account, and then they can push packages, which are often built on their own devices. There are no reproducible build to ensure the binaries are from the same source code, and no multi-party signing to ensure that multiple devs would need to be compromised in order to compromise the package.

So what happened, probably, is some developer got phished or hacked, and gave up their API key. And the package they made was popular, and frequently ran unsandboxed on devs personal devices, so when other developers downloaded the latest version of that package, they got hacked too. The attackers then used their devices to push more malicious packages to the repo, and the cycle repeats.

And that’s why supply chain attacks are now a daily occurrence.

And then this:

You should probably turn off Dependabot. In my experience, we get more problems from automatic updates than we would by staying on the old versions until needed.

Also drives me insane as well. It’s a form of survivorship bias, where people only notice when automatic upgrades cause problems, but they completely ignore the way that automatic security upgrades prevent many issues. Nobody cares about some organization NOT getting ransomwared because their webserver was automatically patched. That doesn’t make the news the way that auto upgrades breaking things does. To copy from yet another comment of mine

If your software updates between stable releases break, the root cause is the vendor, rather than auto updating. There exist many projects that manage to auto update without causing problems. For example, Debian doesn’t even do features or bugfixes, but only updates apps with security patches for maximum compatibility.

Crowdstrike auto updating also had issues on Linux, even before the big windows bsod incident.

neowin.net/…/crowdstrike-broke-debian-and-rocky-l…

It’s not the fault of the auto update process, but instead the lack of QA at crowdstrike. And it’s the responsibility of the system administrators to vet their software vendors and ensure the models in use don’t cause issues like this. Thousands of orgs were happily using Debian/Rocky/RHEL with autoupdates, because those distros have a model of minimal feature/bugfixes and only security patches, ensuring no fuss security auto updates for around a decade for each stable release that had already had it’s software exte