Re:Go typosquatting package relays info to tech firm
by coder543 on Tuesday March 02, 2021 @11:24AM
(#26316974)
There would also (by necessity) be a change in the centralized `go.mod` file (and `go.sum`) that corresponds to the addition of the new, almost-duplicate package being imported. Definitely spottable. Unless someone is using the deprecated GOPATH functionality, in which case things might be harder to spot. However, the author specifically pointed out how rare this attack seems to be in the Go ecosystem.
If the author identified malicious repos on user accounts that were created solely to make those malicious repos... it seems like something the author should have reported to GitHub. I wonder if GitHub would actually do anything, though.
Re:Go typosquatting package relays info to tech firm
by jwalton on Wednesday March 03, 2021 @09:10AM
(#26328471)
By the time it’s in your go.mod, the malicious software has already been downloaded and installed on your machine, though. Damage may already have been done at that point.
Re:Go typosquatting package relays info to tech firm
by heavenlyblue on Thursday March 04, 2021 @04:39AM
(#26340455)
Ah, thanks for clearing this up - I've thought I had no idea what I was speaking about.
Re:Go typosquatting package relays info to tech firm
by gowld on Tuesday March 02, 2021 @12:07PM
(#26317518)
It's a bit silly that people fuss over go package path names.
Any non-trivial app would use a preprocessor to manage the import lines. This problem was solved 40 years ago.
Re:Go typosquatting package relays info to tech firm
by heavenlyblue on Wednesday March 03, 2021 @05:07AM
(#26326576)
I think I just made an example of receiving a merge request somewhere on Github, where you don't have access to the preprocessor or are not running it yourself. It is easy to accept the change when the change looks so much like lines in other files.
The issue was resolved by the comment on the same level, however your comment added 0 to the discussion.
Feels to me like they are joking.
When you have to type out the name in every single file you have a chance of making the mistake every single time you're typing it; while a centralised approach allows one to concentrate on the added import.
One of the vectors of attack using this library is to create a Merge Request that slightly changes the name of the import in one of the N files you are changing. Good luck spotting that as a reviewer.