This feels like a great application of AI to root around through the code of packages in these repos and find ones that access the ssh key directory at all to be looked at more thoroughly by a human.
I think they would start obfuscating the relevant code to get around it
Many ad networks and AABs do something similar (especially Admiral) in an attempt to evade ad blocking extensions
Do you think using a custom ssh key directory would prevent these malicious apps from working correctly or is there some environment variable that always points to the ssh key folder or I guess they could just run a search on the system for any files like .pub. Are there any safety procedures that one can take to circumvent these kinds of attacks?
And this is why you password protect your ssh keys
It's honestly crazy that tools like npm don't force you to encrypt the tokens for the npm repos. They don't even support it. Any stupid read_file() with http.post() can screw 1000 people.
What's a stream of packages?
Its just a weird word choice for many/a group. If you read the article they are typo squatting legitimate packages with alternate versions that steal the ssh keys.
cat ~/.ssh/id_rsa
🤔Feature request: steal ed25519 keys too