(no title)
inbx0 | 6 months ago
npm config set ignore-scripts true [--global]
It's easy to do both at project level and globally, and these days there are quite few legit packages that don't work without them. For those that don't, you can create a separate installation script to your project that cds into that folder and runs their install-script.I know this isn't a silver bullet solution to supply chain attakcs, but, so far it has been effective against many attacks through npm.
homebrewer|6 months ago
internet_points|6 months ago
and
should go after the `--unshare-all --unshare-user`Also, my system doesn't have a symlink from /tmp to /var/tmp, so I'm guessing that's not needed for me (while /bin etc. are symlinks)
aorth|6 months ago
TheTaytay|6 months ago
oulipo2|6 months ago
johnisgood|6 months ago
shermantanktop|6 months ago
unknown|6 months ago
[deleted]
tiagod|6 months ago
chrisweekly|6 months ago
trw55|6 months ago
jim201|6 months ago
ashishb|6 months ago
https://ashishb.net/programming/run-tools-inside-docker/
It does reduce the attach surface drastically.
eitau_1|6 months ago
ivape|6 months ago
Go down the rabbit hole of just installing LLM software and you’ll find yourself in quite a copy and paste frenzy.
We got used to this GitHub shit of setting up every process of an install script in this way, so I’m surprised it’s not happening constantly.
username223|6 months ago
Now you're dealing with hundreds of recursive dependencies, all of which you should assume may become hostile at any time. If you neither audit your dependencies, nor have the ability to sue them for damages, you're in a precarious position.
ifwinterco|6 months ago
dns_snek|6 months ago
Because the workflow for 99.99% of developers is something resembling:
1. git clone
2. npm install (which pulls in a malicious dependency but disabling post-install scripts saved you for now!)
3. npm run (executing your malicious dependency, you're now infected)
The only way this advice helps you is if you also insert "audit the entirety of node_modules" in between steps 2 and 3 which nobody does.
IshKebab|6 months ago
halflife|6 months ago
lrvick|6 months ago
Everything must be provided as source code and any compilation must happen locally.
junon|6 months ago
andix|6 months ago
inbx0|6 months ago
arminiusreturns|6 months ago
azangru|6 months ago
As a front-end web developer, I need a node package manager; and npm comes bundled with node.
peacebeard|6 months ago
Source: https://pnpm.io/settings#ignoredepscripts
johnisgood|6 months ago
ifwinterco|6 months ago
unknown|6 months ago
[deleted]
no_wizard|6 months ago
antihero|6 months ago
sheerun|6 months ago
herpdyderp|6 months ago
oulipo2|6 months ago
sieabahlpark|6 months ago
[deleted]