News for hackers. Stuff that matters.
Re:Maybe you shouldn't install new software for a bit by YZF on Friday May 08, 2026 @02:31AM (#48059402)
I worked for one company where we were super conservative. Every external component was versioned. Nothing was updated without review and usually after it had plenty of soak time. Pretty much everything built from source code (compilers, kernel etc.). Builds [build servers/infra] can't reach the Internet at all and there's process around getting any change in. We reviewed all relevant CVEs as they came out to make a call on if they apply to us or not and how we mitigate or address them.

Then I moved to another company where we had builds that access the Internet. We upgrade things as soon as they come out. And people think this is good practice because we're getting the latest bug fixes. CVEs are reviewed by a security team.

Then a startup with a mix of other practices. Some very good. But we also had a big CVE debt. e.g. we had secure boots on our servers and encrypted drives. We had a pretty good grasp on securing components talking to each other etc.

Everyone seems to think they are doing the right thing. It's impossible to convince the "frequent upgrader" that maybe that's a risk in terms of introducing new issues. We as an industry could really use a better set of practices. Example #1 for me is better in terms of dependency management. In general company #1 had well established security practices and we had really secure products.

Re:Maybe you shouldn't install new software for a bit by KGunnerud on Friday May 08, 2026 @03:13AM (#48059729)
I would rather work with a company that updates continuously, while also building security into multiple layers so that weaknesses in one layer can be mitigated by others.

For example, at one company I worked for, they created an ACL model for applications that essentially enforced rules like: “Application X in namespace A can communicate with me.” This ACL coordinated multiple technologies working together, including Kubernetes NetworkPolicies, Linkerd manifests with mTLS, and Entra ID application permissions. As a user, it was dead simple to use and abstracted away a lot of things i do not know that well.

The important part is not the specific implementation, but the mindset behind it.

An upgrade can both fix existing issues and introduce new ones. However, avoiding upgrades can create just as many problems — if not more — over time.

At the same time, I would argue that using software backed by a large community is even more important today, since bugs and vulnerabilities are more likely to receive attention, scrutiny, and timely fixes.

Re:Maybe you shouldn't install new software for a bit by 12_throw_away on Friday May 08, 2026 @04:15PM (#48068200)
> I would rather work with a company that updates continuously, while also building security into multiple layers so that weaknesses in one layer can be mitigated by others.

Sorry, if you are updating continuously, that there is at least one layer that you failed to build any security into.

Re:Maybe you shouldn't install new software for a bit by whilenot-dev on Friday May 08, 2026 @03:33AM (#48059877)
You forgot case #4: Worked at a startup where the frontend team thought it was a good idea to use lock files during development, but to do a "fresh" install of all dependecies during the deployment step.

And yes, they still thought they were doing the right thing.

Re:Maybe you shouldn't install new software for a bit by hennell on Friday May 08, 2026 @04:07AM (#48060131)
To be fair npm makes (made?) it weirdly hard to use lock files so a lot of people did that by mistake. And when you do use lock, it reinstalls every time so a retagged package can just silently update.
Re:Maybe you shouldn't install new software for a bit by whilenot-dev on Friday May 08, 2026 @04:25AM (#48060268)
FYI a retagged package would result in a different SHA512 integrity sum and fail the installation process. It won't "just silently update".

Anyway, the point of parent and me wasn't that it was considered to be a "mistake", but people thinking they "are doing the right thing".

Re:Maybe you shouldn't install new software for a bit by user34283 on Friday May 08, 2026 @05:54AM (#48060913)
I can’t comment on the behavior of ancient npm versions, but with modern npm I would not even know how to skip using a lockfile.

As for the parent comment about not using the lockfile for the production build, that’s just incredibly incompetent.

Maybe they should hire someone who knows what they are doing. Contrary to the popular beliefs of backend engineers online, you also need some competency to do frontend properly.

In this case what’s needed is „npm ci“ instead of „npm install“ or better „pnpm install —frozen-lockfile“.

Pnpm will also do that automatically if the CI environment variable is set.

Re:Maybe you shouldn't install new software for a bit by cxr on Friday May 08, 2026 @08:16AM (#48061997)
[delayed]
Re:Maybe you shouldn't install new software for a bit by yearolinuxdsktp on Friday May 08, 2026 @09:17AM (#48062671)
Lock files were begrudgingly introduced after people who aren’t playing around with move fast and break things cried foul about dependencies being updated unexpectedly. The “semantic versioning” dogma and the illusion of safety that it brings was the original motivation. At NPM’s creation time, mature dep management ecosystems did not have floating versions, they were always pinned.

When you are talking about checking your dependencies in the source tree, you are effectively pinning exact versions, and not using floating/tilde versioning syntax.

Re:Maybe you shouldn't install new software for a bit by user34283 on Friday May 08, 2026 @09:27AM (#48062818)
That breaks if the library uses build scripts, like for setting up native binaries, or native modules linked against the specific Node version.

If you want a vendored deps model you can look at Yarn Plug and Play which does this via .zip files.

However, I would just stick with regular pnpm and installs.

Re:Maybe you shouldn't install new software for a bit by cxr on Friday May 08, 2026 @09:40AM (#48062987)
> That breaks if the library uses build scripts

Uh… no.

> setting up native binaries, or native modules linked against the specific Node version

So the majority of projects—those that don't use binary NodeJS modules—don't have a reason for sidestepping the primary VCS and going along with npm's shoddily designed overlay version control approach?

> However, I would just stick with regular pnpm and installs.

You're not answering the question. npm isn't bedrock, and pnpm certainly isn't. If you're going to introduce (mandate) the use of a tool in the workflow, you should be able to justify it by explaining your rationale for introducing it (and making everyone deal with the associated costs). You should at minimum be able to provide a lucid explanation of the tradeoffs. For good measure, you should be able to disprove the "NPM Null Hypothesis"; you should be able to state a straightforward answer to the question, "What problem is this supposed to be solving?"

Re:Maybe you shouldn't install new software for a bit by throawayonthe on Friday May 08, 2026 @06:50AM (#48061320)
doesn't `npm ci` prevent that? it fails if something doesn't match the lockfile, and wipes node_modules before running

this is on some ancient node 16 build i was trying to clean up ci for, so not very recent npm

Re:Maybe you shouldn't install new software for a bit by noirscape on Friday May 08, 2026 @07:31AM (#48061640)
npm ci does indeed prevent that. The issue isn't really with npm in specific. Rather, it's with build tools like Microsoft's Oryx, which get pushed in GitHub Actions if you're using Azure App Service. That one by default uses `npm install` on older versions (it's been changed nowadays, but Azure's generated action files have a bad habit of generating with older versions of the actions they're using), even though it's specifically meant for CI usage.

In general, use of npm ci is usually sparsely documented - most node projects you can find just recommend using npm install during the setup, suggesting a failure in promoting it's availability (I only know of it because I got frustrated that the lockfile kept clogging up git commits whenever I added dependencies with what looked like auto-generated build-time junk).

Re:Maybe you shouldn't install new software for a bit by dgoldstein0 on Friday May 08, 2026 @10:40AM (#48063937)
This was true in very old npm - generating the lock file was a separate command - npm shrinkwrap. And many people didn't know they should check in the shrinkwraps. But I think the default flipped before 2020 so that it now always creates package-lock.json files (unless an npm-shrinkwrap.json is present and then it uses /updates that)
Re:Maybe you shouldn't install new software for a bit by pseudohadamard on Saturday May 09, 2026 @03:48AM (#48072879)
Another example of this is Python and its awful externally-managed-environment handling, for which the procedure for anyone who doesn't use Python every day boils down to:

1. Get instructions from somewhere, a web page, HOWTO, whatever, telling you to "pip install thing".

2. "× This environment is externally managed"

3. Spend awhile Googling how to get past this and just make the damn thing work while swearing.

This is from observing users in practice. Google "This environment is externally managed" and you'll get nothing but hits on (a) people asking what this means and how to make it go away and (b) various unsafe methods to make it so.

Re:Maybe you shouldn't install new software for a bit by gwerbin on Friday May 08, 2026 @09:03AM (#48062494)
This is one of those bizarre "how did you even get that idea" mistakes that ironically replacing developers with AI slop farmers might actually improve on. If you ask Claude to set up a project with NPM and CI, it's not going to do weird shit like that.
Re:Maybe you shouldn't install new software for a bit by yearolinuxdsktp on Friday May 08, 2026 @09:11AM (#48062582)
I asked Claude to set up a new NPM project and it configured the install task as “npm ci || npm install”, which is stupid. That was on Opus4.7 xhigh. When I pointed out that doing so defeats the purpose, it said “oh yeah of course.”

Turns out there is no equivalent to “npm ci” that doesn’t clear node_modules first, and you can’t call npm install to simulate NPM ci behavior (sans clean).

Re:Maybe you shouldn't install new software for a bit by DHRicoF on Monday May 11, 2026 @02:07AM (#48091529)
How else are you sure your team does not conflict with itself?

/s

Re:Maybe you shouldn't install new software for a bit by dataflow on Friday May 08, 2026 @03:05AM (#48059673)
> Everyone seems to think they are doing the right thing

I like to think people would agree more on the appropriate method if they saw the risk as large enough.

If you could convince everyone that a nuclear bomb would get dropped on their heads (or a comparably devastating event) if a vulnerability gets in, I highly doubt a company like #2 would still believe they're doing things optimally, for example.

Re:Maybe you shouldn't install new software for a bit by emodendroket on Friday May 08, 2026 @03:16AM (#48059747)
Really? You think the alternate mode where you're running 5-year-old versions of stuff with tons of known security flaws is better?
Re:Maybe you shouldn't install new software for a bit by coldtea on Friday May 08, 2026 @03:34AM (#48059888)
What part of "We reviewed all relevant CVEs as they came out to make a call on if they apply to us or not and how we mitigate or address them" gave you that impression?
Re:Maybe you shouldn't install new software for a bit by emodendroket on Saturday May 09, 2026 @03:26PM (#48077508)
My experience with how such a strategy typically plays out in reality.
Re:Maybe you shouldn't install new software for a bit by HeatrayEnjoyer on Friday May 08, 2026 @03:34AM (#48059886)
>running 5-year-old versions of stuff with tons of known security flaws

No one in this thread proposed that, or anything that could be reasonably assumed to have meant that.

Re:Maybe you shouldn't install new software for a bit by KronisLV on Friday May 08, 2026 @04:32AM (#48060320)
> if they saw the risk as large enough.

If you expose people to the true risks instead of allowing them to be ignorant, the conclusion that they might come to is that they shouldn’t develop software at all.

Re:Maybe you shouldn't install new software for a bit by dataflow on Friday May 08, 2026 @10:19PM (#48071112)
The assumption was obviously that they have a compelling need to develop the software. For the sake of illustration: you imagine exposing them to whatever the highest level of risk is that still makes them wiling to develop software.
Re:Maybe you shouldn't install new software for a bit by echelon_musk on Friday May 08, 2026 @04:58AM (#48060513)
Do you ride an R1?
Re:Maybe you shouldn't install new software for a bit by YZF on Friday May 08, 2026 @10:27PM (#48071160)
I used to ride a 600R ... yes- that's where my handle comes from ;)
Re:Maybe you shouldn't install new software for a bit by ndsipa_pomu on Friday May 08, 2026 @06:33AM (#48061196)
> It's impossible to convince the "frequent upgrader" that maybe that's a risk in terms of introducing new issues

I would count myself as a "frequent upgrader" - I admin a bunch of Ubuntu machines and typically set them to auto-update each night. However, I am aware of the risks of introducing new issues, but that's offset by the risks of not upgrading when new bugs are found and patched. There's also the issue of organisations that fall far behind on versions of software which then creates an even bigger problem, though this is more common with Windows/proprietary software as you have less control over that. At least with Linux, you can generally find ways to install e.g. old versions of Java that may be required for specific tools.

There's no simple one-size-fits-all and it depends on the organisation's pool of skills as to whether it's better to proactively upgrade or to reluctantly upgrade at a slower pace. In my experience, the bugs introduced by new versions of software are easier to fix/workaround than the various issues of old software versions.

Re:Maybe you shouldn't install new software for a bit by shevy-java on Friday May 08, 2026 @10:39AM (#48063917)
> It's impossible to convince the "frequent upgrader" that maybe that's a risk in terms of introducing new issues.

Well, you critisize people who run the latest software here. Two counter-arguments:

1) If you don't upgrade frequently, you end up with super stable debian stuck on ... ancient software. This in turn means that many more recent software, won't work, unless you recompile a lot. I had this issue with mesa for instance, then needing a more recent LLVM, spirv-components and so forth. No chance to have that easily on debian, unless you control what you compile. On my local system here I run gtk2, gtk3 and gtk4 just fine. Good luck having that with debian for recent version; even debian sid is slow compared to, say, gentoo or arch(linux) or void(linux) here.

2) Even debian systems would be vulnerable to copy.fail. So that strategy is also not automatically better.

Personally I am among the frequent update folks. I use ruby scripts to automatically update to the latest, in hope that the people who write code are not incompetent. There is no guarantee that newer software is automatically always better; it is a trade-off. I don't have the time and resource for infinite security audits. I need to get things done and this approach, different to the "everything is scary" crowd, works super-well for me. I use a versioned AppDir approach on linux though, so I don't run into many issues of "can not upgrade because of same .so name issue", so I can conveniently switch to other versions as-is, including the kernel. (Excluding ABI differences and glibc, but for about 98% of the programs this works very well. I am also not alone with the get-everything-working approach, see xserver or gtk2-ng: https://github.com/X11Libre/xserver https://git.devuan.org/Daemonratte/gtk2-ng - granted, for the linux kernel this does not work that well ... I think we need better strategies for the linux kernel, things such as copy.fail should not be possible. I have no good solution here, AI will find many more exploits. No clue how we can prevent this or mitigate this more easily. I was surprised when the local instructor showed us how easy it is to use python for gaining superuser access as-is.)

Re:Maybe you shouldn't install new software for a bit by anthk on Friday May 08, 2026 @11:41AM (#48064726)
Debian had backports since forever. You could totally upgrade the kernel and MESA since month 1.
Re:Maybe you shouldn't install new software for a bit by tremon on Friday May 08, 2026 @02:08PM (#48066728)
Not forever, backports were introduced with Sarge IIRC. And typically versions only appears in backports that are also in testing/unstable, e.g. Linux 6.19 is currently in trixie-backports but the non-LTS kernels between 6.12 and 6.18 were not available there, nor is the current 7.0 (yet).
Re:Maybe you shouldn't install new software for a bit by YZF on Friday May 08, 2026 @10:37PM (#48071227)
Pulling the very latest of everything is IMO risky. What I will acknowledge is that not knowing what known issues are in your stack vs. just pulling the latest all the time is less clear. But running more stable older versions of software while tracking new vulnerabilities seems like it mitigates both the risk of new changes introducing new issues and the risk of a new vulnerability not getting addressed. This worked well for company #1 where we delivered some pretty critical products and the bar was very high for reliability and security.

A long time ago I heard that Google reviews every single line of third party code they use, not sure if it's true or if they still do it.

Re:Maybe you shouldn't install new software for a bit by JTbane on Friday May 08, 2026 @02:53PM (#48067204)
Honestly the de facto standard is to blame: at my dev job, we vacuum up all the packages we need and get the software deployed to production ASAP, then later go over the SBOM and make sure nothing looks sketchy. I'd imagine this is the default most places; an intensive approval process would slow down CI/CD too much.
Re:Maybe you shouldn't install new software for a bit by bshanks on Friday May 08, 2026 @09:20PM (#48070810)
What's the conservative best practice for a solo founder (a one person company; assume the person spends ~20 hours per week on software development/maintenance and the rest of the time on other stuff)?
Re:Maybe you shouldn't install new software for a bit by pseudohadamard on Saturday May 09, 2026 @03:39AM (#48072815)
It's interesting how standards have changed. 25 years ago people screamed about ActiveX despite Microsoft's various attempts to lock it down. Today people use something that pulls a package from a Github repo that was abandoned eight years ago that pulls a package from an FTP server in Denmark that pulls a package from a Raspberry Pi in someone's basement in New Mexico and it's all good practice.