(no title)
phiresky | 4 months ago
Also I can recommend pnpm, it has stopped executing lifecycle scripts by default so you can whitelist which ones to run.
phiresky | 4 months ago
Also I can recommend pnpm, it has stopped executing lifecycle scripts by default so you can whitelist which ones to run.
tetha|4 months ago
Because the counter-question could be: Why would anything but ssh or ansible need access to my ssh keys? Why would anything but firefox need access to the local firefox profiles? All of those can be mapped out with mount namespaces from the execution environment of most applications.
And sure, this is a blacklist approach, and a whitelist approach would be even stronger, but the blacklist approach to secure at least the keys to the kingdom is quicker to get off the ground.
ashishb|4 months ago
There is a gazillion list of tools that can give someone analysis paralysis. Here's my simple suggestion: all of your backend team already knows (or should) learn Docker for production deployments.
So, why not rely on the same? It might not be the most efficient, but then dev machines are mostly underutilized anyway.
ashishb|4 months ago
Imagine you are in a 50-person team that maintains 10 JavaScript projects, which one is easier?
I find the second to be a lot easier.larusso|4 months ago
afavour|4 months ago
alt227|4 months ago
Switch your projects once, done for all.
fragmede|4 months ago
jve|4 months ago
And npm can be configured to prevent install scripts to be run anyways:
> Consider adding ignore-scripts to your .npmrc project file, or to your global npm configuration.
But I do like your option to isolate npm for local development purposes.
azangru|4 months ago
> Switch all projects to `pnpm`?
Sorry; I am out of touch. Does pnpm not have these security problems? Do they only exist for npm?
ashishb|4 months ago
I won't execute that code directly on my machine. I will always execute it inside the Docker container. Why do you want to run commands like `vite` or `eslint` directly on your machine? Why do they need access to anything outside the current directory?
bandrami|4 months ago
throwaway290|4 months ago
apsurd|4 months ago
Because it means the hygiene is thrown over the fence in a post commit manner.
AI makes this worse because they also run them "over the fence".
However you run it, i want a human to hold accountability for the mainline committed code.
simpaticoder|4 months ago
unknown|4 months ago
[deleted]
johannes1234321|4 months ago
By default it directly runs code as part of the download.
By isolation there is at least a chance to do some form of review/inspection
Kholin|4 months ago
worthless-trash|4 months ago
> really just downloads arbitrary code you are going to
> execute immediately afterwards anyways?
I don't want to stereotype, but this logic is exactly why javascript supply chain is in the mess its in.