logoalt Hacker News

owl57today at 3:25 AM2 repliesview on HN

If the malicious-npm-package-of-the-week is reading arbitrary files on your workstation, isn't it usually able to run git clone/push/whatever with your current credentials anyway?


Replies

digi59404today at 3:42 AM

Yes, but also no. For example in GitLab a user who’s infected could push code to a branch. Then it could even make a merge request to pull that branch into main (if main is protected).

But then someone else on the team should have to manually approve that MR to allow it to be merged to main.

This kind of defeats the ability of malware to push stuff out automatically.

ikiristoday at 4:53 AM

Not if they're touch required in a secure enclave like a yubikey