Earlier quoted context omitted.
First point.. plus, OTP/MFA authenticated publishing. This OTP/MFA should come from package repositories, before the package is made publicly available. This is needed so that CD stage is not blocked. OTP/MFA should be scoped to publishing user/org, not the package. How the OTP/MFA client is managed across the maintainers/org, lies in the scope of maintainers/org.
This still does nothing to prevent anyone from publishing a bad package, for example a compromised device/dev in the organization. A cooldown of a day, and maybe not updating on weekends will save you from that. It's time to stop moving at the speed of stupid.
Keyv and friends compromised in active Shai-Hulud supply chain attack
111–120 of 145 posts
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#112Once again, I ask myself: should we start "shaming" developers who don't use isolation? It still seems I am the exception and most people run their dev environment with full permissions. Why? I also wrote an article ( https://evertheylen.eu/p/shame-devs-without-isolation/ ) to flesh out my thoughts, but I'd be really happy to discuss this in the comments.
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#113Earlier quoted context omitted.
This still does nothing to prevent anyone from publishing a bad package, for example a compromised device/dev in the organization. A cooldown of a day, and maybe not updating on weekends will save you from that. It's time to stop moving at the speed of stupid.
A compromised device still can't access the secure enclave.
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#114Earlier quoted context omitted.
Defense in depth is the “meat and potatoes” of security. In other words: people should be auditing their software, but we should also design systems and schemes that provide varying degrees of defense and protection when people invariably fail to review the code they run.
Defence in depth is not just 'throw anything in that might improve security' though. The idea is to have multiple strong layers, not a hundred half-measures that are all easily bypassed. A stronger layer might be sandboxing, or separating your build and publishing steps as others have suggested (and also probably worth restricting the credentials the publishing step to just the relevant packages as well). These will…
Definitely. On the other hand, in my opinion, "not running arbitrary code during package install" is not a "half-measure", it's a basic sanity. This whole arbitrary code execution at install time is a convenience feature that was adapted by some package managers, but it was never a good idea.
Fortunately, nixos solves that for me in most cases.
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#115Earlier quoted context omitted.
This article has a lot of information and ways to check & clean: https://safedep.io/keyv-npm-supply-chain-compromise/
I ended up asking my agent with auto mode: can you search all installed node modules for any sign of the shai hulud supply chain attack? What happened Every package in the family received two new files, setup.mjs and Math_Symbol.js, along with a "preinstall": "node setup.mjs" entry added to each package.json. Anyone who ran npm install against an affected version would have had setup.mjs execute automatically before…
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#116Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#117Earlier quoted context omitted.
Missile defense systems are unnecessary because they could just use tanks Anti-tank measures are unnecessary because they can just use missiles
What's your solution to using a library without executing the code in it?
In most sane environments, like for example native languages, this is already the case. Downloading a .dll file and putting it in an appropriate directory won't, by itself, execute code in that library.
You may argue that the code will get executed at some point anyway, but that's besides the point. Sandboxing the build environment is a different problem than sandboxing the test/staging/production environment.
I think we both agree that "adding random obstacles that don't actually protect anything" is not a valid approach to security, but my mental model of the build step is "transformation of input data into output data", and while this step may produce a malicious output from malicious inputs, it should not do anything malicious itself. For example, "gcc source.c" should not execute arbitrary code by itself.
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#118Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#119It's time for all developers to learn about devcontainers and use them consistently. They're super easy to setup and run and would protect from most of what this worm does. https://code.visualstudio.com/docs/devcontainers/containers is the best guide to get started if you use vscode.
Re: Keyv and friends compromised in active Shai-Hulud supply chain attack
#120Packj uses static+dynamic code/behavioral analysis to scan for indicators of compromise (e.g., spawning of shell, use of SSH keys, network communication, use of decode+eval, etc). It also checks for several metadata attributes to detect impersonating packages (typo squatting).