← Back to context

Comment by owl57

15 hours ago

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?

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.