this post was submitted on 23 Apr 2026
651 points (99.4% liked)

Selfhosted

59141 readers
229 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] dieTasse@feddit.org 1 points 2 weeks ago (1 children)

In case of NPM version pinning is a good practice. But also set it to ignore post install scripts. They are a bad practice and only about 2 % of all packages use it so it is unlikely it will bother you. They, the post install scripts, were used in recent supply chain attacks btw (the axios). You can either set it project wide in .npmrc file, add ignore-scripts=true, that is good for project where multiple people collaborate. And/Or system wide by running npm config set ignore-scripts true for your personal workspace. You can also achieve it by using --ignore-scripts flag during npm install, but that is way too impractical to always think about it. Also I would recommend checking npq, its a wrapper around npm cli that will give you some security summary before installing anything (and it is able to give you warning about post install scripts).

[–] captcha_incorrect@lemmy.world 1 points 2 weeks ago (1 children)

Wait, any package that I download via NPM could potentially have a script that will run unless I set it to false, when I install said package?

[–] dieTasse@feddit.org 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Yes, that is exactly how the axios supply chain attack worked... It ran post install script (on dependency) that downloaded malware, ran it and even cleaned it up. Everything on that machine was compromised... It can be any dependency of dependency too, deep down in the tree...

[–] captcha_incorrect@lemmy.world 2 points 2 weeks ago

Hmm. I was going to say that it sounds bonkers what it can run just any script, but at the same time, is it any different from downloading and executhing a binary file?